Commit ab419728 authored by Morten Welinder's avatar Morten Welinder

Fixing one more insert/delete column/row bug.

parent 75d8087c
1999-05-24 Morten Welinder <terra@diku.dk>
* src/workbook.c (workbook_fixup_references): Set formula
directly, not via text strings. (This actually fixes a bug with
insertion of columns/rows where we modify the cells before we
restructure the sheet.) It's much faster and cleaner too.
(workbook_invalidate_references): Ditto.
1999-05-23 Morten Welinder <terra@diku.dk>
* src/gnumeric-sheet.c (gnumeric_sheet_cursor_set): Make the
......
1999-05-24 Morten Welinder <terra@diku.dk>
* src/workbook.c (workbook_fixup_references): Set formula
directly, not via text strings. (This actually fixes a bug with
insertion of columns/rows where we modify the cells before we
restructure the sheet.) It's much faster and cleaner too.
(workbook_invalidate_references): Ditto.
1999-05-23 Morten Welinder <terra@diku.dk>
* src/gnumeric-sheet.c (gnumeric_sheet_cursor_set): Make the
......
1999-05-24 Morten Welinder <terra@diku.dk>
* src/workbook.c (workbook_fixup_references): Set formula
directly, not via text strings. (This actually fixes a bug with
insertion of columns/rows where we modify the cells before we
restructure the sheet.) It's much faster and cleaner too.
(workbook_invalidate_references): Ditto.
1999-05-23 Morten Welinder <terra@diku.dk>
* src/gnumeric-sheet.c (gnumeric_sheet_cursor_set): Make the
......
1999-05-24 Morten Welinder <terra@diku.dk>
* src/workbook.c (workbook_fixup_references): Set formula
directly, not via text strings. (This actually fixes a bug with
insertion of columns/rows where we modify the cells before we
restructure the sheet.) It's much faster and cleaner too.
(workbook_invalidate_references): Ditto.
1999-05-23 Morten Welinder <terra@diku.dk>
* src/gnumeric-sheet.c (gnumeric_sheet_cursor_set): Make the
......
......@@ -2198,25 +2198,13 @@ workbook_fixup_references (Workbook *wb, Sheet *sheet, int col, int row,
for (l = cells; l; l = l->next) {
Cell *cell = l->data;
ExprTree *newtree;
int thiscol, thisrow;
thiscol = cell->col->pos;
thisrow = cell->row->pos;
newtree = expr_tree_fixup_references (cell->parsed_node, cell->sheet,
thiscol, thisrow, sheet,
cell->col->pos, cell->row->pos,
sheet,
col, row, coldelta, rowdelta);
if (newtree) {
char *exprtxt, *eqexprtxt;
exprtxt = expr_decode_tree (newtree, cell->sheet, thiscol, thisrow);
eqexprtxt = g_strconcat ("=", exprtxt, NULL);
cell_set_text (cell, eqexprtxt);
g_free (exprtxt);
g_free (eqexprtxt);
expr_tree_unref (newtree);
}
if (newtree)
cell_set_formula_tree (cell, newtree);
}
g_list_free (cells);
......@@ -2252,25 +2240,13 @@ workbook_invalidate_references (Workbook *wb, Sheet *sheet, int col, int row,
for (l = cells; l; l = l->next) {
Cell *cell = l->data;
ExprTree *newtree;
int thiscol, thisrow;
thiscol = cell->col->pos;
thisrow = cell->row->pos;
newtree = expr_tree_invalidate_references (cell->parsed_node, cell->sheet,
thiscol, thisrow, sheet,
cell->col->pos, cell->row->pos,
sheet,
col, row, colcount, rowcount);
if (newtree) {
char *exprtxt, *eqexprtxt;
exprtxt = expr_decode_tree (newtree, cell->sheet, thiscol, thisrow);
eqexprtxt = g_strconcat ("=", exprtxt, NULL);
cell_set_text (cell, eqexprtxt);
g_free (exprtxt);
g_free (eqexprtxt);
expr_tree_unref (newtree);
}
if (newtree)
cell_set_formula_tree (cell, newtree);
}
g_list_free (cells);
......
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