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 <xiscofauli@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 e56576b..0000000
--- a/sc/qa/extras/testdocuments/tdf131562.xlsm
+++ /dev/null
Binary files differ
diff --git a/sc/qa/extras/vba-macro-test.cxx b/sc/qa/extras/vba-macro-test.cxx
index 81d1797..d6816dc 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 d6dfc9b..a27651c 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