[gnumeric] xlsx: reverse alternate expressions used for conditions not in xlsx



commit 75668070dd017534c788755d65f30670f3c01c18
Author: Morten Welinder <terra gnome org>
Date:   Wed Mar 19 21:12:17 2014 -0400

    xlsx: reverse alternate expressions used for conditions not in xlsx

 plugins/excel/ChangeLog   |    3 +++
 plugins/excel/xlsx-read.c |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index cb519c7..04358f4 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,8 @@
 2014-03-19  Morten Welinder  <terra gnome org>
 
+       * xlsx-read.c (xlsx_cond_fmt_rule_end): Reverse the
+       alternate-expression uses for certain conditions.
+
        * xlsx-write.c (xlsx_write_dxfs): New function.
 
        * xlsx-read.c (xlsx_CT_CustomFilter): Avoid mixing enums.
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 73c3d2b..2a0e619 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -2626,6 +2626,9 @@ xlsx_cond_fmt_rule_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
                if (gnm_style_cond_is_valid (state->cond)) {
                        if (NULL == state->conditions)
                                state->conditions = gnm_style_conditions_new (state->sheet);
+                       /* Reverse the alternate-expression treatment.  */
+                       gnm_style_cond_canonicalize (state->cond);
+
                        gnm_style_conditions_insert (state->conditions,
                                                     state->cond, -1);
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]