[gnumeric] xlsx: don't try to write missing axis.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xlsx: don't try to write missing axis.
- Date: Mon, 27 Apr 2015 21:41:15 +0000 (UTC)
commit 2df935cc0672c7a3cbea3a73877cc9c302c745ac
Author: Morten Welinder <terra gnome org>
Date: Mon Apr 27 17:41:00 2015 -0400
xlsx: don't try to write missing axis.
plugins/excel/xlsx-write-drawing.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/plugins/excel/xlsx-write-drawing.c b/plugins/excel/xlsx-write-drawing.c
index 99a9be5..a635a87 100644
--- a/plugins/excel/xlsx-write-drawing.c
+++ b/plugins/excel/xlsx-write-drawing.c
@@ -1162,8 +1162,10 @@ xlsx_write_one_plot (XLSXWriteState *state, GsfXMLOut *xml,
for (i = 0; i < 3; i++) {
if (axis_type[i] != GOG_AXIS_UNKNOWN) {
GogAxis *axis = gog_plot_get_axis (GOG_PLOT (plot), axis_type[i]);
- xlsx_write_chart_uint (xml, "c:axId", xlsx_get_axid (state, axis));
- axes = g_slist_append (axes, axis);
+ if (axis) {
+ xlsx_write_chart_uint (xml, "c:axId", xlsx_get_axid (state, axis));
+ axes = g_slist_append (axes, axis);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]