[gnumeric] Applix: fix sheet size.



commit 6a2b4f5539d0f559512b4615d0a58402b11a1e43
Author: Morten Welinder <terra gnome org>
Date:   Tue Apr 28 13:34:47 2009 -0400

    Applix: fix sheet size.
---
 NEWS                         |    1 +
 plugins/applix/ChangeLog     |    5 +++++
 plugins/applix/applix-read.c |    5 ++++-
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index ceb0b01..5e21668 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ Morten:
 	* Fix global-name .gnumeric warning.  [#580227]
 	* Fix tooltip positioning.  [#580358]
 	* Fix xlst export problem.  [#580360]
+	* Fix size of sheets loaded from Applix files.
 
 --------------------------------------------------------------------------
 Gnumeric 1.9.6
diff --git a/plugins/applix/ChangeLog b/plugins/applix/ChangeLog
index d338722..7e1dc51 100644
--- a/plugins/applix/ChangeLog
+++ b/plugins/applix/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-28  Morten Welinder  <terra gnome org>
+
+	* applix-read.c (applix_fetch_sheet): Make sheet big enough to
+	handle all columns.
+
 2009-04-25  Morten Welinder <terra gnome org>
 
 	* Release 1.9.6
diff --git a/plugins/applix/applix-read.c b/plugins/applix/applix-read.c
index 5571707..e0e59c7 100644
--- a/plugins/applix/applix-read.c
+++ b/plugins/applix/applix-read.c
@@ -908,7 +908,10 @@ applix_fetch_sheet (ApplixReadState *state, char const *name)
 	Sheet *sheet = workbook_sheet_by_name (state->wb, name);
 
 	if (sheet == NULL) {
-	  sheet = sheet_new (state->wb, name, GNM_DEFAULT_COLS, GNM_DEFAULT_ROWS);
+		int cols = APPLIX_SHEET_MAX_COLS;
+		int rows = APPLIX_SHEET_MAX_ROWS;
+		gnm_sheet_suggest_size (&cols, &rows);
+		sheet = sheet_new (state->wb, name, cols, rows);
 		workbook_sheet_attach (state->wb, sheet);
 		g_object_set (sheet, "zoom-factor", state->zoom / 100.0, NULL);
 		sheet_flag_recompute_spans (sheet);



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