diff options
author | Charu Tyagi <charu.tyagi@ericsson.com> | 2015-04-21 15:04:34 +0530 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-14 13:29:03 +0000 |
commit | 58f43ab810311d8b7238317f4cec5346eebdbb17 (patch) | |
tree | 90fd82b78ce0087b86c7e57b41190c873d86cacb /sd | |
parent | b6044f76405cdf2a956d2c429d5d29f4c711363c (diff) |
tdf#90607-Test Case for the patch
Change-Id: Ifcd75cc47baf9da7b3480a4a1e51853aa66c3f1c
Reviewed-on: https://gerrit.libreoffice.org/15458
Tested-by: Jenkins <ci@libreoffice.org>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/fdo90607.pptx | bin | 0 -> 34719 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 26 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sd/qa/unit/data/fdo90607.pptx b/sd/qa/unit/data/fdo90607.pptx Binary files differnew file mode 100644 index 000000000000..0c01aa81ec29 --- /dev/null +++ b/sd/qa/unit/data/fdo90607.pptx diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 036e179fc857..3151afb42e87 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -103,11 +103,13 @@ public: void testBulletMarginAndIndentation(); void testParaMarginAndindentation(); + void testFdo90607(); #if !defined WNT void testBnc822341(); #endif CPPUNIT_TEST_SUITE(SdExportTest); + CPPUNIT_TEST(testFdo90607); CPPUNIT_TEST(testN821567); CPPUNIT_TEST(testBnc870233_1); CPPUNIT_TEST(testBnc870233_2); @@ -527,6 +529,30 @@ void SdExportTest::testBnc822347_EmptyBullet() xDocShRef->DoClose(); } +//Bullets not having any text following them are not getting exported to pptx correctly. +void SdExportTest::testFdo90607() +{ + sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/fdo90607.pptx"), PPTX); + xDocShRef = saveAndReload(xDocShRef, PPTX); + + uno::Reference< drawing::XDrawPagesSupplier > xDoc( + xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW ); + + uno::Reference< drawing::XDrawPage > xPage( + xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW ); + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + + const SdrPage *pPage = pDoc->GetPage(1); + CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); + SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pPage->GetObj(1) ); + CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL); + OutlinerParaObject* pOutlinerParagraphObject = pTxtObj->GetOutlinerParaObject(); + const sal_Int16 nDepth = pOutlinerParagraphObject->GetDepth(0); + CPPUNIT_ASSERT_MESSAGE("not equal", nDepth != -1); + xDocShRef->DoClose(); +} + void SdExportTest::testFdo83751() { ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/fdo83751.pptx"), PPTX); |