diff options
author | Eike Rathke <erack@redhat.com> | 2012-06-26 20:43:30 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-06-26 21:07:43 +0200 |
commit | 5f86b4be3c40180031aa723f5fa44a19595bffa8 (patch) | |
tree | 0086863157c99ea89dceb88cedcdb437979742c0 /sc | |
parent | 4a9c85b3f8c4e91b08bf814a048f9cdf9ffe31f9 (diff) |
added mnStringNoValueError handling to ConvertStringToValue()
Change-Id: I05c2ddc0ebde6675e9f98722c4feb1ed49670dee
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 8 |
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; |