dev/null                        |binary
 sc/qa/extras/vba-macro-test.cxx |   21 ---------------------
 svl/qa/unit/svl.cxx             |    7 +++++++
 3 files changed, 7 insertions(+), 21 deletions(-)

New commits:
commit cac37fefae32fc6a0df2c579e08619568087af81
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Jun 18 16:36:00 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Jun 18 17:51:36 2024 +0200

    tdf#131562: move test to svl and extend it
    
    based on the commit message from 7186541219599e1b51ad35601c2cd015a329f360
    "Resolves: tdf#131562 decimal separator may not be surrounded by blanks"
    
    Change-Id: I19c2a687663304003566e9d93504f0baf33f1d83
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169111
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/sc/qa/extras/testdocuments/tdf131562.xlsm 
b/sc/qa/extras/testdocuments/tdf131562.xlsm
deleted file mode 100644
index e56576ba4583..000000000000
Binary files a/sc/qa/extras/testdocuments/tdf131562.xlsm and /dev/null differ
diff --git a/sc/qa/extras/vba-macro-test.cxx b/sc/qa/extras/vba-macro-test.cxx
index 81d179705b5a..d6816dc72ac1 100644
--- a/sc/qa/extras/vba-macro-test.cxx
+++ b/sc/qa/extras/vba-macro-test.cxx
@@ -561,27 +561,6 @@ CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf107885)
     CPPUNIT_ASSERT(!rDoc.RowHidden(4, 0));
 }
 
-CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf131562)
-{
-    loadFromFile(u"tdf131562.xlsm");
-
-    SfxObjectShell* pFoundShell = 
SfxObjectShell::GetShellFromComponent(mxComponent);
-
-    CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
-    ScDocShell* pDocSh = static_cast<ScDocShell*>(pFoundShell);
-    ScDocument& rDoc = pDocSh->GetDocument();
-
-    CPPUNIT_ASSERT_EQUAL(u"1"_ustr, rDoc.GetString(ScAddress(0, 2, 0)));
-    CPPUNIT_ASSERT_EQUAL(u""_ustr, rDoc.GetString(ScAddress(0, 3, 0)));
-
-    executeMacro(
-        
u"vnd.sun.Star.script:VBAProject.Munka1.numberconcat?language=Basic&location=document"_ustr);
-
-    //Without the fix in place, the macro wouldn't have concatenated 1 and " ."
-    CPPUNIT_ASSERT_EQUAL(u"1 ."_ustr, rDoc.GetString(ScAddress(0, 2, 0)));
-    CPPUNIT_ASSERT_EQUAL(u"1 .cat"_ustr, rDoc.GetString(ScAddress(0, 3, 0)));
-}
-
 CPPUNIT_TEST_FIXTURE(VBAMacroTest, testTdf52602)
 {
     loadFromFile(u"tdf52602.xls");
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index d6dfc9b2bc05..a27651c808e0 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1155,6 +1155,13 @@ void Test::testIsNumberFormat()
         { "test", false },
         { "$0.12", true }, // tdf#48706
         { "$.12", true }, // tdf#48706
+        { "1 .", false }, // tdf#131562
+        { "1 .2", false }, // tdf#131562
+        { "1 . 2", false }, // tdf#131562
+        { "1. 2", false }, // tdf#131562
+        { " . 2", false }, // tdf#131562
+        { ". 2", false }, // tdf#131562
+        { " .2", true }, // tdf#131562
         { "Jan1", false }, // tdf#34724
         { "1Jan", false }, // tdf#34724
         { "Jan1 2000", true }, // tdf#91420

Reply via email to