Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hi Eike,


Likely aRefStr isn't interned, but only constructed from an OUString.

I made a quick fix by using aRefStr.getString().equalsIgnoreAsciiCase( aStr.getString() ) instead.
That works, now SWITCH("C";"c";"OK") returns OK in Calc.

I don't have branch 5.2, and I don't want to 'fix' master as I am very close to converting the 
function to a jump function (SWITCH works, IFS is next).

What do you advise as quickest/best way to fix version 5.2?

Winfried


diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index dcf43d2..76159a3 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1968,7 +1968,7 @@ void ScInterpreter::ScSwitch_MS()
             aStr = GetString();
         nParamCount--;
         if ( nGlobalError || (( isValue && rtl::math::approxEqual( fRefVal, fVal ) ) ||
-             ( !isValue && aRefStr.getDataIgnoreCase() == aStr.getDataIgnoreCase() )) )
+             ( !isValue && aRefStr.getString().equalsIgnoreAsciiCase( aStr.getString() ) ) ) )
         {
             // TRUE
             bFinished = true;

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.