[Libreoffice-commits] core.git: oox/source sd/qa
PriyankaGaikwad
priyanka.gaikwad at synerzip.com
Tue Apr 21 12:39:03 PDT 2015
oox/source/export/shapes.cxx | 5 +++++
sd/qa/unit/data/pptx/lineStyle.pptx |binary
sd/qa/unit/export-tests.cxx | 22 ++++++++++++++++++++++
3 files changed, 27 insertions(+)
New commits:
commit 60cbd35ce87cb34f01b9c3689e53379c49b6bfce
Author: PriyankaGaikwad <priyanka.gaikwad at synerzip.com>
Date: Tue Apr 14 14:55:29 2015 +0530
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 at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 95b0b37..c95f99c 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -784,6 +784,11 @@ ShapeExport& ShapeExport::WriteLineShape( Reference< XShape > xShape )
WriteOutline( xShapeProps );
pFS->endElementNS( mnXmlNamespace, XML_spPr );
+ //write style
+ pFS->startElementNS( mnXmlNamespace, XML_style, FSEND );
+ WriteShapeStyle( xShapeProps );
+ pFS->endElementNS( mnXmlNamespace, XML_style );
+
// write text
WriteTextBox( xShape, mnXmlNamespace );
diff --git a/sd/qa/unit/data/pptx/lineStyle.pptx b/sd/qa/unit/data/pptx/lineStyle.pptx
new file mode 100644
index 0000000..0af7efa
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 e0878a7..60a209b 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()
More information about the Libreoffice-commits
mailing list