From 60cbd35ce87cb34f01b9c3689e53379c49b6bfce Mon Sep 17 00:00:00 2001 From: PriyankaGaikwad Date: Tue, 14 Apr 2015 14:55:29 +0530 Subject: tdf#90605 : FILESAVE:PPTX Line shape style was not exported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem description: tag of line shape are not exported. It will export the line shape with no style. Fixed for export of line shape style Change-Id: I1ad8d8c3795f180964b551d7501465170e495c61 Reviewed-on: https://gerrit.libreoffice.org/15297 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sd/qa/unit/data/pptx/lineStyle.pptx | Bin 0 -> 31446 bytes sd/qa/unit/export-tests.cxx | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 sd/qa/unit/data/pptx/lineStyle.pptx (limited to 'sd/qa') diff --git a/sd/qa/unit/data/pptx/lineStyle.pptx b/sd/qa/unit/data/pptx/lineStyle.pptx new file mode 100644 index 000000000000..0af7efabfcb5 Binary files /dev/null and b/sd/qa/unit/data/pptx/lineStyle.pptx differ diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index e0878a713855..60a209b84676 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -85,6 +85,7 @@ public: void testImageWithSpecialID(); void testTableCellFillProperties(); void testBulletStartNumber(); + void testLineStyle(); #if !defined WNT void testBnc822341(); #endif @@ -109,6 +110,7 @@ public: CPPUNIT_TEST(testImageWithSpecialID); CPPUNIT_TEST(testTableCellFillProperties); CPPUNIT_TEST(testBulletStartNumber); + CPPUNIT_TEST(testLineStyle); #if !defined WNT CPPUNIT_TEST(testBnc822341); #endif @@ -807,6 +809,26 @@ void SdExportTest::testBulletStartNumber() xDocShRef->DoClose(); } +void SdExportTest::testLineStyle() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("sd/qa/unit/data/pptx/lineStyle.pptx"), PPTX); + xDocShRef = saveAndReload( xDocShRef, PPTX ); + + SdDrawDocument const* pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE("no document", pDoc != nullptr); + SdrPage const* pPage = pDoc->GetPage(1); + CPPUNIT_ASSERT_MESSAGE("no page", pPage != nullptr); + SdrObject const* pShape = pPage->GetObj(0); + CPPUNIT_ASSERT_MESSAGE("no shape", pShape != nullptr); + + const XLineStyleItem& rStyleItem = dynamic_cast( + pShape->GetMergedItem(XATTR_LINESTYLE)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong style",drawing::LineStyle_SOLID, rStyleItem.GetValue()); + + xDocShRef->DoClose(); + +} + #if !defined WNT void SdExportTest::testBnc822341() -- cgit