summaryrefslogtreecommitdiff
path: root/sc/qa/unit
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-05-16 13:54:36 +0200
committerXisco Faulí <xiscofauli@libreoffice.org>2020-05-16 14:42:29 +0200
commitaca453050547b586c3c96e332d8f508368f0b434 (patch)
treeb7455b57f435fb52c09d9ae7463544aeaa09c9e9 /sc/qa/unit
parent9c9c4e2ae3fc527ed72861c4031855f42be98107 (diff)
tdf#85617: sc: Add unittest
Change-Id: I3baa89c210bf7bb44543e7b501986aae4ac9f270 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94358 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/unit')
-rw-r--r--sc/qa/unit/data/xlsx/tdf85617.xlsxbin0 -> 6700 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx15
2 files changed, 14 insertions, 1 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf85617.xlsx b/sc/qa/unit/data/xlsx/tdf85617.xlsx
new file mode 100644
index 000000000000..df515f276939
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf85617.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index fe786fb99b0d..e56ebd256eb1 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -244,6 +244,7 @@ public:
void testMergedCellsXLSXML();
void testBackgroundColorStandardXLSXML();
void testTdf131536();
+ void testTdf85617();
void testNamedExpressionsXLSXML();
void testEmptyRowsXLSXML();
void testBorderDirectionsXLSXML();
@@ -390,6 +391,7 @@ public:
CPPUNIT_TEST(testMergedCellsXLSXML);
CPPUNIT_TEST(testBackgroundColorStandardXLSXML);
CPPUNIT_TEST(testTdf131536);
+ CPPUNIT_TEST(testTdf85617);
CPPUNIT_TEST(testNamedExpressionsXLSXML);
CPPUNIT_TEST(testEmptyRowsXLSXML);
CPPUNIT_TEST(testBorderDirectionsXLSXML);
@@ -3833,7 +3835,7 @@ void ScFiltersTest::testBackgroundColorStandardXLSXML()
void ScFiltersTest::testTdf131536()
{
ScDocShellRef xDocSh = loadDoc("tdf131536.", FORMAT_XLSX);
- CPPUNIT_ASSERT_MESSAGE("Failed to load named-exp-global.xml", xDocSh.is());
+ CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
ScAddress aPos(3,9,0);
@@ -3847,6 +3849,17 @@ void ScFiltersTest::testTdf131536()
"=RIGHT(TEXT(INDEX($Comparison.$L:$Z,$Comparison.$A5,$Comparison.D$4),\"0\"),4))", nullptr);
}
+void ScFiltersTest::testTdf85617()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf85617.", FORMAT_XLSX);
+ CPPUNIT_ASSERT_MESSAGE("Failed to load the document", xDocSh.is());
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ ScAddress aPos(2,2,0);
+ //Without the fix in place, it would be Err:509
+ CPPUNIT_ASSERT_EQUAL(4.5, rDoc.GetValue(aPos));
+}
+
void ScFiltersTest::testNamedExpressionsXLSXML()
{
{