gnumeric r17289 - trunk/plugins/excel



Author: mortenw
Date: Thu Apr  2 19:19:51 2009
New Revision: 17289
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17289&view=rev

Log:
2009-04-02  Morten Welinder  <terra gnome org>

	* ms-excel-write.c (excel_sheet_new): Limit maxcols to what we
	actually have.  Fixes #577758.



Modified:
   trunk/plugins/excel/ChangeLog
   trunk/plugins/excel/ms-excel-write.c

Modified: trunk/plugins/excel/ms-excel-write.c
==============================================================================
--- trunk/plugins/excel/ms-excel-write.c	(original)
+++ trunk/plugins/excel/ms-excel-write.c	Thu Apr  2 19:19:51 2009
@@ -4988,7 +4988,8 @@
 excel_sheet_new (ExcelWriteState *ewb, Sheet *sheet,
 		 gboolean biff7, gboolean biff8)
 {
-	int const maxrows = biff7 ? XLS_MaxRow_V7 : XLS_MaxRow_V8;
+	int const maxrows = MIN (biff7 ? XLS_MaxRow_V7 : XLS_MaxRow_V8,
+				 gnm_sheet_get_max_rows (sheet));
 	ExcelWriteSheet *esheet = g_new0 (ExcelWriteSheet, 1);
 	GnmRange extent;
 	GSList *objs, *img;



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