summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-03-27 13:53:25 +0100
committerXisco Faulí <xiscofauli@libreoffice.org>2020-03-27 16:42:01 +0100
commit0900c57f17e16b65309f7c5932e15354e923dd4a (patch)
treefbb11cf28f67484d1147485ffe1d0beaf9df04b0 /sc
parent7b23e0f3ae6b2fb1cebe97c6517eb18f9ed4a76e (diff)
tdf#131380: Add unittest
Change-Id: I9111c82919b9e30200fbb265143e072f7f3b3363 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91205 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/xlsx/tdf131380.xlsxbin0 -> 12384 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx22
2 files changed, 22 insertions, 0 deletions
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
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf131380.xlsx
Binary files 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();
}