Commit 43002eb0 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg
Browse files

Fix leak morten found.


Fix leak morten found.

2000-05-03  Jody Goldberg <jgoldberg@home.com>

	* src/cell.c (cell_set_array_formula) : Add some invariants to catch
	  inverted arrays.  The function should use the supplier's
	  reference.  It should not re-reference the supplied expression.
	  Document this.
parent d7191722
2000-05-03 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_array_formula) : Add some invariants to catch
inverted arrays. The function should use the supplier's
reference. It should not re-reference the supplied expression.
Document this.
2000-05-03 Morten Welinder <terra@diku.dk>
* autogen.sh (libtool): Add version check.
......
2000-05-03 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_array_formula) : Add some invariants to catch
inverted arrays. The function should use the supplier's
reference. It should not re-reference the supplied expression.
Document this.
2000-05-03 Morten Welinder <terra@diku.dk>
* autogen.sh (libtool): Add version check.
......
2000-05-03 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_array_formula) : Add some invariants to catch
inverted arrays. The function should use the supplier's
reference. It should not re-reference the supplied expression.
Document this.
2000-05-03 Morten Welinder <terra@diku.dk>
* autogen.sh (libtool): Add version check.
......
2000-05-03 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_array_formula) : Add some invariants to catch
inverted arrays. The function should use the supplier's
reference. It should not re-reference the supplied expression.
Document this.
2000-05-03 Morten Welinder <terra@diku.dk>
* autogen.sh (libtool): Add version check.
......
2000-05-03 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_array_formula) : Add some invariants to catch
inverted arrays. The function should use the supplier's
reference. It should not re-reference the supplied expression.
Document this.
2000-05-03 Morten Welinder <terra@diku.dk>
* autogen.sh (libtool): Add version check.
......
2000-05-03 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_array_formula) : Add some invariants to catch
inverted arrays. The function should use the supplier's
reference. It should not re-reference the supplied expression.
Document this.
2000-05-03 Morten Welinder <terra@diku.dk>
* autogen.sh (libtool): Add version check.
......
2000-05-03 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_set_array_formula) : Add some invariants to catch
inverted arrays. The function should use the supplier's
reference. It should not re-reference the supplied expression.
Document this.
2000-05-03 Morten Welinder <terra@diku.dk>
* autogen.sh (libtool): Add version check.
......
......@@ -519,6 +519,9 @@ cell_set_expr (Cell *cell, ExprTree *expr, char const *optional_format)
* upper left corner is handled as a special case and care is taken to
* put it at the head of the recalc queue if recalcs are requested.
*
* NOTE : Does not add a reference to the expression. It takes over the callers
* reference.
*
* Does not regenerate spans, dimensions or autosize cols/rows.
*
* DOES NOT CHECK for array partitioning.
......@@ -539,11 +542,12 @@ cell_set_array_formula (Sheet *sheet,
g_return_if_fail (num_rows > 0);
g_return_if_fail (formula != NULL);
g_return_if_fail (corner != NULL);
g_return_if_fail (col_a <= col_b);
g_return_if_fail (row_a <= row_b);
wrapper = expr_tree_new_array (0, 0, num_rows, num_cols);
wrapper->array.corner.func.value = NULL;
wrapper->array.corner.func.expr = formula;
expr_tree_ref (formula);
cell_set_expr_internal (corner, wrapper, NULL);
expr_tree_unref (wrapper);
......
......@@ -499,9 +499,7 @@ cmd_area_set_text_redo (GnumericCommand *cmd, CommandContext *context)
return TRUE;
}
/* If everything is ok then store previous contents
* and perform the operation
*/
/* Everything is ok. Store previous contents and perform the operation */
for (l = me->selection ; l != NULL ; l = l->next) {
Range const * const r = l->data;
me->old_content = g_slist_prepend (me->old_content,
......@@ -509,7 +507,7 @@ cmd_area_set_text_redo (GnumericCommand *cmd, CommandContext *context)
r->start.col, r->start.row,
r->end.col, r->end.row));
/* If there is a is an expression then this was an array */
/* If there is an expression then this was an array */
if (expr != NULL)
cell_set_array_formula (me->pos.sheet,
r->start.row, r->start.col,
......
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