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

New commits:
commit 4669ee729fd25ce36f6b2b2d501481528f9f464b
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Jan 31 13:01:48 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Jan 31 19:28:24 2022 +0100

    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 <xiscofa...@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 000000000000..7082b4291064
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf146722.ods differ
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index bae340757835..c164b52cc730 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);

Reply via email to