[gnumeric] xlsx: fix parsing of expressions in conditional formats.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xlsx: fix parsing of expressions in conditional formats.
- Date: Wed, 19 Mar 2014 18:14:00 +0000 (UTC)
commit 38a31e08df35578d2a713fda46b65c79eb85ab65
Author: Morten Welinder <terra gnome org>
Date: Wed Mar 19 14:13:08 2014 -0400
xlsx: fix parsing of expressions in conditional formats.
NEWS | 1 +
plugins/excel/ChangeLog | 2 ++
plugins/excel/xlsx-read.c | 6 ++++--
3 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index f6296a9..e362099 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Gnumeric 1.12.14
Morten:
* Plug leaks.
+ * xlsx conditional format fixes. [#726202]
--------------------------------------------------------------------------
Gnumeric 1.12.13
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 2404f9f..5d15ffc 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,6 +1,8 @@
2014-03-19 Morten Welinder <terra gnome org>
* xlsx-read.c (xlsx_CT_CustomFilter): Avoid mixing enums.
+ (xlsx_cond_fmt_formula_end): Parse expressions in the right parse
+ position.
2014-03-18 Morten Welinder <terra gnome org>
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index da2d08f..80cf7b0 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -2636,11 +2636,13 @@ xlsx_cond_fmt_formula_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
XLSXReadState *state = (XLSXReadState *)xin->user_state;
GnmParsePos pp;
GnmExprTop const *texpr;
+ GnmCellPos const *cp;
- if (!state->cond || state->count > 1)
+ if (!state->cond || state->count > 1 || state->cond_regions == NULL)
return;
- parse_pos_init_sheet (&pp, state->sheet);
+ cp = g_slist_last (state->cond_regions)->data;
+ parse_pos_init (&pp, state->sheet->workbook, state->sheet, cp->col, cp->row);
texpr = xlsx_parse_expr (xin, xin->content->str, &pp);
gnm_style_cond_set_expr (state->cond, texpr, state->count);
gnm_expr_top_unref (texpr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]