summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/interpr6.cxx26
1 files changed, 20 insertions, 6 deletions
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index 13c603f3d087..7eac4eb90f73 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -429,9 +429,19 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero )
if( eFunc == ifCOUNT )
{
OUString aStr = PopString().getString();
- sal_uInt32 nFIndex = 0; // damit default Land/Spr.
- if ( bTextAsZero || pFormatter->IsNumberFormat(aStr, nFIndex, fVal))
+ if ( bTextAsZero )
nCount++;
+ else
+ {
+ // Only check if string can be converted to number, no
+ // error propagation.
+ sal_uInt16 nErr = nGlobalError;
+ nGlobalError = 0;
+ ConvertStringToValue( aStr );
+ if (!nGlobalError)
+ ++nCount;
+ nGlobalError = nErr;
+ }
}
else
{
@@ -955,7 +965,6 @@ void ScInterpreter::ScCount()
else
{
short nParamCount = GetByte();
- double fVal = 0.0;
sal_uLong nCount = 0;
ScAddress aAdr;
ScRange aRange;
@@ -970,9 +979,14 @@ void ScInterpreter::ScCount()
case svString:
{
OUString aStr = PopString().getString();
- sal_uInt32 nFIndex = 0; // damit default Land/Spr.
- if (pFormatter->IsNumberFormat(aStr, nFIndex, fVal))
- nCount++;
+ // Only check if string can be converted to number, no
+ // error propagation.
+ sal_uInt16 nErr = nGlobalError;
+ nGlobalError = 0;
+ ConvertStringToValue( aStr );
+ if (!nGlobalError)
+ ++nCount;
+ nGlobalError = nErr;
}
break;
case svDouble :