summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Trojahn <paul.trojahn@gmail.com>2017-09-23 15:17:13 +0200
committerAron Budea <aron.budea@collabora.com>2018-02-09 20:30:37 +0100
commit999df3e27d6ab582a67bd7c47a6e4ebb123bdcf3 (patch)
tree47ff17899b094e094188f76fbb6c6c6cde61fca4
parent804c52e5e4412880639d816a688f284afd85cfcf (diff)
PPTX Fix export of rotated group shapes
The rotation is already applied to the child shapes and must not be added to the group. Reviewed-on: https://gerrit.libreoffice.org/42765 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 465092047d5fa6ec6dd369372e712d76554570ff) Change-Id: Ic564cbcf31a81a248878f0179fdd21144f076b61 (cherry picked from commit b24c5ad7997de08b9da0c928f87df922b9f9797d)
-rw-r--r--oox/source/export/shapes.cxx2
-rw-r--r--sd/qa/unit/data/odp/group_rotation.odpbin0 -> 10429 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx15
3 files changed, 16 insertions, 1 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 871873c968b1..05502d693722 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -525,7 +525,7 @@ ShapeExport& ShapeExport::WriteGroupShape(const uno::Reference<drawing::XShape>&
// visual properties
pFS->startElementNS(mnXmlNamespace, XML_grpSpPr, FSEND);
- WriteShapeTransformation(xShape, XML_a);
+ WriteShapeTransformation(xShape, XML_a, false, false, true);
pFS->endElementNS(mnXmlNamespace, XML_grpSpPr);
uno::Reference<drawing::XShapes> xGroupShape(xShape, uno::UNO_QUERY_THROW);
diff --git a/sd/qa/unit/data/odp/group_rotation.odp b/sd/qa/unit/data/odp/group_rotation.odp
new file mode 100644
index 000000000000..92568c1500d9
--- /dev/null
+++ b/sd/qa/unit/data/odp/group_rotation.odp
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 38bf2980746a..3d1ad4f28b78 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -118,6 +118,7 @@ public:
void testTdf112334();
void testTdf112647();
void testTdf112086();
+ void testGroupRotation();
void testTdf104788();
void testSmartartRotation2();
void testGroupsPosition();
@@ -163,6 +164,7 @@ public:
CPPUNIT_TEST(testTdf112334);
CPPUNIT_TEST(testTdf112647);
CPPUNIT_TEST(testTdf112086);
+ CPPUNIT_TEST(testGroupRotation);
CPPUNIT_TEST(testTdf104788);
CPPUNIT_TEST(testSmartartRotation2);
CPPUNIT_TEST(testGroupsPosition);
@@ -1115,6 +1117,19 @@ void SdOOXMLExportTest2::testTdf114848()
assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val", "1f497d");
}
+void SdOOXMLExportTest2::testGroupRotation()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/group_rotation.odp"), ODP);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+ xDocShRef->DoClose();
+
+ xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ assertXPathNoAttribute(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:grpSpPr/a:xfrm", "rot");
+ assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[1]/p:spPr/a:xfrm", "rot", "20400000");
+ assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[2]/p:spPr/a:xfrm", "rot", "20400000");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
CPPUNIT_PLUGIN_IMPLEMENT();