tdf#137453: sc_subsequent_filters_test: Add unittest
Change-Id: Ief6559122820c490eebe256535fae5e009b5e2b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104318
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf137453.ods b/sc/qa/unit/data/ods/tdf137453.ods
new file mode 100644
index 0000000..9feecfb
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf137453.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 3f2b354..5b61e28 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -276,6 +276,7 @@ public:
void testCharacterSetXLSXML();
void testTdf137091();
void testTdf62268();
void testTdf137453();
void testTdf35636();
void testVBAMacroFunctionODS();
void testAutoheight2Rows();
@@ -449,6 +450,7 @@ public:
CPPUNIT_TEST(testCondFormatFormulaListenerXLSX);
CPPUNIT_TEST(testTdf137091);
CPPUNIT_TEST(testTdf62268);
CPPUNIT_TEST(testTdf137453);
CPPUNIT_TEST(testTdf35636);
CPPUNIT_TEST(testVBAMacroFunctionODS);
CPPUNIT_TEST(testAutoheight2Rows);
@@ -4802,6 +4804,21 @@ void ScFiltersTest::testTdf62268()
xDocSh->DoClose();
}
void ScFiltersTest::testTdf137453()
{
ScDocShellRef xDocSh = loadDoc("tdf137453.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
// Without the fix in place, this test would have failed with
// - Expected: 3333333333/100
// - Actual : -961633963/100
CPPUNIT_ASSERT_EQUAL(OUString("3333333333/100"), rDoc.GetString(ScAddress(0,0,0)));
xDocSh->DoClose();
}
void ScFiltersTest::testTdf35636()
{
ScDocShellRef xDocSh = loadDoc("tdf35636.", FORMAT_ODS);