summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-07-03 13:50:20 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-07-03 18:06:04 +0200
commit3d79ac71d18566e0bd697eae119d6202dc01b494 (patch)
treee1165559b5128832fe3c38c7859f59175e414a07 /sc
parentd35b796efbab3ca08458f3dbeb489b05a05c55a5 (diff)
tdf#35636: sc: Add unittest
Change-Id: I79eee92015b4a4eafd57702e2ac1bf7fe1682f0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97840 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/ods/tdf35636.odsbin0 -> 9366 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx16
2 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf35636.ods b/sc/qa/unit/data/ods/tdf35636.ods
new file mode 100644
index 000000000000..4ac33ccb4608
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf35636.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 0c332f605f58..8c8f4f292862 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -263,6 +263,7 @@ public:
void testColumnWidthRowHeightXLSXML();
void testCharacterSetXLSXML();
void testTdf62268();
+ void testTdf35636();
void testVBAMacroFunctionODS();
void testAutoheight2Rows();
void testXLSDefColWidth();
@@ -421,6 +422,7 @@ public:
CPPUNIT_TEST(testCharacterSetXLSXML);
CPPUNIT_TEST(testCondFormatFormulaListenerXLSX);
CPPUNIT_TEST(testTdf62268);
+ CPPUNIT_TEST(testTdf35636);
CPPUNIT_TEST(testVBAMacroFunctionODS);
CPPUNIT_TEST(testAutoheight2Rows);
CPPUNIT_TEST(testXLSDefColWidth);
@@ -4554,6 +4556,20 @@ void ScFiltersTest::testTdf62268()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf35636()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf35636.", FORMAT_ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ // Without the fix in place, SUMIF would have returned 0.0
+ // with empty cells in the criteria
+ CPPUNIT_ASSERT_EQUAL(50.0, rDoc.GetValue(ScAddress(1,4,0)));
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testVBAMacroFunctionODS()
{
ScDocShellRef xDocSh = loadDoc("vba_macro_functions.", FORMAT_ODS);