diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-11-23 00:51:10 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-11-25 08:32:46 +0000 |
commit | 2987635da7c46874c3d1b7979b70dec0de4b69b1 (patch) | |
tree | 5c5a1d6c10b90f6ad85bd73f730ccca88eb6032a /sc/source/filter | |
parent | 985a2a6606a20abd4aeaf997f63eb434d0a884ba (diff) |
make sure to check for formula first, fdo#80301
Cherry-picked from 37ac70c117a7b8b9ac66b583a793096c3ad87a11
Change-Id: Ie822d1a154b7b25437ce7e5d09eb399460823acf
Reviewed-on: https://gerrit.libreoffice.org/13081
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/oox/condformatbuffer.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 60e3e7c41b70..754c36c2bc7a 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -121,8 +121,16 @@ void SetCfvoData( ColorScaleRuleModelEntry* pEntry, const AttributeList& rAttrib { OUString aType = rAttribs.getString( XML_type, OUString() ); - double nVal = rAttribs.getDouble( XML_val, 0.0 ); - pEntry->mnVal = nVal; + if( aType == "formula" ) + { + OUString aFormula = rAttribs.getString( XML_val, OUString() ); + pEntry->maFormula = aFormula; + } + else + { + double nVal = rAttribs.getDouble( XML_val, 0.0 ); + pEntry->mnVal = nVal; + } if (aType == "num") { // nothing to do @@ -143,12 +151,6 @@ void SetCfvoData( ColorScaleRuleModelEntry* pEntry, const AttributeList& rAttrib { pEntry->mbPercentile = true; } - else if( aType == "formula" ) - { - OUString aFormula = rAttribs.getString( XML_val, OUString() ); - pEntry->maFormula = aFormula; - } - } } |