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>
(cherry picked from commit bb3ea0ae51bb943f7bb3dca80eee153f9c55c03e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92432
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 18a65e8..71269e9 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1965,7 +1965,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