[gnumeric: 2/3] 2009-05-13 Andreas J. Guelzow <aguelzow pyrshep ca>



commit 795e152c63bb11f80275cc605e3cc68d780da37d
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Wed May 13 15:37:33 2009 -0600

    2009-05-13  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-write.c (odf_write_sheet): we need to write at least one
    	  cell per row.
---
 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-write.c |    9 +++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 1c66631..cf60b43 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,10 @@
 2009-05-13  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* openoffice-write.c (odf_write_sheet): we need to write at least one
+	  cell per row.
+
+2009-05-13  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* openoffice-write.c (odf_write_cell): also write unformatted text
 	
 2009-05-12  Andreas J. Guelzow <aguelzow pyrshep ca>
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 1bc46d2..c692418 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -686,8 +686,11 @@ odf_write_sheet (GnmOOExport *state, Sheet const *sheet)
 	if (extent.start.row > 0) {
 		/* We need to write a bunch of empty rows !*/
 		gsf_xml_out_start_element (state->xml, TABLE "table-row");
-		gsf_xml_out_add_int (state->xml, TABLE "number-rows-repeated",
-				     extent.start.row);
+		if (extent.start.row > 1)
+			gsf_xml_out_add_int (state->xml, TABLE "number-rows-repeated",
+					     extent.start.row);
+		gsf_xml_out_start_element (state->xml, TABLE "table-cell");
+		gsf_xml_out_end_element (state->xml);   /* table-cell */
 		gsf_xml_out_end_element (state->xml);   /* table-row */
 	}
 
@@ -729,6 +732,8 @@ odf_write_sheet (GnmOOExport *state, Sheet const *sheet)
 			odf_write_cell (state, current_cell, merge_range, cc);
 
 		}
+		if (null_cell > 0)
+			odf_write_empty_cell (state, &null_cell);
 		if (covered_cell > 0)
 			odf_write_covered_cell (state, &covered_cell);
 



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