[gnumeric] Fix ODF export of serieslines styles.
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix ODF export of serieslines styles.
- Date: Sun, 8 Feb 2015 23:11:16 +0000 (UTC)
commit 5ab64c2ceb1b19bfd349e9ecbaf9427921c04edd
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Sun Feb 8 16:08:53 2015 -0700
Fix ODF export of serieslines styles.
2015-02-08 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_series_lines): don't use
gog_object_get_child_by_name since it may return the wrong objects. Get teh correct
style name.
NEWS | 1 +
plugins/openoffice/ChangeLog | 6 ++++++
plugins/openoffice/openoffice-write.c | 12 +++++++++---
3 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index d4b4ec8..1c8718d 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Andreas:
* Fix ODF import/export of marker fill and outline colours.
* Improve ODF export of manually positioned charts in multi-chart
graphs. [#743789]
+ * Fix ODF export of serieslines styles.
Morten:
* Initial xlsx import of sheet widgets.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 7394b1d..3f7027a 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,11 @@
2015-02-08 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * openoffice-write.c (odf_write_series_lines): don't use
+ gog_object_get_child_by_name since it may return the wrong objects. Get teh correct
+ style name.
+
+2015-02-08 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* openoffice-write.c (odf_write_multi_chart_frame_size): For manually positioned
charts we may have 0 columns and/or rows.
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index ee9ae7d..3c15927 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -6288,15 +6288,21 @@ odf_write_label_cell_address (GnmOOExport *state, GOData const *dat)
static void
odf_write_series_lines (GnmOOExport *state, GogObject const *series)
{
- GogObject const *serieslines = gog_object_get_child_by_name (series, "Series lines");
- if (serieslines) {
- char *style = odf_get_gog_style_name_from_obj (state, series);
+ GogObjectRole const *role = gog_object_find_role_by_name (series, "Series lines");
+
+ if (role != NULL) {
+ GSList *serieslines = gog_object_get_children (series, role);
+ if (serieslines != NULL && serieslines->data != NULL) {
+ GogObject *obj = GOG_OBJECT (serieslines->data);
+ char *style = odf_get_gog_style_name_from_obj (state, obj);
gsf_xml_out_start_element (state->xml, GNMSTYLE "serieslines");
gsf_xml_out_add_cstr (state->xml, CHART "style-name", style);
gsf_xml_out_end_element (state->xml); /* </gnm:serieslines> */
g_free (style);
+ }
+ g_slist_free (serieslines);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]