[gnumeric] xlsx: export tick marks.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xlsx: export tick marks.
- Date: Tue, 27 Jan 2015 02:38:00 +0000 (UTC)
commit 49950b313b886e0dab59b425ab47d3835d9977d0
Author: Morten Welinder <terra gnome org>
Date: Mon Jan 26 21:09:32 2015 -0500
xlsx: export tick marks.
NEWS | 1 +
plugins/excel/xlsx-write-drawing.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index e823e8b..9c7cd1b 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Morten:
* Fix gda plugin compilation. [#743506]
* Fix xlsx export problem with auto markers.
* Import/export xlsx chart axis min/max/steps.
+ * Export xlsx chart axis tick marks.
--------------------------------------------------------------------------
Gnumeric 1.12.19
diff --git a/plugins/excel/xlsx-write-drawing.c b/plugins/excel/xlsx-write-drawing.c
index e4a68b4..82def5a 100644
--- a/plugins/excel/xlsx-write-drawing.c
+++ b/plugins/excel/xlsx-write-drawing.c
@@ -436,6 +436,22 @@ xlsx_write_axis (XLSXWriteState *state, GsfXMLOut *xml, GogAxis *axis, GogAxisTy
gsf_xml_out_add_cstr (xml, "formatCode", (format)? go_format_as_XL (format): "General");
gsf_xml_out_end_element (xml);
+ {
+ gboolean mati, miti, mato, mito;
+ static const char *marks[4] = { "none", "in", "out", "cross" };
+
+ g_object_get (G_OBJECT (axis),
+ "major-tick-in", &mati,
+ "minor-tick-in", &miti,
+ "major-tick-out", &mato,
+ "minor-tick-out", &mito,
+ 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]);
+ }
+
xlsx_write_go_style (xml, go_styled_object_get_style (GO_STYLED_OBJECT (axis)));
xlsx_write_chart_int (xml, "c:crossAx", 0, xlsx_get_axid (state, crossed));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]