Commit ee061291 authored by Jody Goldberg's avatar Jody Goldberg

cell_relocate used to ignore the row/col diffs. Now it uses them to adjust

formulas while pasting.  Sync all uses of cell_relocate to handle this.
parent 84c64127
1999-09-01 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_move_column, sheet_shift_row,
sheet_insert_row, sheet_delete_row, sheet_shift_col) : Don't
relocate the expressions. (Bug 2041)
1999-09-01 Pablo Saratxaga <pablo@mandrakesoft.com> 1999-09-01 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in,po/da.po: added Danish file * configure.in,po/da.po: added Danish file
......
1999-09-01 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_move_column, sheet_shift_row,
sheet_insert_row, sheet_delete_row, sheet_shift_col) : Don't
relocate the expressions. (Bug 2041)
1999-09-01 Pablo Saratxaga <pablo@mandrakesoft.com> 1999-09-01 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in,po/da.po: added Danish file * configure.in,po/da.po: added Danish file
......
...@@ -3073,7 +3073,6 @@ static void ...@@ -3073,7 +3073,6 @@ static void
sheet_move_column (Sheet *sheet, ColRowInfo *ci, int new_column) sheet_move_column (Sheet *sheet, ColRowInfo *ci, int new_column)
{ {
GList *rows, *column_cells, *l; GList *rows, *column_cells, *l;
int diff = new_column - ci->pos;
/* remove the cells */ /* remove the cells */
column_cells = NULL; column_cells = NULL;
...@@ -3093,7 +3092,7 @@ sheet_move_column (Sheet *sheet, ColRowInfo *ci, int new_column) ...@@ -3093,7 +3092,7 @@ sheet_move_column (Sheet *sheet, ColRowInfo *ci, int new_column)
sheet_cell_add_to_hash (sheet, cell); sheet_cell_add_to_hash (sheet, cell);
cell_relocate (cell, diff, 0); cell_relocate (cell, 0, 0);
} }
g_list_free (column_cells); g_list_free (column_cells);
} }
...@@ -3362,7 +3361,7 @@ sheet_shift_row (Sheet *sheet, int col, int row, int count) ...@@ -3362,7 +3361,7 @@ sheet_shift_row (Sheet *sheet, int col, int row, int count)
/* Relocate the cell */ /* Relocate the cell */
sheet_cell_remove (sheet, cell); sheet_cell_remove (sheet, cell);
sheet_cell_add (sheet, cell, new_column, row); sheet_cell_add (sheet, cell, new_column, row);
cell_relocate (cell, count, 0); cell_relocate (cell, 0, 0);
} }
g_list_free (l2); g_list_free (l2);
...@@ -3497,7 +3496,7 @@ sheet_insert_row (Sheet *sheet, int row, int count) ...@@ -3497,7 +3496,7 @@ sheet_insert_row (Sheet *sheet, int row, int count)
sheet_cell_add_to_hash (sheet, cell); sheet_cell_add_to_hash (sheet, cell);
cell_relocate (cell, 0, count); cell_relocate (cell, 0, 0);
} }
g_list_free (cell_store); g_list_free (cell_store);
...@@ -3603,7 +3602,7 @@ sheet_delete_row (Sheet *sheet, int row, int count) ...@@ -3603,7 +3602,7 @@ sheet_delete_row (Sheet *sheet, int row, int count)
sheet_cell_add_to_hash (sheet, cell); sheet_cell_add_to_hash (sheet, cell);
cell_relocate (cell, 0, -count); cell_relocate (cell, 0, 0);
} }
g_list_free (cell_store); g_list_free (cell_store);
...@@ -3700,7 +3699,7 @@ sheet_shift_col (Sheet *sheet, int col, int row, int count) ...@@ -3700,7 +3699,7 @@ sheet_shift_col (Sheet *sheet, int col, int row, int count)
} }
sheet_cell_add (sheet, cell, col, new_row); sheet_cell_add (sheet, cell, col, new_row);
cell_relocate (cell, 0, count); cell_relocate (cell, 0, 0);
} }
g_list_free (cell_list); g_list_free (cell_list);
......
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