[gnumeric] Fix ODF export of fill colour and type.



commit 1d3ec0e919fb6bf301e9185ba801b9c2a19b9cee
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Sat Feb 7 16:02:14 2015 -0700

    Fix ODF export of fill colour and type.
    
    2015-02-07  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-write.c (odf_write_gog_style_graphic): we need to write fill colour
        info even if auto-type == TRUE since nobody else understands auto-type

 NEWS                                  |    1 +
 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-write.c |    8 +++++---
 3 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index e444cd3..129230f 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Andreas:
        * ODF import/export general plot data specifications. [#743818]
        * ODF import/export the z-index for line objects.
        * Fix ODF import of stroke colours of sheet objects.
+       * Fix ODF export of fill colour and type.
 
 Morten:
        * Initial xlsx import of sheet widgets.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 687d45b..7ae5fab 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,10 @@
 2015-02-07  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+       * openoffice-write.c (odf_write_gog_style_graphic): we need to write fill colour
+       info even if auto-type == TRUE since nobody else understands auto-type
+
+2015-02-07  Andreas J. Guelzow <aguelzow pyrshep ca>
+
        * openoffice-read.c (odf_apply_style_props): add argument and evaluate depending
        on whether we are in a chart context. Change all callers.
 
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index ea9fe34..b59c259 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -7401,9 +7401,11 @@ odf_write_gog_style_graphic (GnmOOExport *state, GOStyle const *style, gboolean
        if (!style)
                return;
 
-       if (state->with_extension && style->fill.auto_type) {
-               odf_add_bool (state->xml, GNMSTYLE "auto-type", TRUE);
-       } else {
+       if (style->interesting_fields & (GO_STYLE_FILL)) {
+               if (state->with_extension && style->fill.auto_type) {
+                       odf_add_bool (state->xml, GNMSTYLE "auto-type", TRUE);
+               }
+               /* We need to write our colours even for auto_type == TRUE since nobody else understands this 
*/
                switch (style->fill.type) {
                case GO_STYLE_FILL_NONE:
                        gsf_xml_out_add_cstr (state->xml, DRAW "fill", "none");


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