summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2019-11-22 14:05:24 +0300
committerAndras Timar <andras.timar@collabora.com>2019-11-22 23:18:37 +0100
commitbe2a1c28573bb6de0def84b69c15f1079b76bdb5 (patch)
tree803d271bf7005d2c140435241373240b058a1ac8 /sd
parentab15169b523a3d84b09a7b3177473efc3e8cca05 (diff)
tdf#128952 Set the position of shape for 180 deg.
If the rotation value is 180, 540, 900... degree with mirror pShape->GetRotateAngle() returns 0. In that control 0 means no rotation but that is not true. For that cases (180, 540, 900) after the angle conversition GetRotateAngle() returns 0. We should recalculate the position for 0 too. Change-Id: I14e981235b2d6cd8382d4c9e151bccd2e73a3fd9 Reviewed-on: https://gerrit.libreoffice.org/83468 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit aca2e4d270f472b2cbdb9084a55f1855529ea705) Reviewed-on: https://gerrit.libreoffice.org/83534 Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf128952.pptxbin0 -> 25578 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf128952.pptx b/sd/qa/unit/data/pptx/tdf128952.pptx
new file mode 100644
index 000000000000..242a3ee9ace5
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf128952.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 05d7d3aff31b..ddc41b563c99 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -80,6 +80,7 @@ public:
void testParaMarginAndindentation();
void testTdf111884();
void testTdf112633();
+ void testTdf128952();
void testCustomXml();
void testTdf94238();
void testPictureTransparency();
@@ -116,6 +117,7 @@ public:
CPPUNIT_TEST(testParaMarginAndindentation);
CPPUNIT_TEST(testTdf111884);
CPPUNIT_TEST(testTdf112633);
+ CPPUNIT_TEST(testTdf128952);
CPPUNIT_TEST(testCustomXml);
CPPUNIT_TEST(testTdf94238);
CPPUNIT_TEST(testTdf125554);
@@ -812,6 +814,21 @@ void SdOOXMLExportTest1::testTdf112633()
CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName("ppt/media/hdphoto1.wdp")));
}
+void SdOOXMLExportTest1::testTdf128952()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf128952.pptx"), PPTX);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+ xDocShRef->DoClose();
+
+ xmlDocPtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:off", "x", "360");
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:off", "y", "-360");
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:ext", "cx", "1919880");
+ assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:ext", "cy", "1462680");
+}
+
void SdOOXMLExportTest1::testCustomXml()
{
// Load document and export it to a temporary file