summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-06-26 20:19:10 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-06-26 21:11:05 +0200
commit17c2bd87e93fadb502e5f7e25696e1736e625d18 (patch)
tree6a462aaa3798320f67917d733fa864515b472d38
parenta4eebe2cf65f84daca56414d5a84f27ee38e5087 (diff)
tdf#103734: sc: Add unittest
Change-Id: Iffc31232e58e0beb6c24f09ef2406c72fa502c00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97261 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sc/qa/unit/data/ods/tdf103734.odsbin0 -> 11871 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf103734.ods b/sc/qa/unit/data/ods/tdf103734.ods
new file mode 100644
index 000000000000..7c706d8b74b1
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf103734.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index c9e895444f91..0cb013df3bda 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -225,6 +225,7 @@ public:
void testBnc762542();
+ void testTdf103734();
void testTdf100458();
void testTdf127982();
void testTdf100709XLSX();
@@ -380,6 +381,7 @@ public:
CPPUNIT_TEST(testHiddenSheetsXLSX);
+ CPPUNIT_TEST(testTdf103734);
CPPUNIT_TEST(testTdf100458);
CPPUNIT_TEST(testTdf127982);
CPPUNIT_TEST(testTdf100709XLSX);
@@ -3730,6 +3732,18 @@ void ScFiltersTest::testRelFormulaValidationXLS()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf103734()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf103734.", FORMAT_ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ // Without the fix in place, MAX() would have returned -1.8E+308
+ CPPUNIT_ASSERT_EQUAL(OUString("#N/A"), rDoc.GetString(ScAddress(2,0,0)));
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testTdf100458()
{
ScDocShellRef xDocSh = loadDoc("tdf100458_lost_zero_value.", FORMAT_ODS);