[gnumeric] improve auto_fore for hatches in ODF esport/import



commit 70e467746ec4003efdb2eefeccb429c5e8ce7b4f
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Mon Apr 13 01:27:16 2015 -0600

    improve auto_fore for hatches in ODF esport/import
    
    2015-04-13  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-read.c (odf_apply_style_props): for hatch use
        auto_color to set auto_fore
        * openoffice-write.c (odf_write_gog_style_graphic): write
        auto_fore as auto-color

 plugins/openoffice/ChangeLog          |    7 +++++++
 plugins/openoffice/openoffice-read.c  |    2 +-
 plugins/openoffice/openoffice-write.c |    2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 2f8bc0b..80e7446 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,10 @@
+2015-04-13  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-read.c (odf_apply_style_props): for hatch use
+       auto_color to set auto_fore
+       * openoffice-write.c (odf_write_gog_style_graphic): write
+       auto_fore as auto-color
+
 2015-04-12  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-write.c (odf_write_generic_axis): deleted
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index ef30b76..da63faf 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -1061,7 +1061,7 @@ odf_apply_style_props (GsfXMLIn *xin, GSList *props, GOStyle *style, gboolean in
                                                   " encountered!"), hatch_name);
                        else {
                                style->fill.pattern.fore = pat->fore;
-                               style->fill.auto_fore = FALSE;
+                               style->fill.auto_fore = gnm_auto_color_value_set && gnm_auto_color_value;
                                style->fill.pattern.pattern =  (gnm_hatch > 0) ?
                                        gnm_hatch : pat->pattern;
                        }
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 44b5e50..887d1ff 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -7564,7 +7564,7 @@ odf_write_gog_style_graphic (GnmOOExport *state, GOStyle const *style, gboolean
                                g_free (s);                             
                        }
                } else if (state->with_extension)
-                       odf_add_bool (state->xml, GNMSTYLE "auto-color", TRUE);
+                       odf_add_bool (state->xml, GNMSTYLE "auto-color", style->fill.auto_fore);
                if (state->with_extension && (style->interesting_fields & GO_STYLE_MARKER)) {
                        odf_add_bool (state->xml, GNMSTYLE "auto-marker-outline-colour", 
                                      style->marker.auto_outline_color);


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