summaryrefslogtreecommitdiff
path: root/sd/qa
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-09 22:08:28 +0200
commit3feaff84fafc23c26ff9c6a716709f17a6c8330b (patch)
treebf8d72d74b4aa93a3445bd3170b6173ccb640955 /sd/qa
parent3d50afb8c91bdb2e01391c05171815e75dd1e3f3 (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>
Diffstat (limited to 'sd/qa')
-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 ac274d631a2a..031156c786b5 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -152,6 +152,7 @@ public:
void testTdf111863();
void testTdf111518();
void testTdf100387();
+ void testClosingShapes();
void testRotateFlip();
void testTdf106867();
void testTdf112280();
@@ -245,6 +246,7 @@ public:
CPPUNIT_TEST(testTdf111863);
CPPUNIT_TEST(testTdf111518);
CPPUNIT_TEST(testTdf100387);
+ CPPUNIT_TEST(testClosingShapes);
CPPUNIT_TEST(testRotateFlip);
CPPUNIT_TEST(testTdf106867);
CPPUNIT_TEST(testTdf112280);
@@ -1133,6 +1135,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);
@@ -1175,6 +1188,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);
}
}