summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/interpr6.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/interpr6.cxx')
-rw-r--r--sc/source/core/tool/interpr6.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index dbeab67fe35c..0d80a8842566 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -515,7 +515,7 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
else
{
while (nParamCount-- > 0)
- Pop();
+ PopError();
SetError( FormulaError::NoValue );
}
}
@@ -637,8 +637,14 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
}
else if (aCell.hasNumeric())
{
- nCount++;
fVal = GetCellValue(aAdr, aCell);
+ if (nGlobalError != FormulaError::NONE)
+ {
+ if (eFunc == ifCOUNT || (mnSubTotalFlags & SubtotalFlags::IgnoreErrVal))
+ nGlobalError = FormulaError::NONE;
+ break;
+ }
+ nCount++;
CurFmtToFuncFmt();
switch( eFunc )
{
@@ -646,13 +652,6 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
case ifSUM: fRes += fVal; break;
case ifSUMSQ: fRes += fVal * fVal; break;
case ifPRODUCT: fRes *= fVal; break;
- case ifCOUNT:
- if ( nGlobalError != FormulaError::NONE )
- {
- nGlobalError = FormulaError::NONE;
- nCount--;
- }
- break;
default: ; // nothing
}
}