[Libreoffice-commits] core.git: sd/qa sd/source
Aron Budea
aron.budea at collabora.com
Mon Sep 18 14:35:35 UTC 2017
sd/qa/unit/data/pptx/tdf111863.pptx |binary
sd/qa/unit/export-tests-ooxml2.cxx | 15 +++++++++++++++
sd/source/filter/eppt/pptx-epptooxml.cxx | 4 ++--
3 files changed, 17 insertions(+), 2 deletions(-)
New commits:
commit 1ea4496f3b2defaf51391e816d159717c55f2929
Author: Aron Budea <aron.budea at collabora.com>
Date: Thu Sep 14 07:59:15 2017 +0200
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 at libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/sd/qa/unit/data/pptx/tdf111863.pptx b/sd/qa/unit/data/pptx/tdf111863.pptx
new file mode 100644
index 000000000000..19579ada5aaf
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf111863.pptx differ
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);
More information about the Libreoffice-commits
mailing list