From 58f43ab810311d8b7238317f4cec5346eebdbb17 Mon Sep 17 00:00:00 2001 From: Charu Tyagi Date: Tue, 21 Apr 2015 15:04:34 +0530 Subject: tdf#90607-Test Case for the patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifcd75cc47baf9da7b3480a4a1e51853aa66c3f1c Reviewed-on: https://gerrit.libreoffice.org/15458 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- sd/qa/unit/data/fdo90607.pptx | Bin 0 -> 34719 bytes sd/qa/unit/export-tests.cxx | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 sd/qa/unit/data/fdo90607.pptx (limited to 'sd') diff --git a/sd/qa/unit/data/fdo90607.pptx b/sd/qa/unit/data/fdo90607.pptx new file mode 100644 index 000000000000..0c01aa81ec29 Binary files /dev/null and b/sd/qa/unit/data/fdo90607.pptx differ 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( 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); -- cgit