sc/qa/unit/data/ods/autoheight2rows.ods |binary sc/qa/unit/subsequent_filters-test.cxx | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+)
New commits: commit 65711e07760fbf5360bb5b7ea07dacea4b140c56 Author: Vasily Melenchuk <[email protected]> AuthorDate: Wed Apr 24 12:50:50 2019 +0300 Commit: Thorsten Behrens <[email protected]> CommitDate: Wed Apr 24 15:08:13 2019 +0200 calc: extra unittest for f8506d395206df122bdf9df2ac988c98103be344 Change-Id: Ie2e39f8535cd6c7ec4c395f9278d3ed4704890a6 Reviewed-on: https://gerrit.libreoffice.org/71224 Reviewed-by: Thorsten Behrens <[email protected]> Tested-by: Thorsten Behrens <[email protected]> diff --git a/sc/qa/unit/data/ods/autoheight2rows.ods b/sc/qa/unit/data/ods/autoheight2rows.ods new file mode 100644 index 000000000000..b687701240c1 Binary files /dev/null and b/sc/qa/unit/data/ods/autoheight2rows.ods differ diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 436cd2381f95..a5a276ea055d 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -221,6 +221,7 @@ public: void testBnc762542(); void testTdf62268(); + void testAutoheight2Rows(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBooleanFormatXLSX); @@ -331,6 +332,7 @@ public: CPPUNIT_TEST(testHiddenSheetsXLSX); CPPUNIT_TEST(testTdf62268); + CPPUNIT_TEST(testAutoheight2Rows); CPPUNIT_TEST_SUITE_END(); @@ -3519,6 +3521,23 @@ void ScFiltersTest::testTdf62268() xDocSh->DoClose(); } +void ScFiltersTest::testAutoheight2Rows() +{ + ScDocShellRef xDocSh = loadDoc("autoheight2rows.", FORMAT_ODS); + ScDocument& rDoc = xDocSh->GetDocument(); + + SCTAB nTab = 0; + int nHeight1 = rDoc.GetRowHeight(0, nTab, false); + int nHeight2 = rDoc.GetRowHeight(1, nTab, false); + int nHeight3 = rDoc.GetRowHeight(2, nTab, false); + + // We will do relative comparison, because calculated autoheight + // can be different on different platforms + CPPUNIT_ASSERT_MESSAGE("Row #3 shoud be thinner than #1", nHeight3 < nHeight1); + + xDocSh->DoClose(); +} + ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "sc/qa/unit/data" ) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
