From 629aeda73b2db4246b837b63fb7bcf267111783c Mon Sep 17 00:00:00 2001 From: Mark Hung Date: Tue, 24 Jul 2018 00:54:41 +0800 Subject: tdf#118890 subtract 100% from by values of animScale. Despite that by values should be offset values instead of ending values, what we got from pptx seems to be the later, that we have to subtract 100% from the by values to get offset values for slideshow. Change-Id: I7eb9981210ea9998dae0de8f22c155b394e5abeb Reviewed-on: https://gerrit.libreoffice.org/57860 Tested-by: Jenkins Reviewed-by: Mark Hung --- oox/source/ppt/timenodelistcontext.cxx | 6 +++++- sd/qa/unit/export-tests.cxx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index ec720520e54c..2bd2e2a78f72 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -673,7 +673,11 @@ namespace oox { namespace ppt { case PPT_TOKEN( by ): { // CT_TLPoint - maBy = convertPointPercent(GetPointPercent(rAttribs.getFastAttributeList())); + css::awt::Point aPoint = GetPointPercent(rAttribs.getFastAttributeList()); + // We got ending values instead of offset values, so substract 100% from them. + aPoint.X -= 100000; + aPoint.Y -= 100000; + maBy = convertPointPercent(aPoint); return this; } default: diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 1eb9be7404c3..1c494ae33188 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -857,7 +857,7 @@ void SdExportTest::testTdf98477() xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile); xmlDocPtr pXmlDoc = parseExport(tempFile, "content.xml"); - assertXPath(pXmlDoc, "//anim:animateTransform", "by", "1.5,1.5"); + assertXPath(pXmlDoc, "//anim:animateTransform", "by", "0.5,0.5"); xDocShRef->DoClose(); } -- cgit v1.2.3