Kaydet (Commit) 77da25c5 authored tarafından jp's avatar jp

Bug #79951#: Str2Double - return also error if endpos equal start pos

üst 69231bf1
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: calc.cxx,v $ * $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 * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -1550,7 +1550,7 @@ FASTBOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, ...@@ -1550,7 +1550,7 @@ FASTBOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
if( !pLclD ) if( !pLclD )
pLclD = &GetAppLocaleData(); pLclD = &GetAppLocaleData();
const xub_Unicode* pEnd; const xub_Unicode *pEnd, nCurrCmdPos = rCommandPos;
int nErrno; int nErrno;
rVal = SolarMath::StringToDouble( rCommand.GetBuffer() + rCommandPos, rVal = SolarMath::StringToDouble( rCommand.GetBuffer() + rCommandPos,
pLclD->getNumThousandSep().GetChar(0), pLclD->getNumThousandSep().GetChar(0),
...@@ -1561,7 +1561,7 @@ FASTBOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos, ...@@ -1561,7 +1561,7 @@ FASTBOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
if( !pLclData && pLclD != &GetAppLocaleData() ) if( !pLclData && pLclD != &GetAppLocaleData() )
delete (LocaleDataWrapper*)pLclD; delete (LocaleDataWrapper*)pLclD;
return 0 == nErrno; return 0 == nErrno && nCurrCmdPos != rCommandPos;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment