[gnumeric] xlsx: fix export of unlabelled axes.



commit 9b43de7efe471b5835b6a1c5efb33166fbac2a85
Author: Morten Welinder <terra gnome org>
Date:   Tue Apr 21 14:59:58 2015 -0400

    xlsx: fix export of unlabelled axes.

 NEWS                               |    1 +
 plugins/excel/xlsx-write-drawing.c |    5 ++++-
 samples/graph-tests.gnumeric       |  Bin 13686 -> 13764 bytes
 3 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 83cceeb..07bfcc0 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Jean:
 
 Morten:
        * Fix import/export of graph backplane.
+       * Fix export of unlabelled axes.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.22
diff --git a/plugins/excel/xlsx-write-drawing.c b/plugins/excel/xlsx-write-drawing.c
index c566f24..9dd456d 100644
--- a/plugins/excel/xlsx-write-drawing.c
+++ b/plugins/excel/xlsx-write-drawing.c
@@ -783,7 +783,7 @@ xlsx_write_axis (XLSXWriteState *state, GsfXMLOut *xml, GogPlot *plot, GogAxis *
        gsf_xml_out_end_element (xml);
 
        {
-               gboolean mati, miti, mato, mito;
+               gboolean mati, miti, mato, mito, mal;
                static const char *marks[4] = { "none", "in", "out", "cross" };
 
                g_object_get (G_OBJECT (axis),
@@ -791,11 +791,14 @@ xlsx_write_axis (XLSXWriteState *state, GsfXMLOut *xml, GogPlot *plot, GogAxis *
                              "minor-tick-in", &miti,
                              "major-tick-out", &mato,
                              "minor-tick-out", &mito,
+                             "major-tick-labeled", &mal,
                              NULL);
                xlsx_write_chart_cstr_unchecked (xml, "c:majorTickMark",
                                                 marks[2 * mato + mati]);
                xlsx_write_chart_cstr_unchecked (xml, "c:minorTickMark",
                                                 marks[2 * mito + miti]);
+               if (!mal)
+                       xlsx_write_chart_cstr_unchecked (xml, "c:tickLblPos", "none");
        }
 
        xlsx_write_go_style (xml, state, go_styled_object_get_style (GO_STYLED_OBJECT (axis)));
diff --git a/samples/graph-tests.gnumeric b/samples/graph-tests.gnumeric
index 4ca2337..c81a0dd 100644
Binary files a/samples/graph-tests.gnumeric and b/samples/graph-tests.gnumeric differ


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