[Libreoffice-commits] core.git: sc/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Fri Mar 27 15:42:38 UTC 2020


 sc/qa/unit/data/xlsx/tdf131380.xlsx    |binary
 sc/qa/unit/subsequent_filters-test.cxx |   22 ++++++++++++++++++++++
 2 files changed, 22 insertions(+)

New commits:
commit 0900c57f17e16b65309f7c5932e15354e923dd4a
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Mar 27 13:53:25 2020 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Fri Mar 27 16:42:01 2020 +0100

    tdf#131380: Add unittest
    
    Change-Id: I9111c82919b9e30200fbb265143e072f7f3b3363
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91205
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/data/xlsx/tdf131380.xlsx b/sc/qa/unit/data/xlsx/tdf131380.xlsx
new file mode 100644
index 000000000000..14c5a2ddb59d
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf131380.xlsx differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index ecc1a1003ee1..ac4de0827b5c 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -228,6 +228,7 @@ public:
     void testTdf97598XLSX();
     void testTdf110440XLSX();
     void testTdf130959();
+    void testTdf131380();
     void testTdf111974XLSM();
     void testTdf83672XLSX();
 
@@ -373,6 +374,7 @@ public:
     CPPUNIT_TEST(testTdf97598XLSX);
     CPPUNIT_TEST(testTdf110440XLSX);
     CPPUNIT_TEST(testTdf130959);
+    CPPUNIT_TEST(testTdf131380);
     CPPUNIT_TEST(testTdf111974XLSM);
     CPPUNIT_TEST(testTdf83672XLSX);
 
@@ -3547,6 +3549,22 @@ void ScFiltersTest::testTdf130959()
     // Would crash without the fix on loading
     ScDocShellRef xDocSh = loadDoc("tdf130959.", FORMAT_XLSX);
     CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+
+    ScDocument& rDoc = xDocSh->GetDocument();
+    rDoc.CalcAll(); // perform hard re-calculation.
+
+    xDocSh->DoClose();
+}
+
+void ScFiltersTest::testTdf131380()
+{
+    ScDocShellRef xDocSh = loadDoc("tdf131380.", FORMAT_XLSX);
+    CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+
+    // Would crash without the fix on recalculating
+    ScDocument& rDoc = xDocSh->GetDocument();
+    rDoc.CalcAll(); // perform hard re-calculation.
+
     xDocSh->DoClose();
 }
 
@@ -3555,6 +3573,10 @@ void ScFiltersTest::testTdf111974XLSM()
     // Would crash without the fix on loading
     ScDocShellRef xDocSh = loadDoc("tdf111974.", FORMAT_XLSM);
     CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+
+    ScDocument& rDoc = xDocSh->GetDocument();
+    rDoc.CalcAll(); // perform hard re-calculation.
+
     xDocSh->DoClose();
 }
 


More information about the Libreoffice-commits mailing list