tdf#131424: sc: Add unittest

Change-Id: Ida3df74d44ca027de68f9b5f96a352452d747bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97595
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/data/xlsx/tdf131424.xlsx b/sc/qa/unit/data/xlsx/tdf131424.xlsx
new file mode 100644
index 0000000..e48f007
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf131424.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index a1027fd..0c332f6 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -230,6 +230,7 @@ public:
    void testTdf98844();
    void testTdf100458();
    void testTdf127982();
    void testTdf131424();
    void testTdf100709XLSX();
    void testTdf97598XLSX();
    void testTdf110440XLSX();
@@ -388,6 +389,7 @@ public:
    CPPUNIT_TEST(testTdf98844);
    CPPUNIT_TEST(testTdf100458);
    CPPUNIT_TEST(testTdf127982);
    CPPUNIT_TEST(testTdf131424);
    CPPUNIT_TEST(testTdf100709XLSX);
    CPPUNIT_TEST(testTdf97598XLSX);
    CPPUNIT_TEST(testTdf110440XLSX);
@@ -3815,6 +3817,21 @@ void ScFiltersTest::testTdf127982()
    xDocSh->DoClose();
}

void ScFiltersTest::testTdf131424()
{
    ScDocShellRef xDocSh = loadDoc("tdf131424.", FORMAT_XLSX);
    CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
    ScDocument& rDoc = xDocSh->GetDocument();

    // Without the fix in place, table reference would have failed
    CPPUNIT_ASSERT_EQUAL(35.0, rDoc.GetValue(ScAddress(2,1,0)));
    CPPUNIT_ASSERT_EQUAL(58.0, rDoc.GetValue(ScAddress(2,2,0)));
    CPPUNIT_ASSERT_EQUAL(81.0, rDoc.GetValue(ScAddress(2,3,0)));
    CPPUNIT_ASSERT_EQUAL(104.0, rDoc.GetValue(ScAddress(2,4,0)));

    xDocSh->DoClose();
}

void ScFiltersTest::testTdf100709XLSX()
{
    ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc("tdf100709.", FORMAT_XLSX);