sc/qa/unit/data/ods/tdf153924.ods       |binary
 sc/qa/unit/subsequent_filters_test4.cxx |   17 +++++++++++++++++
 2 files changed, 17 insertions(+)

New commits:
commit d951f9cafbc4674e4bf6fc174f5fd28e451c59ae
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Mar 6 11:14:14 2023 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Mar 6 15:10:02 2023 +0000

    tdf#153924: sc_subsequent_filters_test4: Add unittest
    
    Change-Id: I32e07ab36b2ee3873cf6fc6d9831be9b772a29e3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148300
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/unit/data/ods/tdf153924.ods 
b/sc/qa/unit/data/ods/tdf153924.ods
new file mode 100644
index 000000000000..1373ded691ef
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf153924.ods differ
diff --git a/sc/qa/unit/subsequent_filters_test4.cxx 
b/sc/qa/unit/subsequent_filters_test4.cxx
index c1a0f9c17e88..ec22e998d611 100644
--- a/sc/qa/unit/subsequent_filters_test4.cxx
+++ b/sc/qa/unit/subsequent_filters_test4.cxx
@@ -1487,6 +1487,23 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest4, 
testSharedFormulaRefUpdateXLSX)
     }
 }
 
+CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testTdf153924)
+{
+    createScDoc("ods/tdf153924.ods");
+    ScDocument* pDoc = getScDoc();
+
+    double aCheck[6][2] = { { 148.0, 195.0 }, { 144.0, 200.0 }, { 151.0, 192.0 
},
+                            { 154.0, 189.0 }, { 165.0, 183.0 }, { 0.0, 0.0 } };
+    for (size_t i = 0; i < 6; ++i)
+    {
+        for (size_t j = 0; j < 2; ++j)
+        {
+            // Without the fix in place, the output from LARGE()/SMALL() would 
have been 0
+            CPPUNIT_ASSERT_EQUAL(aCheck[i][j], pDoc->GetValue(ScAddress(j, i + 
8, 0)));
+        }
+    }
+}
+
 CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testSheetNamesXLSX)
 {
     createScDoc("xlsx/sheet-names.xlsx");

Reply via email to