[gnumeric] Don't dfdepend too much on gnm_cell_is_empty in ODF export.



commit b20f12042e702ae05e5fa19e3a34fa7d90c376d3
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Tue May 22 17:47:16 2012 -0600

    Don't dfdepend too much on gnm_cell_is_empty in ODF export.
    
    2012-05-22  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-write.c (odf_write_content_rows): note that gnm_cell_is_empty
    	may return TRUE for cells with expression, so we need to check this

 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-write.c |    3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index abe09af..03e7817 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,10 @@
 2012-05-22  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* openoffice-write.c (odf_write_content_rows): note that gnm_cell_is_empty
+	may return TRUE for cells with expression, so we need to check this
+
+2012-05-22  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* openoffice-read.c (oo_add_text_to_cell): even add empty strings
 	* openoffice-write.c (odf_write_cell): write text:p also for empty
 	strings
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index a5822a4..8710085 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -3562,7 +3562,8 @@ odf_write_content_rows (GnmOOExport *state, Sheet const *sheet, int from, int to
 
 			objects = odf_sheet_objects_get (sheet, &pos);
 
-			if ((merge_range == NULL) && (objects == NULL) &&
+			if ((!(current_cell && gnm_cell_has_expr(current_cell))) && 
+			    (merge_range == NULL) && (objects == NULL) &&
 			    gnm_cell_is_empty (current_cell) &&
 			    NULL == gnm_style_get_hlink
 			    ((this_style = sheet_style_get (sheet, pos.col, pos.row)))) {



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