sc/qa/unit/data/ods/tdf139612.ods       |binary
 sc/qa/unit/subsequent_filters_test2.cxx |   18 ++++++++++++++++++
 2 files changed, 18 insertions(+)

New commits:
commit 258dc1f332155cd565d34b1ce3b51edc3c2fbf64
Author:     Xisco Fauli <[email protected]>
AuthorDate: Thu Nov 18 10:17:29 2021 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Nov 18 11:28:25 2021 +0100

    tdf#139612: sc_subsequent_filters_test2: Add unittest
    
    Change-Id: Ic1467cfc50ce40951677a73ab3c43df6c33467fd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125440
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sc/qa/unit/data/ods/tdf139612.ods 
b/sc/qa/unit/data/ods/tdf139612.ods
new file mode 100644
index 000000000000..34acfe3263c5
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf139612.ods differ
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index f10474d17172..87186e3443e8 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -203,6 +203,7 @@ public:
     void testDrawCircleInMergeCells();
     void testDeleteCirclesInRowAndCol();
     void testTdf129940();
+    void testTdf139612();
     void testTdf144740();
     void testTdf139763ShapeAnchor();
     void testAutofilterNamedRangesXLSX();
@@ -309,6 +310,7 @@ public:
     CPPUNIT_TEST(testDrawCircleInMergeCells);
     CPPUNIT_TEST(testDeleteCirclesInRowAndCol);
     CPPUNIT_TEST(testTdf129940);
+    CPPUNIT_TEST(testTdf139612);
     CPPUNIT_TEST(testTdf144740);
     CPPUNIT_TEST(testTdf139763ShapeAnchor);
     CPPUNIT_TEST(testAutofilterNamedRangesXLSX);
@@ -2836,6 +2838,22 @@ void ScFiltersTest2::testTdf129940()
     xDocSh->DoClose();
 }
 
+void ScFiltersTest2::testTdf139612()
+{
+    ScDocShellRef xDocSh = loadDoc(u"tdf139612.", FORMAT_ODS);
+    CPPUNIT_ASSERT_MESSAGE("Failed to load tdf139612.ods", xDocSh.is());
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    xDocSh->DoHardRecalc();
+
+    // Without the fix in place, this test would have failed with
+    // - Expected: 1
+    // - Actual  : 0
+    CPPUNIT_ASSERT_EQUAL(1.0, rDoc.GetValue(ScAddress(1, 15, 0)));
+
+    xDocSh->DoClose();
+}
+
 void ScFiltersTest2::testTdf144740()
 {
     ScDocShellRef xDocSh = loadDoc(u"tdf144740.", FORMAT_ODS);

Reply via email to