Kaydet (Commit) 0197a2ca authored tarafından Mark Hung's avatar Mark Hung

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: 's avatarMark Hung <marklh9@gmail.com>
üst 70674228
......@@ -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.
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment