[gnumeric] xlsx: read minorgrid.



commit aaff97efe92304db50a52e91f8acb5ad1b43dfaf
Author: Morten Welinder <terra gnome org>
Date:   Thu Apr 17 11:13:19 2014 -0400

    xlsx: read minorgrid.

 NEWS                              |    1 +
 plugins/excel/ChangeLog           |    5 +++++
 plugins/excel/xlsx-read-drawing.c |   14 +++++++++-----
 3 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/NEWS b/NEWS
index fe3abc5..8a5d4b2 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Andreas:
 
 Morten:
        * For xlsx, don't complain over "ext" elements.
+       * xlsx graph import improvements.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.14
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 6c66884..633cfc7 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-17  Morten Welinder  <terra gnome org>
+
+       * xlsx-read-drawing.c (xlsx_chart_gridlines): Handle minorgrid
+       too.
+
 2014-04-16  Jean Brefort  <jean brefort normalesup org>
 
        * ms-chart.c (valuerange): ignore the cross value when auto crossing.
diff --git a/plugins/excel/xlsx-read-drawing.c b/plugins/excel/xlsx-read-drawing.c
index 3840911..2d836c7 100644
--- a/plugins/excel/xlsx-read-drawing.c
+++ b/plugins/excel/xlsx-read-drawing.c
@@ -618,9 +618,12 @@ static void
 xlsx_chart_gridlines (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs)
 {
        XLSXReadState *state = (XLSXReadState *)xin->user_state;
+       gboolean ismajor = xin->node->user_data.v_int;
        if (NULL != state->axis.obj) {
-               GogObject *grid = gog_object_add_by_name (
-                       GOG_OBJECT (state->axis.obj), "MajorGrid", NULL);
+               GogObject *grid = gog_object_add_by_name
+                       (GOG_OBJECT (state->axis.obj),
+                        ismajor ? "MajorGrid" : "MinorGrid",
+                        NULL);
                xlsx_chart_push_obj (state, grid);
        }
 }
@@ -1600,10 +1603,11 @@ GSF_XML_IN_NODE_FULL (START, CHART_SPACE, XL_NS_CHART, "chartSpace", GSF_XML_NO_
                                &xlsx_axis_bound, NULL, GOG_AXIS_ELEM_MAX),
           GSF_XML_IN_NODE (AXIS_SCALING, AX_LOG, XL_NS_CHART, "logBase", GSF_XML_NO_CONTENT, 
&xlsx_chart_logbase, NULL),
           GSF_XML_IN_NODE (AXIS_SCALING, AX_ORIENTATION, XL_NS_CHART, "orientation", GSF_XML_NO_CONTENT, 
&xlsx_axis_orientation, NULL),
-        GSF_XML_IN_NODE (CAT_AXIS, MAJOR_GRID, XL_NS_CHART, "majorGridlines", GSF_XML_NO_CONTENT,
-                        &xlsx_chart_gridlines, &xlsx_chart_pop),
+        GSF_XML_IN_NODE_FULL (CAT_AXIS, MAJOR_GRID, XL_NS_CHART, "majorGridlines", GSF_XML_NO_CONTENT,
+                             FALSE, FALSE, &xlsx_chart_gridlines, &xlsx_chart_pop, 1),
           GSF_XML_IN_NODE (MAJOR_GRID, SHAPE_PR, XL_NS_CHART, "spPr", GSF_XML_NO_CONTENT, NULL, NULL),       
  /* 2nd Def */
-        GSF_XML_IN_NODE (CAT_AXIS, MINOR_GRID, XL_NS_CHART, "minorGridlines", GSF_XML_NO_CONTENT, NULL, 
NULL),
+        GSF_XML_IN_NODE_FULL (CAT_AXIS, MINOR_GRID, XL_NS_CHART, "minorGridlines", GSF_XML_NO_CONTENT,
+                             FALSE, FALSE, &xlsx_chart_gridlines, &xlsx_chart_pop, 0),
           GSF_XML_IN_NODE (MINOR_GRID, SHAPE_PR, XL_NS_CHART, "spPr", GSF_XML_NO_CONTENT, NULL, NULL),       
  /* 2nd Def */
         GSF_XML_IN_NODE (CAT_AXIS, AXIS_POS, XL_NS_CHART, "axPos", GSF_XML_NO_CONTENT, &xlsx_axis_pos, NULL),
         GSF_XML_IN_NODE (CAT_AXIS, CAT_AXIS_TICKLBLPOS, XL_NS_CHART, "tickLblPos", GSF_XML_NO_CONTENT, 
&xslx_chart_tick_label_pos, NULL),


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