diff options
author | Mark Hung <marklh9@gmail.com> | 2016-06-02 01:45:55 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2016-06-30 14:55:41 +0000 |
commit | 0381026924947c6164d1eebe7395c91f619965ce (patch) | |
tree | e54b75bc17a9f08d284cdc721e049745a1fb8698 /sd | |
parent | 5ee7caad68fecfb2124dd90e077597e92b6400c9 (diff) |
tdf#100179 correct cell merging in pptx.
Change-Id: I7a5bc6fb33c64d1ff398986eff5b960fe037df4d
Reviewed-on: https://gerrit.libreoffice.org/25791
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'sd')
-rwxr-xr-x | sd/qa/unit/data/odp/cellspan.odp | bin | 0 -> 13489 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/cellspan.odp b/sd/qa/unit/data/odp/cellspan.odp Binary files differnew file mode 100755 index 000000000000..775e1e40039e --- /dev/null +++ b/sd/qa/unit/data/odp/cellspan.odp diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index a2c3be24bd97..5d79439eeb57 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -128,6 +128,7 @@ public: void testCellLeftAndRightMargin(); void testRightToLeftParaghraph(); void testTextboxWithHyperlink(); + void testMergedCells(); void testTableCellBorder(); void testBulletColor(); void testTdf62176(); @@ -185,6 +186,7 @@ public: CPPUNIT_TEST(testCellLeftAndRightMargin); CPPUNIT_TEST(testRightToLeftParaghraph); CPPUNIT_TEST(testTextboxWithHyperlink); + CPPUNIT_TEST(testMergedCells); CPPUNIT_TEST(testTableCellBorder); CPPUNIT_TEST(testBulletColor); CPPUNIT_TEST(testTdf62176); @@ -1356,6 +1358,23 @@ void SdExportTest::testCellLeftAndRightMargin() xDocShRef->DoClose(); } +void SdExportTest::testMergedCells() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/cellspan.odp"), ODP); + xDocShRef = saveAndReload( xDocShRef, PPTX ); + const SdrPage *pPage = GetPage( 1, xDocShRef ); + + sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0)); + + CPPUNIT_ASSERT( pTableObj ); + uno::Reference< table::XTable > xTable(pTableObj->getTable(), uno::UNO_QUERY_THROW); + uno::Reference< text::XTextRange > xText1(xTable->getCellByPosition(3, 0), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL( OUString("0,3"), xText1->getString() ); + + uno::Reference< text::XTextRange > xText2(xTable->getCellByPosition(3, 2), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL( OUString("2,3"), xText2->getString() ); +} + void SdExportTest::testTableCellBorder() { ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/n90190.pptx"), PPTX); |