Commit 6688a4fc authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg
Browse files

fix the problem with undo ins/del row/col in empty sheets.

2000-01-26  Jody Goldberg <jgoldberg@home.com>

	* src/sheet.c (sheet_{insert,delete}_{cols,rows}) : Do the
	  insert/delete even if it looks like there are no cells there.
	  There may be styles.
parent 5c651abc
2000-01-26 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_{insert,delete}_{cols,rows}) : Do the
insert/delete even if it looks like there are no cells there.
There may be styles.
2000-01-27 Michael Meeks <mmeeks@gnu.org>
* src/sheet-object.c (sheet_object_drop_file): fix typo.
......
2000-01-26 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_{insert,delete}_{cols,rows}) : Do the
insert/delete even if it looks like there are no cells there.
There may be styles.
2000-01-27 Michael Meeks <mmeeks@gnu.org>
* src/sheet-object.c (sheet_object_drop_file): fix typo.
......
......@@ -3332,10 +3332,6 @@ sheet_insert_cols (CommandContext *context, Sheet *sheet,
g_return_val_if_fail (IS_SHEET (sheet), TRUE);
g_return_val_if_fail (count != 0, TRUE);
/* Is there any work to do? */
if (sheet->cols.max_used < 0)
return FALSE;
/* 0. Walk cells in displaced col and ensure arrays aren't divided. */
if (col > 0) /* No need to test leftmost column */
if (sheet_cell_foreach_range (sheet, TRUE, col, 0,
......@@ -3404,10 +3400,6 @@ sheet_delete_cols (CommandContext *context, Sheet *sheet,
g_return_val_if_fail (IS_SHEET (sheet), TRUE);
g_return_val_if_fail (count != 0, TRUE);
/* Is there any work to do? */
if (sheet->cols.max_used < 0)
return FALSE;
/* 0. Walk cells in deleted cols and ensure arrays aren't divided. */
if (!sheet_check_for_partial_array (sheet, 0, col,
SHEET_MAX_ROWS-1, col+count-1))
......@@ -3474,10 +3466,6 @@ sheet_insert_rows (CommandContext *context, Sheet *sheet,
g_return_val_if_fail (IS_SHEET (sheet), TRUE);
g_return_val_if_fail (count != 0, TRUE);
/* Is there any work to do? */
if (sheet->rows.max_used < 0)
return FALSE;
/* 0. Walk cells in displaced row and ensure arrays aren't divided. */
if (row > 0) /* No need to test leftmost column */
if (sheet_cell_foreach_range (sheet, TRUE,
......@@ -3547,10 +3535,6 @@ sheet_delete_rows (CommandContext *context, Sheet *sheet,
g_return_val_if_fail (IS_SHEET (sheet), TRUE);
g_return_val_if_fail (count != 0, TRUE);
/* Is there any work to do? */
if (sheet->rows.max_used < 0)
return FALSE;
/* 0. Walk cells in deleted rows and ensure arrays aren't divided. */
if (!sheet_check_for_partial_array (sheet, row, 0,
row+count-1, SHEET_MAX_COLS-1))
......
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