diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2019-04-24 12:50:50 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-04-25 11:27:17 +0200 |
commit | 5a2aba31867e0912700f6c976f152116d902fe21 (patch) | |
tree | 6eb82bc233cd3c2b6a81408f772cc07c912b31e7 /sc | |
parent | 36534437d773dc517a348331c6a6e9336f390e90 (diff) |
calc: extra unittest for rows autoheight on load
Change-Id: Ie5310d3c3d4fde59a0718dbda228c638b7e0c366
Reviewed-on: https://gerrit.libreoffice.org/71235
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/ods/autoheight2rows.ods | bin | 0 -> 19351 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 18 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/autoheight2rows.ods b/sc/qa/unit/data/ods/autoheight2rows.ods Binary files differnew file mode 100644 index 000000000000..b687701240c1 --- /dev/null +++ b/sc/qa/unit/data/ods/autoheight2rows.ods diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index e7b719d35a14..f4d579504a3c 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -247,6 +247,7 @@ public: void testCharacterSetXLSXML(); void testTdf62268(); void testVBAMacroFunctionODS(); + void testAutoheight2Rows(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBooleanFormatXLSX); @@ -385,6 +386,7 @@ public: CPPUNIT_TEST(testCondFormatFormulaListenerXLSX); CPPUNIT_TEST(testTdf62268); CPPUNIT_TEST(testVBAMacroFunctionODS); + CPPUNIT_TEST(testAutoheight2Rows); CPPUNIT_TEST_SUITE_END(); @@ -4251,6 +4253,22 @@ void ScFiltersTest::testVBAMacroFunctionODS() 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 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" ) { |