diff options
author | Aron Budea <aron.budea@collabora.com> | 2017-09-14 07:59:15 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-09-18 16:35:09 +0200 |
commit | 1ea4496f3b2defaf51391e816d159717c55f2929 (patch) | |
tree | 5b9ceda92ea537bafd4367c2d8eb040aa503be38 | |
parent | 5b4314ccb5ae21b7414d85f4b3bebbe972694b1b (diff) |
tdf#111863: Animations turned from out to in during PPTX export
animEffect element's transition attribute was filled from
XTransitionFilter's Direction attribute, while it should have
been Mode.
Change-Id: I40be0311a7b7ffc64ac3a97a92a3ea835faa5293
Reviewed-on: https://gerrit.libreoffice.org/42261
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
-rw-r--r-- | sd/qa/unit/data/pptx/tdf111863.pptx | bin | 0 -> 30755 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 15 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 4 |
3 files changed, 17 insertions, 2 deletions
diff --git a/sd/qa/unit/data/pptx/tdf111863.pptx b/sd/qa/unit/data/pptx/tdf111863.pptx Binary files differnew file mode 100644 index 000000000000..19579ada5aaf --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf111863.pptx diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 820f02723c52..38d39ead02c8 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -101,6 +101,7 @@ public: void testPptmContentType(); void testTdf111798(); void testPptmVBAStream(); + void testTdf111863(); void testTdf111518(); void testTdf100387(); void testRotateFlip(); @@ -135,6 +136,7 @@ public: CPPUNIT_TEST(testPptmContentType); CPPUNIT_TEST(testTdf111798); CPPUNIT_TEST(testPptmVBAStream); + CPPUNIT_TEST(testTdf111863); CPPUNIT_TEST(testTdf111518); CPPUNIT_TEST(testTdf100387); CPPUNIT_TEST(testRotateFlip); @@ -909,6 +911,19 @@ void SdOOXMLExportTest2::testPptmVBAStream() xDocShRef->DoClose(); } +void SdOOXMLExportTest2::testTdf111863() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf111863.pptx"), PPTX); + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + xDocShRef->DoClose(); + + // check that transition attribute didn't change from 'out' to 'in' + xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml"); + assertXPath(pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:animEffect", + "transition", "out"); +} + void SdOOXMLExportTest2::testTdf111518() { sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf111518.pptx"), PPTX); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 62b0c4c1440b..f5d39c36ba0c 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1482,10 +1482,10 @@ void PowerPointExport::WriteAnimationNodeEffect(const FSHelperPtr& pFS, const Re if (xFilter.is()) { const char* pFilter = ::ppt::AnimationExporter::FindTransitionName(xFilter->getTransition(), xFilter->getSubtype(), xFilter->getDirection()); - const char* pDirection = xFilter->getDirection() ? "in" : "out"; + const char* pMode = xFilter->getMode() ? "in" : "out"; pFS->startElementNS(XML_p, XML_animEffect, XML_filter, pFilter, - XML_transition, pDirection, + XML_transition, pMode, FSEND); WriteAnimationNodeAnimateInside(pFS, rXNode, bMainSeqChild, false); |