[gnumeric] export chart grids to ODF
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] export chart grids to ODF
- Date: Wed, 18 Aug 2010 00:07:51 +0000 (UTC)
commit d73d85073a8c5d6032b34241ec38cd1d99bdd36d
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Tue Aug 17 18:07:26 2010 -0600
export chart grids to ODF
2010-08-17 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_one_axis_grid): new
(odf_write_axis_grid): new
(odf_write_axis): call odf_write_axis_grid
plugins/openoffice/ChangeLog | 6 ++++++
plugins/openoffice/openoffice-write.c | 22 ++++++++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 39415e4..7b92c83 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,11 @@
2010-08-17 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * openoffice-write.c (odf_write_one_axis_grid): new
+ (odf_write_axis_grid): new
+ (odf_write_axis): call odf_write_axis_grid
+
+2010-08-17 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* openoffice-read.c (od_chart_axis_categories): new
(oo_plot_series): use the chart:categories
(oo_chart_end): new
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 370ebca..17786c7 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -3755,6 +3755,27 @@ odf_write_surface_axes_styles (GnmOOExport *state, GogObject const *chart,
odf_write_standard_axes_styles (state, chart, plot);
}
+static void
+odf_write_one_axis_grid (GnmOOExport *state, GogObject const *axis,
+ char const *role, char const *class)
+{
+ GogObject const *grid;
+
+ grid = gog_object_get_child_by_name (axis, role);
+ if (grid) {
+ gsf_xml_out_start_element (state->xml, CHART "grid");
+ gsf_xml_out_add_cstr (state->xml, CHART "class", class);
+ gsf_xml_out_end_element (state->xml); /* </chart:grid> */
+ }
+}
+
+static void
+odf_write_axis_grid (GnmOOExport *state, GogObject const *axis)
+{
+ odf_write_one_axis_grid (state, axis, "MajorGrid", "major");
+ odf_write_one_axis_grid (state, axis, "MinorGrid", "minor");
+}
+
static void
odf_write_axis (GnmOOExport *state, GogObject const *chart, char const *axis_role,
@@ -3771,6 +3792,7 @@ odf_write_axis (GnmOOExport *state, GogObject const *chart, char const *axis_rol
gsf_xml_out_start_element (state->xml, CHART "axis");
gsf_xml_out_add_cstr (state->xml, CHART "dimension", dimension);
gsf_xml_out_add_cstr (state->xml, CHART "style-name", style_label);
+ odf_write_axis_grid (state, axis);
gsf_xml_out_end_element (state->xml); /* </chart:axis> */
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]