[gnumeric] sc: import columns up to ZZ.



commit 467a10a20fc9168e82a41d34b4af94afcd872417
Author: Morten Welinder <terra gnome org>
Date:   Sat Feb 5 11:21:46 2011 -0500

    sc: import columns up to ZZ.

 NEWS                 |    3 +++
 plugins/sc/ChangeLog |    4 ++++
 plugins/sc/sc.c      |   12 +++++++++++-
 3 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 2369efe..ff68370 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 Gnumeric 1.10.14
 
+Morten:
+	* Import wide sc files.  [#641581]
+
 --------------------------------------------------------------------------
 Gnumeric 1.10.13
 
diff --git a/plugins/sc/ChangeLog b/plugins/sc/ChangeLog
index cf09995..00f4647 100644
--- a/plugins/sc/ChangeLog
+++ b/plugins/sc/ChangeLog
@@ -1,3 +1,7 @@
+2011-02-05  Morten Welinder  <terra gnome org>
+
+	* sc.c (sc_file_open): Support columns up to ZZ.  Fixes #641581.
+
 2011-02-02  Morten Welinder <terra gnome org>
 
 	* Release 1.10.13
diff --git a/plugins/sc/sc.c b/plugins/sc/sc.c
index 1a6a8df..050f116 100644
--- a/plugins/sc/sc.c
+++ b/plugins/sc/sc.c
@@ -994,10 +994,20 @@ sc_file_open (GOFileOpener const *fo, GOIOContext *io_context,
 	char      *name;
 	GOErrorInfo *error;
 	ScParseState state;
+	int cols, rows;
 
 	wb = wb_view_get_workbook (wb_view);
 	name = workbook_sheet_get_free_name (wb, "SC", FALSE, TRUE);
-	state.sheet = sheet_new (wb, name, 256, 65536);
+
+	 /*
+	  * A through ZZ although the source suggests that a few are not
+	  * actually valid.  "PI", for example.
+	  */
+	cols = 702;
+	rows = 65536;
+	gnm_sheet_suggest_size (&cols, &rows);
+	state.sheet = sheet_new (wb, name, cols, rows);
+
 	g_free (name);
 	workbook_sheet_attach (wb, state.sheet);
 



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