[gnumeric] xlsx: add leak check.



commit e91f0142699e194f4ec991bc03cb913579fe7cac
Author: Morten Welinder <terra gnome org>
Date:   Mon Feb 2 20:11:07 2015 -0500

    xlsx: add leak check.

 plugins/excel/ChangeLog           |    2 ++
 plugins/excel/xlsx-read-drawing.c |   10 ++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 8aa0828..c96ffb2 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,7 @@
 2015-02-02  Morten Welinder  <terra gnome org>
 
+       * xlsx-read-drawing.c (xlsx_chart_push_obj): Optionally check for leaks.
+
        * xlsx-write-drawing.c (xlsx_write_axis): Make axis visible.
 
 2015-02-01  Morten Welinder  <terra gnome org>
diff --git a/plugins/excel/xlsx-read-drawing.c b/plugins/excel/xlsx-read-drawing.c
index b43e5a4..408370c 100644
--- a/plugins/excel/xlsx-read-drawing.c
+++ b/plugins/excel/xlsx-read-drawing.c
@@ -40,6 +40,15 @@ xlsx_chart_push_obj (XLSXReadState *state, GogObject *obj)
 #if 0
        g_print ("push %s\n", G_OBJECT_TYPE_NAME (obj));
 #endif
+       if (gnm_debug_flag ("leaks")) {
+               if (obj) {
+                       const char *name = gog_object_get_name (obj);
+                       go_debug_check_finalized (obj, name);
+               }
+               if (state->cur_style) {
+                       go_debug_check_finalized (state->cur_style, "Anonymous style");
+               }
+       }
 }
 
 static void
@@ -2104,6 +2113,7 @@ GSF_XML_IN_NODE_FULL (START, CHART_SPACE, XL_NS_CHART, "chartSpace", GSF_XML_NO_
         GSF_XML_IN_NODE (SCATTER, PLOT_AXIS_ID, XL_NS_CHART,           "axId", GSF_XML_NO_CONTENT, 
&xlsx_plot_axis_id, NULL),
 
         GSF_XML_IN_NODE (SCATTER, SERIES, XL_NS_CHART, "ser", GSF_XML_NO_CONTENT, &xlsx_chart_ser_start, 
&xlsx_chart_ser_end),
+         GSF_XML_IN_NODE (SERIES, SERIES_INVERTIFNEG, XL_NS_CHART,     "invertIfNegative", 
GSF_XML_NO_CONTENT, NULL, NULL),
           GSF_XML_IN_NODE (SERIES, SERIES_TRENDLINE, XL_NS_CHART,      "trendline", GSF_XML_NO_CONTENT, 
&xlsx_ser_trendline_start, &xlsx_ser_trendline_end),
             GSF_XML_IN_NODE (SERIES_TRENDLINE, SERIES_TRENDLINE_NAME, XL_NS_CHART, "name", GSF_XML_CONTENT, 
NULL, &xlsx_ser_trendline_name),
             GSF_XML_IN_NODE (SERIES_TRENDLINE, SHAPE_PR, XL_NS_CHART, "spPr", GSF_XML_NO_CONTENT, NULL, 
NULL), /* 2nd Def */


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