[gnumeric] fix validation of ODF export



commit 0b607e490c893f01abc566e83e1ffddd08f0042b
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Sat Mar 15 17:43:44 2014 -0600

    fix validation of ODF export
    
    2014-03-15  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-write.c (odf_write_style_paragraph_properties): only
        use LO's extension if we are in fact using extensions

 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-write.c |   10 ++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index d662428..84a400d 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-15  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-write.c (odf_write_style_paragraph_properties): only
+       use LO's extension if we are in fact using extensions
+
 2014-03-14  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-read.c (odf_style_load_two_values): do not force
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index cb088c9..d3e8251 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -1390,10 +1390,12 @@ odf_write_style_paragraph_properties (GnmOOExport *state, GnmStyle const *style)
                }
                if (align != GNM_HALIGN_GENERAL && align != GNM_HALIGN_FILL)
                        gsf_xml_out_add_cstr (state->xml, FOSTYLE "text-align", alignment);
-               if (gnum_specs && state->with_extension)
-                       gsf_xml_out_add_int (state->xml, GNMSTYLE "GnmHAlign", align);
-               if (align == GNM_HALIGN_DISTRIBUTED)
-                       gsf_xml_out_add_cstr (state->xml, CSS "text-justify", "distribute");
+               if (state->with_extension) {
+                       if (gnum_specs)
+                               gsf_xml_out_add_int (state->xml, GNMSTYLE "GnmHAlign", align);
+                       if (align == GNM_HALIGN_DISTRIBUTED)
+                               gsf_xml_out_add_cstr (state->xml, CSS "text-justify", "distribute");
+               }
        }
 
 /* Text Indent */


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