[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sd/qa sd/source
Aron Budea
aron.budea at collabora.com
Thu Sep 28 12:49:32 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 | 21 +++++++++++----------
3 files changed, 26 insertions(+), 10 deletions(-)
New commits:
commit f30016d6c72e5056148e08777fb8777ffb8ad791
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.
Reviewed-on: https://gerrit.libreoffice.org/42261
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit 1ea4496f3b2defaf51391e816d159717c55f2929)
Change-Id: I40be0311a7b7ffc64ac3a97a92a3ea835faa5293
Reviewed-on: https://gerrit.libreoffice.org/42825
Reviewed-by: Aron Budea <aron.budea at collabora.com>
Tested-by: Aron Budea <aron.budea 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 2bdaa14d1691..9a19c6ec80fc 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -106,6 +106,7 @@ public:
void testTdf92076();
void testTdf59046();
void testTdf105739();
+ void testTdf111863();
void testTdf111518();
void testTdf106867();
void testTdf112280();
@@ -143,6 +144,7 @@ public:
CPPUNIT_TEST(testTdf92076);
CPPUNIT_TEST(testTdf59046);
CPPUNIT_TEST(testTdf105739);
+ CPPUNIT_TEST(testTdf111863);
CPPUNIT_TEST(testTdf111518);
CPPUNIT_TEST(testTdf106867);
CPPUNIT_TEST(testTdf112280);
@@ -813,6 +815,19 @@ void SdOOXMLExportTest2::testTdf105739()
xShell->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 394ed1b4eb15..f8f22e78656b 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1454,18 +1454,19 @@ void PowerPointExport::WriteAnimationNodeSeq( const FSHelperPtr& pFS, const Refe
void PowerPointExport::WriteAnimationNodeEffect( const FSHelperPtr& pFS, const Reference< XAnimationNode >& rXNode, sal_Int32, bool bMainSeqChild )
{
SAL_INFO("sd.eppt", "write animation node FILTER");
- Reference< XTransitionFilter > xFilter( rXNode, UNO_QUERY );
- if ( xFilter.is() ) {
- const char* pFilter = ::ppt::AnimationExporter::FindTransitionName( xFilter->getTransition(), xFilter->getSubtype(), xFilter->getDirection() );
- const char* pDirection = xFilter->getDirection() ? "in" : "out";
- pFS->startElementNS( XML_p, XML_animEffect,
- XML_filter, pFilter,
- XML_transition, pDirection,
- FSEND );
+ Reference< XTransitionFilter > xFilter(rXNode, UNO_QUERY);
+ if (xFilter.is())
+ {
+ const char* pFilter = ::ppt::AnimationExporter::FindTransitionName(xFilter->getTransition(), xFilter->getSubtype(), xFilter->getDirection());
+ const char* pMode = xFilter->getMode() ? "in" : "out";
+ pFS->startElementNS(XML_p, XML_animEffect,
+ XML_filter, pFilter,
+ XML_transition, pMode,
+ FSEND);
- WriteAnimationNodeAnimateInside( pFS, rXNode, bMainSeqChild, false );
+ WriteAnimationNodeAnimateInside( pFS, rXNode, bMainSeqChild, false );
- pFS->endElementNS( XML_p, XML_animEffect );
+ pFS->endElementNS( XML_p, XML_animEffect );
}
}
More information about the Libreoffice-commits
mailing list