summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2020-11-02 23:32:06 +0300
committerGülşah Köse <gulsah.kose@collabora.com>2020-11-04 22:48:32 +0100
commit7dc234fa57ca409d0db131c93abea738014b5e1f (patch)
tree84f1bcfd7f297dbae19ec9d0a22ae716e0cc053c /sd
parentb05955b480fe4d32852e7be8a118d46ca7e6dbfa (diff)
tdf#137949 Fix table row heigths.
Consider "Height" property of the the table while calculating the minimum row height. Change-Id: I4a57b69c4c0fc4dd004c895bd105ebc70f0c4bb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105228 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tablescale.pptxbin0 -> 44606 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx20
2 files changed, 19 insertions, 1 deletions
diff --git a/sd/qa/unit/data/pptx/tablescale.pptx b/sd/qa/unit/data/pptx/tablescale.pptx
new file mode 100644
index 000000000000..c4d946e5c619
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tablescale.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 11cbbb4f98b7..6e6b08d2bad2 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1482,9 +1482,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( "Height" ) >>= 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()