summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@poczta.onet.pl>2019-08-09 01:20:37 +0200
committerBartosz Kosiorek <gang65@poczta.onet.pl>2019-08-12 13:10:21 +0200
commitf4a660c38471daa35db2dcfa69fb3ebe56d599b9 (patch)
tree339ddb4573c47b33f0e65c754fd0a27493a8429b /sd
parent13152ad88b24cadc836a829b4424a72a152ca9b1 (diff)
tdf#126746 Fix exporting closed Polylines to PPTX
In previous implementation the closed shapes was imported as a polylines without closing joint. As a result the joint style was not applied. This patch fixes that, and allow proper PPTX export. TODO The same issue needs to be fixed for PPT export Change-Id: I557daac1ba02330d8923f7eda3476e67d8711384 Reviewed-on: https://gerrit.libreoffice.org/77179 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 3feaff84fafc23c26ff9c6a716709f17a6c8330b) Reviewed-on: https://gerrit.libreoffice.org/77229 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/odp/closed-shapes.odpbin0 -> 12596 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/closed-shapes.odp b/sd/qa/unit/data/odp/closed-shapes.odp
new file mode 100644
index 000000000000..23460c7dbae5
--- /dev/null
+++ b/sd/qa/unit/data/odp/closed-shapes.odp
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 9c6cc27aa804..f69d63208e6a 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -147,6 +147,7 @@ public:
void testTdf111863();
void testTdf111518();
void testTdf100387();
+ void testClosingShapes();
void testRotateFlip();
void testTdf106867();
void testTdf112280();
@@ -237,6 +238,7 @@ public:
CPPUNIT_TEST(testTdf111863);
CPPUNIT_TEST(testTdf111518);
CPPUNIT_TEST(testTdf100387);
+ CPPUNIT_TEST(testClosingShapes);
CPPUNIT_TEST(testRotateFlip);
CPPUNIT_TEST(testTdf106867);
CPPUNIT_TEST(testTdf112280);
@@ -1122,6 +1124,17 @@ void SdOOXMLExportTest2::testTdf100387()
"/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set/p:cBhvr/p:tgtEl/p:spTgt/p:txEl/p:pRg", "end", "2");
}
+void SdOOXMLExportTest2::testClosingShapes()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/closed-shapes.odp"), ODP);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+ xDocShRef->DoClose();
+ xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:close", 1);
+ assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/a:close", 0);
+}
+
void SdOOXMLExportTest2::testRotateFlip()
{
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/rotate_flip.odp"), ODP);
@@ -1164,6 +1177,7 @@ void SdOOXMLExportTest2::testRotateFlip()
assertXPath(pXmlDocContent, sPt, "x", points[nPointIndex][0]);
assertXPath(pXmlDocContent, sPt, "y", points[nPointIndex][1]);
}
+ assertXPath(pXmlDocContent, sSpPr + "/a:custGeom/a:pathLst/a:path/a:close", 1);
}
}