diff options
Diffstat (limited to 'sc/qa/unit/subsequent_filters-test.cxx')
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 6aa41875f61c..3252d9143fc8 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -245,6 +245,7 @@ public: void testBorderColorsXLSXML(); void testHiddenRowsColumnsXLSXML(); void testColumnWidthRowHeightXLSXML(); + void testTdf62268(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBooleanFormatXLSX); @@ -376,6 +377,7 @@ public: CPPUNIT_TEST(testHiddenRowsColumnsXLSXML); CPPUNIT_TEST(testColumnWidthRowHeightXLSXML); CPPUNIT_TEST(testCondFormatFormulaListenerXLSX); + CPPUNIT_TEST(testTdf62268); CPPUNIT_TEST_SUITE_END(); @@ -2652,8 +2654,8 @@ void ScFiltersTest::testMiscRowHeights() TestParam::RowData MultiLineOptData[] = { - // Row 0 is 12.63 mm and optimal flag is set - { 0, 0, 0, 1263, CHECK_OPTIMAL, true }, + // Row 0 is 12.63 mm, but optimal flag is set + { 0, 0, 0, 1236, CHECK_OPTIMAL, true }, // Row 1 is 11.99 mm and optimal flag is NOT set { 1, 1, 0, 1199, CHECK_OPTIMAL, false }, }; @@ -2685,8 +2687,9 @@ void ScFiltersTest::testOptimalHeightReset() ScDocument& rDoc = xDocSh->GetDocument(); // open document in read/write mode ( otherwise optimal height stuff won't // be triggered ) *and* you can't delete cell contents. - int nHeight = sc::TwipsToHMM ( rDoc.GetRowHeight(nRow, nTab, false) ); - CPPUNIT_ASSERT_EQUAL(1263, nHeight); + int nHeight = rDoc.GetRowHeight(nRow, nTab, false); + // Due to some minor differences on Mac this comparison is made bit fuzzy + CPPUNIT_ASSERT_LESSEQUAL( 3, abs( nHeight - 701 ) ); ScDocFunc &rFunc = xDocSh->GetDocFunc(); @@ -4059,6 +4062,21 @@ void ScFiltersTest::testCondFormatFormulaListenerXLSX() xDocSh->DoClose(); } +void ScFiltersTest::testTdf62268() +{ + ScDocShellRef xDocSh = loadDoc("tdf62268.", FORMAT_ODS); + ScDocument& rDoc = xDocSh->GetDocument(); + int nHeight; + + SCTAB nTab = 0; + nHeight = rDoc.GetRowHeight(0, nTab, false); + CPPUNIT_ASSERT_EQUAL(256, nHeight); + nHeight = rDoc.GetRowHeight(1, nTab, false); + CPPUNIT_ASSERT_EQUAL(1905, nHeight); + + xDocSh->DoClose(); +} + ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "sc/qa/unit/data" ) { |