diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-03-01 16:31:58 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-03-01 21:59:03 +0100 |
commit | 8e3548af67218034c9fc816c011ae4b16e081e16 (patch) | |
tree | 9129ce2478c03d38591db67274a28b7c27ea0184 /sc | |
parent | 4f35958c64d5e63c30e67434936c3a0352f57698 (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>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/ods/tdf118086.ods | bin | 0 -> 17202 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 20 |
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 Binary files differnew file mode 100644 index 000000000000..00e2d93f7122 --- /dev/null +++ b/sc/qa/unit/data/ods/tdf118086.ods 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); |