Commit 437b127e authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Don't relink deps for sheets that are being destroyed.

2005-05-17  Morten Welinder  <terra@gnome.org>

	* src/expr-name.c (expr_name_set_expr): Don't relink deps for
	sheets that are being destroyed.
parent e42e78b1
2005-05-17 Morten Welinder <terra@gnome.org>
* src/expr-name.c (expr_name_set_expr): Don't relink deps for
sheets that are being destroyed.
2005-05-16 Morten Welinder <terra@gnome.org>
* src/print-cell.c (print_cell): Fix and simplify rotated case.
......
......@@ -21,6 +21,8 @@ Morten:
* Fix CRITICAL when undoing borders.
* Improve multiline rotated text.
* Fix Excel load crash. [#303923]
* Speed up exit on large sheets with lots of names, such as the
one from #303923.
--------------------------------------------------------------------------
Gnumeric 1.5.1
......
2005-05-17 Morten Welinder <terra@gnome.org>
* src/expr-name.c (expr_name_set_expr): Don't relink deps for
sheets that are being destroyed.
2005-05-16 Morten Welinder <terra@gnome.org>
* src/print-cell.c (print_cell): Fix and simplify rotated case.
......
......@@ -580,19 +580,40 @@ expr_name_set_scope (GnmNamedExpr *nexpr, Sheet *sheet)
void
expr_name_set_expr (GnmNamedExpr *nexpr, GnmExpr const *new_expr)
{
GSList *deps = NULL;
GSList *good = NULL;
g_return_if_fail (nexpr != NULL);
if (new_expr == nexpr->expr)
return;
if (nexpr->expr != NULL) {
GSList *deps = NULL, *junk = NULL;
deps = expr_name_unlink_deps (nexpr);
expr_name_handle_references (nexpr, FALSE);
gnm_expr_unref (nexpr->expr);
/*
* We do not want to relink deps for sheets that are going
* away. This speeds up exit for workbooks with lots of
* names defined.
*/
while (deps) {
GSList *next = deps->next;
GnmDependent *dep = deps->data;
if (dep->sheet && dep->sheet->workbook->during_destruction)
deps->next = junk, junk = deps;
else
deps->next = good, good = deps;
deps = next;
}
g_slist_free (junk);
}
nexpr->expr = new_expr;
dependents_link (deps, NULL);
dependents_link (good, NULL);
if (new_expr != NULL)
expr_name_handle_references (nexpr, TRUE);
......
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