[gnumeric] Cleanup.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Cleanup.
- Date: Thu, 23 Apr 2009 08:22:28 -0400 (EDT)
commit 212c54ef4b04f88fbf43f1e5334c3cc0d9de219e
Author: Morten Welinder <terra gnome org>
Date: Thu Apr 23 08:21:31 2009 -0400
Cleanup.
---
src/sheet.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/sheet.c b/src/sheet.c
index a8b3631..dfd3565 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -642,13 +642,11 @@ gnm_sheet_constructor (GType type,
/* Now sheet_type, max_cols, and max_rows have been set. */
sheet->being_constructed = FALSE;
- sheet->priv->reposition_objects.col = sheet->max_cols;
- g_ptr_array_set_size (sheet->cols.info,
- COLROW_SEGMENT_INDEX (sheet->max_cols - 1) + 1);
+ colrow_resize (&sheet->cols, sheet->max_cols);
+ colrow_resize (&sheet->rows, sheet->max_rows);
+ sheet->priv->reposition_objects.col = sheet->max_cols;
sheet->priv->reposition_objects.row = sheet->max_rows;
- g_ptr_array_set_size (sheet->rows.info,
- COLROW_SEGMENT_INDEX (sheet->max_rows - 1) + 1);
range_init_full_sheet (&sheet->priv->unhidden_region, sheet);
sheet_style_init (sheet);
@@ -1112,6 +1110,7 @@ gnm_sheet_resize_main (Sheet *sheet, int cols, int rows,
return;
/* ---------------------------------------- */
+ /* Remove the columns and rows that will disappear. */
if (cols < old_cols) {
GOUndo *u = NULL;
@@ -1138,10 +1137,14 @@ gnm_sheet_resize_main (Sheet *sheet, int cols, int rows,
}
/* ---------------------------------------- */
+ /* Resize column and row containers. */
colrow_resize (&sheet->cols, cols);
colrow_resize (&sheet->rows, rows);
+ /* ---------------------------------------- */
+ /* Resize the dependency containers. */
+
{
GSList *l, *linked = NULL;
/* FIXME: what about dependents in other workbooks? */
@@ -1188,6 +1191,8 @@ gnm_sheet_resize_main (Sheet *sheet, int cols, int rows,
*pundo = go_undo_combine (*pundo, u);
}
+ range_init_full_sheet (&sheet->priv->unhidden_region, sheet);
+
sheet_redraw_all (sheet, TRUE);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]