tdf#136801 : IsNumeric("+2") and CInt("+2") return correct values
Change-Id: I036f21c8196530973d2cdc366da7654ccd930892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106556 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -73,6 +73,10 @@ REM TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
|
|||||||
nr1 = CInt("&H754")
|
nr1 = CInt("&H754")
|
||||||
TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
|
TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
|
||||||
|
|
||||||
|
nr2 = 21
|
||||||
|
nr1 = CInt("+21")
|
||||||
|
TestLog_ASSERT nr1 = nr2, "the return CInt is:" & nr1
|
||||||
|
|
||||||
result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
|
result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
|
||||||
verify_testCInt = result
|
verify_testCInt = result
|
||||||
|
|
||||||
|
@@ -51,6 +51,10 @@ rem TestLog_ASSERT date1 = date2, "the return IsNumeric is: " & date1
|
|||||||
date1 = IsNumeric("123")
|
date1 = IsNumeric("123")
|
||||||
TestLog_ASSERT date1 = date2, "the return IsNumeric is: " & date1
|
TestLog_ASSERT date1 = date2, "the return IsNumeric is: " & date1
|
||||||
|
|
||||||
|
date2 = True
|
||||||
|
date1 = IsNumeric("+123")
|
||||||
|
TestLog_ASSERT date1 = date2, "the return IsNumeric is: " & date1
|
||||||
|
|
||||||
result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
|
result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & "Tests failed: " & failCount & Chr$(10)
|
||||||
verify_testIsNumeric = result
|
verify_testIsNumeric = result
|
||||||
|
|
||||||
|
@@ -108,7 +108,9 @@ ErrCode ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType,
|
|||||||
SbxDataType eScanType = SbxSINGLE;
|
SbxDataType eScanType = SbxSINGLE;
|
||||||
while( *p == ' ' || *p == '\t' )
|
while( *p == ' ' || *p == '\t' )
|
||||||
p++;
|
p++;
|
||||||
if( *p == '-' )
|
if (*p == '+')
|
||||||
|
p++;
|
||||||
|
else if( *p == '-' )
|
||||||
{
|
{
|
||||||
p++;
|
p++;
|
||||||
bMinus = true;
|
bMinus = true;
|
||||||
|
Reference in New Issue
Block a user