From 779f8ec53a6395e7b97b93978d0f196b1f332f89 Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Tue, 28 Mar 2023 11:28:05 -0400 Subject: sc: filter: oox: fix conditional color scale empty value \"\" Signed-off-by: Henry Castro Change-Id: I115c3731db85267d115efd24739470bffaeace40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149718 Tested-by: Andras Timar Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151976 Tested-by: Jenkins CollaboraOffice --- sc/source/filter/oox/condformatbuffer.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'sc') diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index c1b7b6d84c9d..fede0d344182 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -116,15 +116,18 @@ void SetCfvoData( ColorScaleRuleModelEntry* pEntry, const AttributeList& rAttrib OUString aType = rAttribs.getString( XML_type, OUString() ); OUString aVal = rAttribs.getString(XML_val, OUString()); - double nVal = 0.0; - bool bVal = isValue(aVal, nVal); - if( !bVal || aType == "formula" ) - { - pEntry->maFormula = aVal; - } - else + if (aVal != "\"\"") { - pEntry->mnVal = nVal; + double nVal = 0.0; + bool bVal = isValue(aVal, nVal); + if( !bVal || aType == "formula" ) + { + pEntry->maFormula = aVal; + } + else + { + pEntry->mnVal = nVal; + } } if (aType == "num") -- cgit v1.2.3