summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsd/qa/unit/data/pptx/n80340.pptxbin0 -> 83909 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx25
-rw-r--r--svx/source/table/cell.cxx2
3 files changed, 26 insertions, 1 deletions
diff --git a/sd/qa/unit/data/pptx/n80340.pptx b/sd/qa/unit/data/pptx/n80340.pptx
new file mode 100755
index 000000000000..6702075592a8
--- /dev/null
+++ b/sd/qa/unit/data/pptx/n80340.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index c2f00b943272..6b7f99325ca8 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -58,6 +58,7 @@
#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/table/XTableRows.hpp>
#include <stlpool.hxx>
@@ -102,6 +103,7 @@ public:
#endif
void testBulletSuffix();
void testBnc910045();
+ void testRowHeight();
CPPUNIT_TEST_SUITE(SdImportTest);
@@ -140,6 +142,7 @@ public:
#endif
CPPUNIT_TEST(testBulletSuffix);
CPPUNIT_TEST(testBnc910045);
+ CPPUNIT_TEST(testRowHeight);
CPPUNIT_TEST_SUITE_END();
};
@@ -1173,6 +1176,28 @@ void SdImportTest::testBnc910045()
CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor);
}
+void SdImportTest::testRowHeight()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n80340.pptx"), PPTX );
+
+ SdDrawDocument *pDoc = xDocShRef->GetDoc();
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+
+ const SdrPage *pPage = pDoc->GetPage(1);
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+
+ sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
+ CPPUNIT_ASSERT( pTableObj );
+
+ sal_Int32 nHeight;
+ const OUString sHeight("Height");
+ uno::Reference< com::sun::star::table::XTable > xTable(pTableObj->getTable(), uno::UNO_QUERY_THROW);
+ uno::Reference< com::sun::star::table::XTableRows > xRows( xTable->getRows(), uno::UNO_QUERY_THROW);
+ uno::Reference< beans::XPropertySet > xRefRow( xRows->getByIndex(0), uno::UNO_QUERY_THROW );
+ xRefRow->getPropertyValue( sHeight ) >>= nHeight;
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(508), nHeight);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 11aedb88cacf..71da0f146c39 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -727,7 +727,7 @@ sal_Int32 Cell::getMinimumHeight()
pEditOutliner->SetMaxAutoPaperSize(aSize);
nMinimumHeight = pEditOutliner->GetTextHeight()+1;
}
- else /*if ( hasText() )*/
+ else if ( hasText() )
{
Outliner& rOutliner=rTableObj.ImpGetDrawOutliner();
rOutliner.SetPaperSize(aSize);