[gnumeric] Fix ODF export of single cell ranges in graphs. [#743619]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix ODF export of single cell ranges in graphs. [#743619]
- Date: Wed, 28 Jan 2015 17:48:31 +0000 (UTC)
commit 6c9787f259a6b637c3060272ef86041c636d9b6b
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Wed Jan 28 10:46:36 2015 -0700
Fix ODF export of single cell ranges in graphs. [#743619]
2015-01-28 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_data_element_range): correctly write single cell
references
NEWS | 3 ++-
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-write.c | 9 ++++++---
3 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/NEWS b/NEWS
index 1cfb2a4..b368bc5 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,8 @@ Andreas:
* ODF import/export trendline names. [#743448]
* ODF import/export trendline affinity & dimensions.
* ODF import/export major & minor chart axis tick marks.
- * ODF import/export chart axis min and max formulae
+ * ODF import/export chart axis min and max formulae.
+ * Fix ODF export of single cell ranges in graphs. [#743619]
Morten:
* xlsx chart import: fix font family name.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index acfef01..1b7d141 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-28 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-write.c (odf_write_data_element_range): correctly write single cell
+ references
+
2015-01-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_data_attribute): check for extensions
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 7754bf8..f59342b 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -6218,8 +6218,9 @@ odf_write_data_element_range (GnmOOExport *state, GnmParsePos *pp, GnmExprTop c
GString *gstr = g_string_new (NULL);
for (i = 0; i < expr->set.argc; i++) {
GnmExpr const *expr_arg = expr->set.argv[i];
- if (GNM_EXPR_GET_OPER (expr_arg) == GNM_EXPR_OP_CONSTANT &&
- VALUE_IS_CELLRANGE (expr_arg->constant.value)) {
+ if ((GNM_EXPR_GET_OPER (expr_arg) == GNM_EXPR_OP_CONSTANT &&
+ VALUE_IS_CELLRANGE (expr_arg->constant.value)) ||
+ (GNM_EXPR_GET_OPER (expr_arg) == GNM_EXPR_OP_CELLREF)) {
char *str = gnm_expr_as_string (expr_arg, pp, state->conv);
if (gstr->len > 0)
g_string_append_c (gstr, ' ');
@@ -6240,9 +6241,11 @@ odf_write_data_element_range (GnmOOExport *state, GnmParsePos *pp, GnmExprTop c
break;
}
+ /* case GNM_EXPR_OP_CELLREF: */
/* ODF does not support anything else but we write it anyways */
str = gnm_expr_top_as_string (texpr, pp, state->conv);
- gsf_xml_out_add_cstr (state->xml, attribute, str);
+ gsf_xml_out_add_cstr (state->xml, attribute,
+ odf_strip_brackets (str));
g_free (str);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]