[gnumeric] Fix ODF style export for data points in plots. [#745091]



commit 78e62387454b9f81d9156de4ef7285cf9f7c5d41
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Wed Feb 25 21:59:26 2015 -0700

    Fix ODF style export for data points in plots. [#745091]
    
    2015-02-25  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-write.c (odf_write_gog_style_graphic): write colours also
        when we have a marker
        (odf_write_gog_style_chart): write markers more often!

 NEWS                                  |    1 +
 plugins/openoffice/ChangeLog          |    6 ++++++
 plugins/openoffice/openoffice-write.c |   23 +++++++++++++----------
 3 files changed, 20 insertions(+), 10 deletions(-)
---
diff --git a/NEWS b/NEWS
index 0925f28..e457355 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Andreas:
        * Fix ODF import/export of fonts in charts. [#744632]
        * ODF import/export additional axes. [#743787]
        * Fix ODF style import of secondary plots. [#744930]
+       * Fix ODF style export for data points in plots. [#745091]
 
 Morten:
        * Implement xlsx import of sheet widgets.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 0f2fc88..6adf05e 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-25  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-write.c (odf_write_gog_style_graphic): write colours also
+       when we have a marker
+       (odf_write_gog_style_chart): write markers more often!
+
 2015-02-21  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-read.c (od_style_prop_chart): without a stroke style and
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 1e4d841..646005b 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -7530,7 +7530,7 @@ odf_write_gog_style_graphic (GnmOOExport *state, GOStyle const *style, gboolean
                }
        }
 
-       if (style->interesting_fields & (GO_STYLE_LINE | GO_STYLE_OUTLINE)) {
+       if (style->interesting_fields & (GO_STYLE_LINE | GO_STYLE_OUTLINE | GO_STYLE_MARKER)) {
                GOLineDashType dash_type = style->line.dash_type;
                gboolean has_line = go_style_is_line_visible (style);
                gboolean is_auto;
@@ -7724,15 +7724,18 @@ odf_write_gog_style_chart (GnmOOExport *state, GOStyle const *style, GogObject c
                const char *symbol_type = NULL;
 
                if (style->marker.auto_shape) {
-                       GogPlot *plot = GOG_IS_SERIES (obj)
-                               ? gog_series_get_plot (GOG_SERIES (obj))
-                               : NULL;
-                       gboolean has_marker;
-
-                       if (gnm_object_has_readable_prop
-                           (plot, "default-style-has-markers",
-                            G_TYPE_BOOLEAN, &has_marker) &&
-                           has_marker)
+                       if (GOG_IS_SERIES (obj)) {
+                               GogPlot *plot = gog_series_get_plot (GOG_SERIES (obj));
+                               gboolean has_marker = TRUE;
+                               
+                               if (gnm_object_has_readable_prop
+                                   (plot, "default-style-has-markers",
+                                    G_TYPE_BOOLEAN, &has_marker)) {
+                                       if (has_marker)
+                                               symbol_type = "automatic";
+                               } else
+                                       symbol_type = "automatic";
+                       } else
                                symbol_type = "automatic";
                } else {
                        GOMarkerShape m = go_marker_get_shape (marker);


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