[gnumeric] ODF import/export major & minor chart axis tick marks.
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] ODF import/export major & minor chart axis tick marks.
- Date: Tue, 27 Jan 2015 05:26:12 +0000 (UTC)
commit d50b7589bd0e71279c268ee4262b00f93c9bc451
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Mon Jan 26 22:24:26 2015 -0700
ODF import/export major & minor chart axis tick marks.
2015-01-26 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_plot_style): correctly write chart lines
(odf_write_axis_style): add minor & major tick handling
* openoffice-read.c (od_style_prop_chart): add minor & major tick handling
NEWS | 1 +
plugins/openoffice/ChangeLog | 6 ++++++
plugins/openoffice/openoffice-read.c | 12 ++++++++++++
plugins/openoffice/openoffice-write.c | 11 ++++++++++-
4 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 9c7cd1b..911d8db 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Gnumeric 1.12.20
Andreas:
* ODF import/export trendline names. [#743448]
* ODF import/export trendline affinity & dimensions.
+ * ODF import/export major & minor chart axis tick marks.
Morten:
* xlsx chart import: fix font family name.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index b6c7ad8..9838203 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,11 @@
2015-01-26 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * openoffice-write.c (odf_write_plot_style): correctly write chart lines
+ (odf_write_axis_style): add minor & major tick handling
+ * openoffice-read.c (od_style_prop_chart): add minor & major tick handling
+
+2015-01-26 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* openoffice-write.c (odf_write_lin_reg): write
loext:regression-max-degree
(odf_write_polynom_reg): ditto
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 5008e16..78c8322 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -7295,6 +7295,18 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "auto-width", &btmp))
style->style_props = g_slist_prepend (style->style_props,
oo_prop_new_bool ("gnm-auto-width", btmp));
+ else if (oo_attr_bool (xin, attrs, OO_NS_CHART, "tick-marks-major-inner", &btmp))
+ style->axis_props = g_slist_prepend (style->axis_props,
+ oo_prop_new_bool ("major-tick-in", btmp));
+ else if (oo_attr_bool (xin, attrs, OO_NS_CHART, "tick-marks-major-outer", &btmp))
+ style->axis_props = g_slist_prepend (style->axis_props,
+ oo_prop_new_bool ("major-tick-out", btmp));
+ else if (oo_attr_bool (xin, attrs, OO_NS_CHART, "tick-marks-minor-inner", &btmp))
+ style->axis_props = g_slist_prepend (style->axis_props,
+ oo_prop_new_bool ("minor-tick-in", btmp));
+ else if (oo_attr_bool (xin, attrs, OO_NS_CHART, "tick-marks-minor-outer", &btmp))
+ style->axis_props = g_slist_prepend (style->axis_props,
+ oo_prop_new_bool ("minor-tick-out", btmp));
}
if ((stacked_set && !overlap_set) ||
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index ee010ac..9a5045a 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -6720,7 +6720,7 @@ odf_write_plot_style (GnmOOExport *state, GogObject const *plot)
else
odf_add_bool (state->xml, CHART "three-dimensional", FALSE);
- odf_add_bool (state->xml, CHART "lines", FALSE);
+ odf_write_plot_style_bool (state->xml, plot, "default-style-has-lines", CHART "lines");
if (state->with_extension) {
if (0 == strcmp ( "XLSurfacePlot", plot_type))
@@ -6835,6 +6835,15 @@ odf_write_axis_style (GnmOOExport *state, G_GNUC_UNUSED GOStyle const *style,
}
}
}
+ odf_write_plot_style_bool
+ (state->xml, axis, "major-tick-in", CHART "tick-marks-major-inner");
+ odf_write_plot_style_bool
+ (state->xml, axis, "major-tick-out", CHART "tick-marks-major-outer");
+ odf_write_plot_style_bool
+ (state->xml, axis, "minor-tick-in", CHART "tick-marks-minor-inner");
+ odf_write_plot_style_bool
+ (state->xml, axis, "minor-tick-out", CHART "tick-marks-minor-outer");
+
if (state->odf_version > 101)
odf_write_plot_style_bool
(state->xml, axis,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]