Commit 7d3188db authored by Morten Welinder's avatar Morten Welinder

Conditional formats: fix criticals

This fixes criticals for conditional formats creating dynamic deps.
parent bd6dae23
2014-03-16 Morten Welinder <terra@gnome.org>
* src/expr.c (gnm_expr_eval): Survive dynamic deps in conditional
formats. I'm not positive we do things right, but this avoids
criticals, at least.
* src/cell.c (cell_set_expr_internal): Don't change an existing
value.
......
......@@ -28,6 +28,7 @@ Morten:
* Fix font dialog problem with underline.
* Fix crash reading strange xls file. [Redhat #1076912]
* Fix problem clearing existing values in some xlsx cells. [#726297]
* Fix criticals for dynamic deps in conditional formats. [#726163]
--------------------------------------------------------------------------
Gnumeric 1.12.12
......
......@@ -1455,7 +1455,14 @@ gnm_expr_eval (GnmExpr const *expr, GnmEvalPos const *pos,
return (flags & GNM_EXPR_EVAL_PERMIT_EMPTY)
? NULL : value_new_int (0);
if (res->type == VALUE_CELLRANGE) {
dependent_add_dynamic_dep (pos->dep, &res->v_range.cell);
/*
* pos->dep really shouldn't be NULL here, but it
* will be if someone puts "indirect" into an
* expression used for conditional formats.
*/
if (pos->dep)
dependent_add_dynamic_dep (pos->dep,
&res->v_range.cell);
if (!(flags & GNM_EXPR_EVAL_PERMIT_NON_SCALAR)) {
res = value_intersection (res, pos);
return (res != NULL)
......
......@@ -1518,7 +1518,7 @@ sheet_style_get (Sheet const *sheet, int col, int row)
#define border_null(b) ((b) == none || (b) == NULL)
static inline void
static void
style_row (GnmStyle *style, int start_col, int end_col, GnmStyleRow *sr, gboolean accept_conditions)
{
GnmBorder const *top, *bottom, *none = gnm_style_border_none ();
......
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