Commit a18e9c23 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Plug leak.

1999-09-18  Morten Welinder  <terra@diku.dk>

	* src/sheet.c (zoom_cell_style): Plug leak.

	* src/functions/fn-date.c (get_serial_time): Be defensive.
parent e0a418db
1999-09-18 Morten Welinder <terra@diku.dk>
* src/sheet.c (zoom_cell_style): Plug leak.
* src/functions/fn-date.c (get_serial_time): Be defensive.
* src/expr.c (eval_expr_real): For integer 0^0, return #NUM!.
(eval_expr_real): Adjust float power error check to match the
integer one.
......
1999-09-18 Morten Welinder <terra@diku.dk>
* src/sheet.c (zoom_cell_style): Plug leak.
* src/functions/fn-date.c (get_serial_time): Be defensive.
* src/expr.c (eval_expr_real): For integer 0^0, return #NUM!.
(eval_expr_real): Adjust float power error check to match the
integer one.
......
......@@ -49,13 +49,15 @@ get_serial_time (Value *v)
if (VALUE_IS_NUMBER (v))
serial = value_get_as_float (v);
else {
char *format;
char *str, *format;
double dserial;
if (format_match (v->v.str->str, &dserial, &format)) {
str = value_get_as_string (v);
if (format_match (str, &dserial, &format)) {
serial = dserial;
} else
serial = 0;
g_free (str);
}
return serial - floor (serial);
}
......
......@@ -49,13 +49,15 @@ get_serial_time (Value *v)
if (VALUE_IS_NUMBER (v))
serial = value_get_as_float (v);
else {
char *format;
char *str, *format;
double dserial;
if (format_match (v->v.str->str, &dserial, &format)) {
str = value_get_as_string (v);
if (format_match (str, &dserial, &format)) {
serial = dserial;
} else
serial = 0;
g_free (str);
}
return serial - floor (serial);
}
......
......@@ -275,10 +275,11 @@ zoom_cell_style (Sheet *sheet, int col, int row, Cell *cell, void *user_data)
*/
if (cell->style->font->scale == sheet->last_zoom_factor_used)
return NULL;
sf = style_font_new_from (cell->style->font, sheet->last_zoom_factor_used);
cell_set_font_from_style (cell, sf);
style_font_unref (sf);
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment