[gnumeric] SheetStyle: Strengthen sanity check and fix tile_widths/tile_heights.



commit b0367c5a2fe4b98723baf610d93441ab6a228639
Author: Morten Welinder <terra gnome org>
Date:   Fri May 1 12:42:31 2009 -0400

    SheetStyle: Strengthen sanity check and fix tile_widths/tile_heights.
---
 ChangeLog         |    1 +
 src/sheet-style.c |   10 ++++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 25dcf4d..bd19a19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
 	* src/sheet-style.c (sheet_style_sanity_check): New function.
 	(sheet_style_init): Call sheet_style_sanity_check.
+	(tile_widths, tile_heights): Add extra element.
 
 2009-05-01  Andreas J. Guelzow <aguelzow pyrshep ca>
 
diff --git a/src/sheet-style.c b/src/sheet-style.c
index 2d88693..496a6a2 100644
--- a/src/sheet-style.c
+++ b/src/sheet-style.c
@@ -209,7 +209,8 @@ static int const tile_widths [] = {
 	TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL,
 	TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL,
 	TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL,
-	TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL
+	TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL,
+	TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL * TILE_SIZE_COL
 };
 static int const tile_heights [] = {
 	1,
@@ -218,7 +219,8 @@ static int const tile_heights [] = {
 	TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW,
 	TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW,
 	TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW,
-	TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW
+	TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW,
+	TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW * TILE_SIZE_ROW
 };
 
 typedef struct {
@@ -455,9 +457,9 @@ sheet_style_sanity_check (void)
 	}
 	g_assert (r >= GNM_MAX_ROWS);
 
-	g_assert (G_N_ELEMENTS (tile_heights) > TILE_TOP_LEVEL);
+	g_assert (G_N_ELEMENTS (tile_heights) > TILE_TOP_LEVEL + 1);
 
-	g_assert (G_N_ELEMENTS (tile_widths) > TILE_TOP_LEVEL);
+	g_assert (G_N_ELEMENTS (tile_widths) > TILE_TOP_LEVEL + 1);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]