diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2020-11-06 21:18:24 +0300 |
---|---|---|
committer | Gülşah Köse <gulsah.kose@collabora.com> | 2020-11-10 11:38:08 +0100 |
commit | 57752914d10557383e8dd59a2c8f9ab5901ddc57 (patch) | |
tree | 5bca8de652d159673cbbdde5e27abc7e13944448 /sd | |
parent | b676cc53c9d9d24e863143e1ff0282eba413d2b5 (diff) |
tdf#137949 Fix table row heigths.
Consider "Height" property of the the table while calculating
the minimum row height.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105422
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
(cherry picked from commit b7b05dd36403af50b20fe06cbf8a10d8defb28a9)
Change-Id: I4dbb0f7f87517423fd3075515b4b9817d6a9a71a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105466
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf91762.py | 2 | ||||
-rw-r--r-- | sd/qa/unit/data/pptx/tablescale.pptx | bin | 0 -> 44606 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 20 |
3 files changed, 20 insertions, 2 deletions
diff --git a/sd/qa/uitest/impress_tests/tdf91762.py b/sd/qa/uitest/impress_tests/tdf91762.py index 66e650b0bb2a..4fa9f266053c 100644 --- a/sd/qa/uitest/impress_tests/tdf91762.py +++ b/sd/qa/uitest/impress_tests/tdf91762.py @@ -42,7 +42,7 @@ class tdf91762(UITestCase): # tdf#138011: Without the fix in place, this test would have failed with # AssertionError: 5504 != 3559 - self.assertEqual(5504, document.DrawPages[0].getByIndex(1).BoundRect.Height) + self.assertEqual(5494, document.DrawPages[0].getByIndex(1).BoundRect.Height) self.ui_test.close_doc() diff --git a/sd/qa/unit/data/pptx/tablescale.pptx b/sd/qa/unit/data/pptx/tablescale.pptx Binary files differnew file mode 100644 index 000000000000..c4d946e5c619 --- /dev/null +++ b/sd/qa/unit/data/pptx/tablescale.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 9ebb55d39a21..d3e776f2c50d 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -1451,9 +1451,27 @@ void SdImportTest::testRowHeight() uno::Reference< css::table::XTableRows > xRows( xTable->getRows(), uno::UNO_SET_THROW); uno::Reference< beans::XPropertySet > xRefRow( xRows->getByIndex(0), uno::UNO_QUERY_THROW ); xRefRow->getPropertyValue( sHeight ) >>= nHeight; - CPPUNIT_ASSERT_EQUAL( sal_Int32(507), nHeight); + CPPUNIT_ASSERT_EQUAL( sal_Int32(508), nHeight); xDocShRef->DoClose(); + + sd::DrawDocShellRef xDocShRef2 = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tablescale.pptx"), PPTX ); + const SdrPage *pPage2 = GetPage( 1, xDocShRef2 ); + + sdr::table::SdrTableObj *pTableObj2 = dynamic_cast<sdr::table::SdrTableObj*>(pPage2->GetObj(0)); + CPPUNIT_ASSERT( pTableObj2 ); + + uno::Reference< css::table::XTable > xTable2(pTableObj2->getTable(), uno::UNO_SET_THROW); + uno::Reference< css::table::XTableRows > xRows2( xTable2->getRows(), uno::UNO_SET_THROW); + + for(sal_Int32 nRow = 0; nRow < 7; ++nRow) + { + uno::Reference< beans::XPropertySet > xRefRow2( xRows2->getByIndex(nRow), uno::UNO_QUERY_THROW ); + xRefRow2->getPropertyValue( "Height" ) >>= nHeight; + CPPUNIT_ASSERT_EQUAL( sal_Int32(800), nHeight); + } + + xDocShRef2->DoClose(); } void SdImportTest::testTdf93830() |