tdf#134234: sc: Add unittest

Change-Id: Ie49cabb8ba10aaa8ec4453f6284b86617e98d490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97103
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf134234.ods b/sc/qa/unit/data/ods/tdf134234.ods
new file mode 100644
index 0000000..744f991
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf134234.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 80a6163..ca1f0b5 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -246,6 +246,7 @@
    void testBackgroundColorStandardXLSXML();
    void testTdf131536();
    void testTdf85617();
    void testTdf134234();
    void testNamedExpressionsXLSXML();
    void testEmptyRowsXLSXML();
    void testBorderDirectionsXLSXML();
@@ -394,6 +395,7 @@
    CPPUNIT_TEST(testBackgroundColorStandardXLSXML);
    CPPUNIT_TEST(testTdf131536);
    CPPUNIT_TEST(testTdf85617);
    CPPUNIT_TEST(testTdf134234);
    CPPUNIT_TEST(testNamedExpressionsXLSXML);
    CPPUNIT_TEST(testEmptyRowsXLSXML);
    CPPUNIT_TEST(testBorderDirectionsXLSXML);
@@ -3858,6 +3860,19 @@
    CPPUNIT_ASSERT_EQUAL(4.5, rDoc.GetValue(aPos));
}

void ScFiltersTest::testTdf134234()
{
    ScDocShellRef xDocSh = loadDoc("tdf134234.", FORMAT_ODS);
    CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
    ScDocument& rDoc = xDocSh->GetDocument();

    CPPUNIT_ASSERT_EQUAL(3.0, rDoc.GetValue(ScAddress(1,0,1)));

    //Without the fix in place, SUMPRODUCT would have returned 0
    CPPUNIT_ASSERT_EQUAL(36.54, rDoc.GetValue(ScAddress(2,0,1)));
    CPPUNIT_ASSERT_EQUAL(sal_uInt32(833), static_cast<sal_uInt32>(rDoc.GetValue(ScAddress(3,0,1))));
}

void ScFiltersTest::testNamedExpressionsXLSXML()
{
    {