diff options
-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" ) { |