[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - basic/qa basic/source
Anshu (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 30 10:14:20 UTC 2020
basic/qa/vba_tests/cint.vb | 4 ++++
basic/qa/vba_tests/isnumeric.vb | 4 ++++
basic/source/sbx/sbxscan.cxx | 4 +++-
3 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit a1a0f496aa7c39785551b2515b2b64d54a52b524
Author: Anshu <anshukhare50 at gmail.com>
AuthorDate: Wed Nov 25 09:19:31 2020 +0530
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Nov 30 11:13:47 2020 +0100
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 at collabora.com>
(cherry picked from commit ceb69f85c2c77827642be47aa14cb15ca87f683a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106736
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/basic/qa/vba_tests/cint.vb b/basic/qa/vba_tests/cint.vb
index 6c1d53c93c61..a178a0f97d62 100644
--- a/basic/qa/vba_tests/cint.vb
+++ b/basic/qa/vba_tests/cint.vb
@@ -73,6 +73,10 @@ REM TestLog_ASSERT nr1 = nr2, "the return CInt is: " & nr1
nr1 = CInt("&H754")
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)
verify_testCInt = result
diff --git a/basic/qa/vba_tests/isnumeric.vb b/basic/qa/vba_tests/isnumeric.vb
index 2383f4bfe299..511a51bd9106 100644
--- a/basic/qa/vba_tests/isnumeric.vb
+++ b/basic/qa/vba_tests/isnumeric.vb
@@ -51,6 +51,10 @@ rem TestLog_ASSERT date1 = date2, "the return IsNumeric is: " & date1
date1 = IsNumeric("123")
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)
verify_testIsNumeric = result
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index d2f5c91e3483..de3d50dbed38 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -108,7 +108,9 @@ ErrCode ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType,
SbxDataType eScanType = SbxSINGLE;
while( *p == ' ' || *p == '\t' )
p++;
- if( *p == '-' )
+ if (*p == '+')
+ p++;
+ else if( *p == '-' )
{
p++;
bMinus = true;
More information about the Libreoffice-commits
mailing list