summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2000-11-21 12:22:35 +0000
committerjp <jp@openoffice.org>2000-11-21 12:22:35 +0000
commit77da25c56d9efa0f899c1cdf475c7d713daa1dc6 (patch)
tree763a07a46752aa55ef1e58b0f0a957522ea0d1ea
parent69231bf139348689a6bac46d23081da0537483fc (diff)
Bug #79951#: Str2Double - return also error if endpos equal start pos
-rw-r--r--sw/source/core/bastyp/calc.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 42314afd02d0..e8b22d7f931d 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: calc.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: jp $ $Date: 2000-11-20 09:15:55 $
+ * last change: $Author: jp $ $Date: 2000-11-21 13:22:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1550,7 +1550,7 @@ FASTBOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
if( !pLclD )
pLclD = &GetAppLocaleData();
- const xub_Unicode* pEnd;
+ const xub_Unicode *pEnd, nCurrCmdPos = rCommandPos;
int nErrno;
rVal = SolarMath::StringToDouble( rCommand.GetBuffer() + rCommandPos,
pLclD->getNumThousandSep().GetChar(0),
@@ -1561,7 +1561,7 @@ FASTBOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
if( !pLclData && pLclD != &GetAppLocaleData() )
delete (LocaleDataWrapper*)pLclD;
- return 0 == nErrno;
+ return 0 == nErrno && nCurrCmdPos != rCommandPos;
}
//------------------------------------------------------------------------------