sc/qa/unit/data/dif/tdf150599.dif |   81 ++++++++++++++++++++++++++++++++++++++
 sc/qa/unit/filters-test.cxx       |   16 +++++++
 2 files changed, 97 insertions(+)

New commits:
commit f2d7f2a28c4334feed4a12eb1553b8d0563c0fc9
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Sep 6 10:13:58 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Sep 6 11:16:50 2022 +0200

    tdf#150599: sc_filters_test: Add unittest
    
    Change-Id: Ibc6434b3505276343da0a36c52ab175aefc518ef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139470
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/unit/data/dif/tdf150599.dif 
b/sc/qa/unit/data/dif/tdf150599.dif
new file mode 100644
index 000000000000..4c60f8be2749
--- /dev/null
+++ b/sc/qa/unit/data/dif/tdf150599.dif
@@ -0,0 +1,81 @@
+TABLE
+0,1
+"EXCEL"
+VECTORS
+0,315
+""
+TUPLES
+0,32
+""
+DATA
+0,0
+""
+-1,0
+BOT
+0,1
+V
+0,2
+V
+0,3
+V
+0,4
+V
+0,5
+V
+0,6
+V
+0,7
+V
+0,8
+V
+0,9
+V
+0,10
+V
+0,11
+V
+0,12
+V
+0,13
+V
+0,14
+V
+0,15
+V
+0,16
+V
+0,17
+V
+0,18
+V
+0,19
+V
+0,20
+V
+0,21
+V
+0,22
+V
+0,23
+V
+0,24
+V
+0,25
+V
+0,26
+V
+0,27
+V
+0,28
+V
+0,29
+V
+0,30
+V
+0,31
+V
+0,32
+V
+-1,0
+
+EOD
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 55e845417d07..738f36e9828d 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -74,6 +74,7 @@ public:
     void testSharedFormulaRefUpdateXLSX();
     void testSheetNamesXLSX();
     void testTdf79998();
+    void testTdf150599();
     void testCommentSize();
     void testLegacyCellAnchoredRotatedShape();
     void testEnhancedProtectionXLS();
@@ -103,6 +104,7 @@ public:
     CPPUNIT_TEST(testSharedFormulaRefUpdateXLSX);
     CPPUNIT_TEST(testSheetNamesXLSX);
     CPPUNIT_TEST(testTdf79998);
+    CPPUNIT_TEST(testTdf150599);
     CPPUNIT_TEST(testCommentSize);
     CPPUNIT_TEST(testLegacyCellAnchoredRotatedShape);
     CPPUNIT_TEST(testEnhancedProtectionXLS);
@@ -489,6 +491,20 @@ void ScFiltersTest::testTdf79998()
     xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTdf150599()
+{
+    ScDocShellRef xDocSh = loadDoc(u"tdf150599.", FORMAT_DIF);
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    // Without the fix in place, this test would have failed with
+    // - Expected: 1
+    // - Actual  : #IND:?
+    CPPUNIT_ASSERT_EQUAL(OUString("1"), rDoc.GetString(ScAddress(0, 0, 0)));
+    CPPUNIT_ASSERT_EQUAL(OUString("32"), rDoc.GetString(ScAddress(31, 0, 0)));
+
+    xDocSh->DoClose();
+}
+
 void ScFiltersTest::testCommentSize()
 {
     ScDocShellRef xDocSh = loadDoc(u"comment.", FORMAT_ODS);

Reply via email to