[gnumeric] Fix ODF export of files with large formatted sheets. [#634135]



commit b16d9174b1d5d95407eba6f897de72a195013d87
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Fri Nov 5 22:52:47 2010 -0600

    Fix ODF export of files with large formatted sheets. [#634135]
    
    2010-11-05  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-write.c (odf_write_sheet): get the correct extent
    	Fixes [#634135]

 NEWS                                  |    1 +
 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-write.c |   14 +-------------
 3 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/NEWS b/NEWS
index 868bfe3..7c64dfd 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Andreas:
 	* Add menu items to remove and add manual page breaks.
 	* Improve the sc import.
 	* Fix button sensitivity in sort dialog. [#632999]
+	* Fix ODF export of files with large formatted sheets. [#634135]
 
 Hans de Goede:
 	* Fix import of dib format images in XLS. [#553098]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index a7956f4..9450790 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-05  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* openoffice-write.c (odf_write_sheet): get the correct extent
+	Fixes [#634135]
+
 2010-10-04  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* openoffice-read.c (od_draw_control_start): use oc->as_index
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index b0718ff..184562c 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -3279,24 +3279,12 @@ odf_write_sheet (GnmOOExport *state)
 	int max_rows = gnm_sheet_get_max_rows (sheet);
 	GnmStyle **col_styles = g_new0 (GnmStyle *, max_cols);
 	GnmRange extent, style_extent;
-	int i;
 	GSList *sheet_merges = NULL;
 	GnmPageBreaks *pb = sheet->print_info->page_breaks.v;
 	extent = sheet_get_extent (sheet, FALSE);
 
-	/* include collapsed or hidden cols and rows */
-	for (i = max_rows ; i-- > extent.end.row ; )
-		if (!colrow_is_empty (sheet_row_get (sheet, i))) {
-			extent.end.row = i;
-			break;
-		}
-	for (i = max_cols ; i-- > extent.end.col ; )
-		if (!colrow_is_empty (sheet_col_get (sheet, i))) {
-			extent.end.col = i;
-			break;
-		}
-
 	style_extent = extent;
+	/* We only want to get the common column style */
 	sheet_style_get_extent (sheet, &style_extent, col_styles);
 
 	/* ODF does not allow us to mark soft page breaks between columns */



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