summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-08-01 14:08:34 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-08-10 16:18:28 +0200
commitab296726263655bd3a722c125dd9cec2d507aaa5 (patch)
treec9221b42ec1cabd9fde7d62340d3f2776abc950b /sd
parent3cc5149a84c7b8cfaf0deb2e2f6c88c72343ee28 (diff)
tdf#91999 export/drawingml: shape rotate 180 is not special
This commit reverts the first (LO 4.3ish) regression commit 6063555744ed89d8a757b667cddcdd4357839466 and most of the two commits that tried to fix that: commit 9ae1e094d5a8a5b4432c88ebea0ca9fc1c79f602 and commit ee45d881efab230e7682f964d6ad4d00f85b0006 in LO6.0/6.2. The ooxmlexport6 unit test shows that there is nothing special about 180degrees. So, all transformations need to be avoided in docx format - not just 180 degree ones. I removed IsInGroupShape() since it is no longer being used - as per standard procedures. Change-Id: Id2bba5bc542875a10ac21fbb67f29b2d59705493 Reviewed-on: https://gerrit.libreoffice.org/58434 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf91999_rotateShape.pptxbin0 -> 21431 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx17
2 files changed, 16 insertions, 1 deletions
diff --git a/sd/qa/unit/data/pptx/tdf91999_rotateShape.pptx b/sd/qa/unit/data/pptx/tdf91999_rotateShape.pptx
new file mode 100644
index 000000000000..7559597b74e8
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf91999_rotateShape.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index fdbcc65d7778..341fd9117475 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -123,6 +123,7 @@ public:
void testGroupRotation();
void testTdf104788();
void testSmartartRotation2();
+ void testTdf91999_rotateShape();
void testTdf114845_rotateShape();
void testGroupsPosition();
void testGroupsRotatedPosition();
@@ -198,6 +199,7 @@ public:
CPPUNIT_TEST(testGroupRotation);
CPPUNIT_TEST(testTdf104788);
CPPUNIT_TEST(testSmartartRotation2);
+ CPPUNIT_TEST(testTdf91999_rotateShape);
CPPUNIT_TEST(testTdf114845_rotateShape);
CPPUNIT_TEST(testGroupsPosition);
CPPUNIT_TEST(testGroupsRotatedPosition);
@@ -1312,7 +1314,20 @@ void SdOOXMLExportTest2::testSmartartRotation2()
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:txBody/a:p/a:r/a:t", "Text");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:txBody/a:bodyPr", "rot", "10800000");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off", "x", "2276280");
- assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off", "y", "3158280");
+}
+
+void SdOOXMLExportTest2::testTdf91999_rotateShape()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf91999_rotateShape.pptx"), PPTX);
+ 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[2]/p:nvSpPr/p:cNvPr", "name", "CustomShape 2");
+ assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm", "rot", "10800000");
+ assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm/a:off", "x", "2960640");
+ assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm/a:off", "y", "1449000");
}
void SdOOXMLExportTest2::testTdf114845_rotateShape()