summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/interpr1.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 7fe7b8195fbd..d9d0658ed2dd 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3925,11 +3925,12 @@ void ScInterpreter::ScSheets()
SCCOL nCol2;
SCROW nRow2;
SCTAB nTab2;
- while (nParamCount-- > 0)
+ while (nGlobalError == FormulaError::NONE && nParamCount-- > 0)
{
switch ( GetStackType() )
{
case svSingleRef:
+ case svExternalSingleRef:
PopError();
nVal++;
break;
@@ -3937,14 +3938,6 @@ void ScInterpreter::ScSheets()
PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
nVal += static_cast<sal_uLong>(nTab2 - nTab1 + 1);
break;
- case svMatrix:
- PopError();
- nVal++;
- break;
- case svExternalSingleRef:
- PopError();
- nVal++;
- break;
case svExternalDoubleRef:
{
sal_uInt16 nFileId;