summaryrefslogtreecommitdiff
path: root/oox/source/ppt/timenodelistcontext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/ppt/timenodelistcontext.cxx')
-rw-r--r--oox/source/ppt/timenodelistcontext.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index 625036a25a2f..ec720520e54c 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/animations/AnimationCalcMode.hpp>
#include <com/sun/star/animations/AnimationColorSpace.hpp>
#include <com/sun/star/animations/AnimationNodeType.hpp>
+#include <com/sun/star/animations/ValuePair.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/presentation/EffectCommands.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
@@ -82,6 +83,15 @@ namespace {
// only get first token.
return oox::ppt::convertAnimationValue(getAttributeEnumByAPIName(aNameList.getToken(0, ';')), rAny);
}
+
+ css::uno::Any convertPointPercent(const css::awt::Point& rPoint)
+ {
+ css::animations::ValuePair aPair;
+ // rPoint.X and rPoint.Y are in 1000th of a percent, but we only need ratio.
+ aPair.First <<= static_cast<double>(rPoint.X) / 100000.0;
+ aPair.Second <<= static_cast<double>(rPoint.Y) / 100000.0;
+ return makeAny(aPair);
+ }
}
namespace oox { namespace ppt {
@@ -651,25 +661,19 @@ namespace oox { namespace ppt {
case PPT_TOKEN( to ):
{
// CT_TLPoint
- awt::Point p = GetPointPercent( rAttribs.getFastAttributeList() );
- maTo <<= p.X;
- maTo <<= p.Y;
+ maTo = convertPointPercent(GetPointPercent(rAttribs.getFastAttributeList()));
return this;
}
case PPT_TOKEN( from ):
{
// CT_TLPoint
- awt::Point p = GetPointPercent( rAttribs.getFastAttributeList() );
- maFrom <<= p.X;
- maFrom <<= p.Y;
+ maFrom = convertPointPercent(GetPointPercent(rAttribs.getFastAttributeList()));
return this;
}
case PPT_TOKEN( by ):
{
// CT_TLPoint
- awt::Point p = GetPointPercent( rAttribs.getFastAttributeList() );
- maBy <<= p.X;
- maBy <<= p.Y;
+ maBy = convertPointPercent(GetPointPercent(rAttribs.getFastAttributeList()));
return this;
}
default: