summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorPriyankaGaikwad <priyanka.gaikwad@synerzip.com>2015-04-14 14:55:29 +0530
committerCaolán McNamara <caolanm@redhat.com>2015-04-21 19:36:26 +0000
commit60cbd35ce87cb34f01b9c3689e53379c49b6bfce (patch)
tree4ee81786c0dafaa0355838948ecbe08f1c214b29 /sd
parent79c3946e11eb909fd258a9a1c1b4075de2e7be13 (diff)
tdf#90605 : FILESAVE:PPTX Line shape style was not exported
Problem description: <p:style> 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 <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/lineStyle.pptxbin0 -> 31446 bytes
-rw-r--r--sd/qa/unit/export-tests.cxx22
2 files changed, 22 insertions, 0 deletions
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
--- /dev/null
+++ b/sd/qa/unit/data/pptx/lineStyle.pptx
Binary files 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<const XLineStyleItem&>(
+ pShape->GetMergedItem(XATTR_LINESTYLE));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong style",drawing::LineStyle_SOLID, rStyleItem.GetValue());
+
+ xDocShRef->DoClose();
+
+}
+
#if !defined WNT
void SdExportTest::testBnc822341()