diff options
author | Mark Hung <marklh9@gmail.com> | 2018-07-18 00:28:06 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2018-07-18 14:59:45 +0200 |
commit | 0197a2ca1602c3ea13fecabd9de7499971830e21 (patch) | |
tree | c57b67c15f3b6e62e090281082425c75bd289b4d | |
parent | 70674228f3afd1019da7314b368a121a9afaa5d2 (diff) |
tdf#118806 sd: specify the motion path origin for pptx.
Motion path animation created by Impress always take the
position of the shape as the origin, so set origin=layout.
Change-Id: I8b4b579f3a2fc282b41a68c4c8d7573d01ad1aa9
Reviewed-on: https://gerrit.libreoffice.org/57583
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
-rwxr-xr-x | sd/qa/unit/data/odp/tdf118806.odp | bin | 0 -> 11999 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 14 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/tdf118806.odp b/sd/qa/unit/data/odp/tdf118806.odp Binary files differnew file mode 100755 index 000000000000..7120fd968542 --- /dev/null +++ b/sd/qa/unit/data/odp/tdf118806.odp diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index b18810b232db..49f43fe0b8ed 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -139,6 +139,7 @@ public: int testTdf115005_FallBack_Images(bool bAddReplacementImages); void testTdf115005_FallBack_Images_On(); void testTdf115005_FallBack_Images_Off(); + void testTdf118806(); void testTdf111789(); /// SmartArt animated elements void testTdf104792(); @@ -208,6 +209,7 @@ public: CPPUNIT_TEST(testTdf115005); CPPUNIT_TEST(testTdf115005_FallBack_Images_On); CPPUNIT_TEST(testTdf115005_FallBack_Images_Off); + CPPUNIT_TEST(testTdf118806); CPPUNIT_TEST(testTdf111789); CPPUNIT_TEST(testTdf104792); CPPUNIT_TEST(testTdf90627); @@ -1597,6 +1599,18 @@ void SdOOXMLExportTest2::testTdf115005_FallBack_Images_Off() CPPUNIT_ASSERT_EQUAL(0, nPNGFiles); } +void SdOOXMLExportTest2::testTdf118806() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf118806.odp"), ODP); + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + + xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml"); + assertXPath(pXmlDocContent, "//p:animMotion", "origin", "layout"); + + xDocShRef->DoClose(); +} + void SdOOXMLExportTest2::testTdf111789() { // Shadow properties were not exported for text shapes. diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index c8b530ea35a0..a1348e3e29c0 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1186,6 +1186,7 @@ void PowerPointExport::WriteAnimationNodeAnimate(const FSHelperPtr& pFS, const R xMotion->getPath() >>= aPath; pFS->startElementNS(XML_p, nXmlNodeType, + XML_origin, "layout", XML_path, OUStringToOString(aPath, RTL_TEXTENCODING_UTF8), FSEND); } |