summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-09-28 11:41:42 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-09-28 15:25:11 +0200
commite5d086c31e6765430f8c366196fb4a2b0c25924d (patch)
treeca8a718cbb89493b2bc503119d7321d2e817b5da /sc
parent95a16f0104a9e9722937d5b2c4db45388d7a58a9 (diff)
tdf#144740: sc_subsequent_filters_test2: Add unittest
Change-Id: Ida3de565a736ad512e0fb7e1ef78545fefaba639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122761 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/ods/tdf144740.odsbin0 -> 7908 bytes
-rw-r--r--sc/qa/unit/subsequent_filters_test2.cxx16
2 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf144740.ods b/sc/qa/unit/data/ods/tdf144740.ods
new file mode 100644
index 000000000000..5c9f7c2b0e8b
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf144740.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx
index 4803e19cbab8..840bf5042e65 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -205,6 +205,7 @@ public:
void testDrawCircleInMergeCells();
void testDeleteCirclesInRowAndCol();
void testTdf129940();
+ void testTdf144740();
void testTdf139763ShapeAnchor();
void testAutofilterNamedRangesXLSX();
void testInvalidBareBiff5();
@@ -312,6 +313,7 @@ public:
CPPUNIT_TEST(testDrawCircleInMergeCells);
CPPUNIT_TEST(testDeleteCirclesInRowAndCol);
CPPUNIT_TEST(testTdf129940);
+ CPPUNIT_TEST(testTdf144740);
CPPUNIT_TEST(testTdf139763ShapeAnchor);
CPPUNIT_TEST(testAutofilterNamedRangesXLSX);
CPPUNIT_TEST(testInvalidBareBiff5);
@@ -2845,6 +2847,20 @@ void ScFiltersTest2::testTdf129940()
xDocSh->DoClose();
}
+void ScFiltersTest2::testTdf144740()
+{
+ ScDocShellRef xDocSh = loadDoc(u"tdf144740.", FORMAT_ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to load tdf144740.ods", xDocSh.is());
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 1
+ // - Actual : 2
+ CPPUNIT_ASSERT_EQUAL(1.0, rDoc.GetValue(ScAddress(1, 0, 0)));
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest2::testTdf139763ShapeAnchor()
{
ScDocShellRef xDocSh = loadDoc(u"tdf139763ShapeAnchor.", FORMAT_XLSX);