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

New commits:
commit e5d086c31e6765430f8c366196fb4a2b0c25924d
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Sep 28 11:41:42 2021 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Sep 28 15:25:11 2021 +0200

    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 <xiscofa...@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 000000000000..5c9f7c2b0e8b
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf144740.ods differ
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index 4803e19cbab8..840bf5042e65 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);

Reply via email to