summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-06-26 20:43:30 +0200
committerEike Rathke <erack@redhat.com>2012-06-26 21:07:43 +0200
commit5f86b4be3c40180031aa723f5fa44a19595bffa8 (patch)
tree0086863157c99ea89dceb88cedcdb437979742c0 /sc
parentreenable unitcheck and slowcheck as top level targets (diff)
downloadcore-5f86b4be3c40180031aa723f5fa44a19595bffa8.tar.gz
core-5f86b4be3c40180031aa723f5fa44a19595bffa8.zip
added mnStringNoValueError handling to ConvertStringToValue()
Change-Id: I05c2ddc0ebde6675e9f98722c4feb1ed49670dee
Diffstat (limited to 'sc')
-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 c914daf788d2..08d9acc80009 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -237,10 +237,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;