tdf#138507: sc_subsequent_filters: Add unittest
Change-Id: I1b9271d03c6bc61a63436054a74e455ad78bc68a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106712
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf138507.ods b/sc/qa/unit/data/ods/tdf138507.ods
new file mode 100644
index 0000000..5b83a0d
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf138507.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 2323ee5..9c08754 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -248,6 +248,7 @@ public:
void testTdf132278();
void testTdf130959();
void testTdf129410();
void testTdf138507();
void testTdf131380();
void testTdf129681();
void testTdf111974XLSM();
@@ -427,6 +428,7 @@ public:
CPPUNIT_TEST(testTdf132278);
CPPUNIT_TEST(testTdf130959);
CPPUNIT_TEST(testTdf129410);
CPPUNIT_TEST(testTdf138507);
CPPUNIT_TEST(testTdf131380);
CPPUNIT_TEST(testTdf129681);
CPPUNIT_TEST(testTdf111974XLSM);
@@ -3737,6 +3739,18 @@ void ScFiltersTest::testTdf129410()
xDocSh->DoClose();
}
void ScFiltersTest::testTdf138507()
{
// Would fail to load without the fix
ScDocShellRef xDocSh = loadDoc("tdf138507.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
rDoc.CalcAll(); // perform hard re-calculation.
xDocSh->DoClose();
}
void ScFiltersTest::testTdf131380()
{
ScDocShellRef xDocSh = loadDoc("tdf131380.", FORMAT_XLSX);