summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-06-26 20:43:30 +0200
committerEike Rathke <erack@redhat.com>2012-07-02 11:20:41 +0200
commit94f6289eb012aa69da25800b42eaa6e4c566168d (patch)
tree0a545bf66f6407964f4e0e3dacc167cd9d8b5a6f
parent462be03401d5cf17f75d6c60132069fef842fc22 (diff)
added mnStringNoValueError handling to ConvertStringToValue() (fdo#51442 dependency)
Change-Id: I05c2ddc0ebde6675e9f98722c4feb1ed49670dee (cherry picked from commit 5f86b4be3c40180031aa723f5fa44a19595bffa8)
-rw-r--r--sc/source/core/tool/interpr4.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 4a1020120d70..0fbae525957f 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -239,10 +239,16 @@ double ScInterpreter::ConvertStringToValue( const String& rStr )
// We keep this code until we provide a friendly way to convert string
// numbers into numbers in the UI.
double fValue = 0.0;
+ if (mnStringNoValueError == errCellNoValue)
+ {
+ // Requested that all strings result in 0, error handled by caller.
+ SetError( mnStringNoValueError);
+ return fValue;
+ }
sal_uInt32 nFIndex = 0;
if (!pFormatter->IsNumberFormat(rStr, nFIndex, fValue))
{
- SetError(errNoValue);
+ SetError( mnStringNoValueError);
fValue = 0.0;
}
return fValue;