tdf#144740: sc_subsequent_filters_test2: Add unittest

Change-Id: Ida3de565a736ad512e0fb7e1ef78545fefaba639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122761
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf144740.ods b/sc/qa/unit/data/ods/tdf144740.ods
new file mode 100644
index 0000000..5c9f7c2
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf144740.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx
index 4803e19..840bf50 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -205,6 +205,7 @@ public:
    void testDrawCircleInMergeCells();
    void testDeleteCirclesInRowAndCol();
    void testTdf129940();
    void testTdf144740();
    void testTdf139763ShapeAnchor();
    void testAutofilterNamedRangesXLSX();
    void testInvalidBareBiff5();
@@ -312,6 +313,7 @@ public:
    CPPUNIT_TEST(testDrawCircleInMergeCells);
    CPPUNIT_TEST(testDeleteCirclesInRowAndCol);
    CPPUNIT_TEST(testTdf129940);
    CPPUNIT_TEST(testTdf144740);
    CPPUNIT_TEST(testTdf139763ShapeAnchor);
    CPPUNIT_TEST(testAutofilterNamedRangesXLSX);
    CPPUNIT_TEST(testInvalidBareBiff5);
@@ -2845,6 +2847,20 @@ void ScFiltersTest2::testTdf129940()
    xDocSh->DoClose();
}

void ScFiltersTest2::testTdf144740()
{
    ScDocShellRef xDocSh = loadDoc(u"tdf144740.", FORMAT_ODS);
    CPPUNIT_ASSERT_MESSAGE("Failed to load tdf144740.ods", xDocSh.is());
    ScDocument& rDoc = xDocSh->GetDocument();

    // Without the fix in place, this test would have failed with
    // - Expected: 1
    // - Actual  : 2
    CPPUNIT_ASSERT_EQUAL(1.0, rDoc.GetValue(ScAddress(1, 0, 0)));

    xDocSh->DoClose();
}

void ScFiltersTest2::testTdf139763ShapeAnchor()
{
    ScDocShellRef xDocSh = loadDoc(u"tdf139763ShapeAnchor.", FORMAT_XLSX);