tdf#146722: sc_subsequent_filters_test2: Add unittest

Change-Id: I2a608a7007c50690e8c27252422b16619a65a07a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129217
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf146722.ods b/sc/qa/unit/data/ods/tdf146722.ods
new file mode 100644
index 0000000..7082b42
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf146722.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx
index bae3407..c164b52 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -172,6 +172,7 @@ public:
    void testTdf119190();
    void testTdf139612();
    void testTdf144740();
    void testTdf146722();
    void testTdf139763ShapeAnchor();
    void testAutofilterNamedRangesXLSX();
    void testInvalidBareBiff5();
@@ -281,6 +282,7 @@ public:
    CPPUNIT_TEST(testTdf119190);
    CPPUNIT_TEST(testTdf139612);
    CPPUNIT_TEST(testTdf144740);
    CPPUNIT_TEST(testTdf146722);
    CPPUNIT_TEST(testTdf139763ShapeAnchor);
    CPPUNIT_TEST(testAutofilterNamedRangesXLSX);
    CPPUNIT_TEST(testInvalidBareBiff5);
@@ -2873,6 +2875,20 @@ void ScFiltersTest2::testTdf144740()
    xDocSh->DoClose();
}

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

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

    xDocSh->DoClose();
}

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