summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-04-16 12:47:46 +0200
committerEike Rathke <erack@redhat.com>2020-04-17 15:45:52 +0200
commitbb3ea0ae51bb943f7bb3dca80eee153f9c55c03e (patch)
treefb98a21e7ee4a05ede7a38791082720fe62041c5 /sc/source/core
parent870ab3b8492fa7d42c56ca09884811fef1695d28 (diff)
tdf#130583: fix Switch in Calc
Don't set bFinished to true too soon if there are still some params to take into account Change-Id: Ie7bdd6f316c08342d379d55bf3853774dd738e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92345 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/tool/interpr8.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 1849ab13e6c9..ce978ea094a6 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1974,7 +1974,7 @@ void ScInterpreter::ScSwitch_MS()
else
aStr = GetString();
nParamCount--;
- if ( nGlobalError != FormulaError::NONE || (( isValue && rtl::math::approxEqual( fRefVal, fVal ) ) ||
+ if ( (nGlobalError != FormulaError::NONE && nParamCount < 2) || (( isValue && rtl::math::approxEqual( fRefVal, fVal ) ) ||
( !isValue && aRefStr.getDataIgnoreCase() == aStr.getDataIgnoreCase() )) )
{
// TRUE