summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-03-01 16:31:58 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-03-01 21:59:03 +0100
commit8e3548af67218034c9fc816c011ae4b16e081e16 (patch)
tree9129ce2478c03d38591db67274a28b7c27ea0184
parent4f35958c64d5e63c30e67434936c3a0352f57698 (diff)
tdf#118086: sc_subsequent_filters: Add unittest
Change-Id: I90d8a58ef4d7304a0c1788bf3f074bc9589965e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111759 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sc/qa/unit/data/ods/tdf118086.odsbin0 -> 17202 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx20
2 files changed, 20 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/tdf118086.ods b/sc/qa/unit/data/ods/tdf118086.ods
new file mode 100644
index 000000000000..00e2d93f7122
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf118086.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 8c0b8df909b8..c85f8d2dbdc5 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -208,6 +208,7 @@ public:
void testOptimalHeightReset();
void testCustomNumFormatHybridCellODS();
void testTdf121040();
+ void testTdf118086();
void testTdf118624();
void testTdf124454();
@@ -401,6 +402,7 @@ public:
CPPUNIT_TEST(testOptimalHeightReset);
CPPUNIT_TEST(testCustomNumFormatHybridCellODS);
CPPUNIT_TEST(testTdf121040);
+ CPPUNIT_TEST(testTdf118086);
CPPUNIT_TEST(testTdf118624);
CPPUNIT_TEST(testTdf124454);
CPPUNIT_TEST(testPrintRangeODS);
@@ -3278,6 +3280,24 @@ void ScFiltersTest::testTdf121040()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf118086()
+{
+ ScDocShellRef xDocSh = loadDoc(u"tdf118086.", FORMAT_ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to load tdf118086.ods", xDocSh.is());
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(477), rDoc.GetRowHeight(2, static_cast<SCTAB>(0), false));
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 256
+ // - Actual : 477
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(256), rDoc.GetRowHeight(2, static_cast<SCTAB>(1), false));
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(256), rDoc.GetRowHeight(2, static_cast<SCTAB>(2), false));
+
+ xDocSh->DoClose();
+}
+
void ScFiltersTest::testTdf118624()
{
ScDocShellRef xDocSh = loadDoc(u"tdf118624.", FORMAT_ODS);