summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2018-07-14 13:57:13 +0800
committerMark Hung <marklh9@gmail.com>2018-07-25 15:00:52 +0200
commitd459f4c92e7bbb7e031b8cbba395d4767ecf344e (patch)
tree686a32045ed09cb65754d774aade0619020cb311 /oox
parent7ff086c9141429e32c733f38d288cf67d6e9e3c9 (diff)
tdf#50499 convert by, from, and to of AnimContext.
Also change testTdf104788 because the expected value is taken as a double and decimal places are omitted if there isn't any. Change-Id: I16cb363b1ce0ff09da2df361849d47819bf9ced4 Reviewed-on: https://gerrit.libreoffice.org/57413 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/ppt/timenodelistcontext.cxx44
1 files changed, 30 insertions, 14 deletions
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index b286acdd6d94..3268ba2c15df 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -543,27 +543,40 @@ namespace oox { namespace ppt {
}
aProps[ NP_CALCMODE ] <<= nEnum;
}
- OUString aStr;
- aStr = xAttribs->getOptionalValue( XML_from );
- if( !aStr.isEmpty() )
+
+ msFrom = xAttribs->getOptionalValue(XML_from);
+ msTo = xAttribs->getOptionalValue(XML_to);
+ msBy = xAttribs->getOptionalValue(XML_by);
+
+ mnValueType = xAttribs->getOptionalValueToken( XML_valueType, 0 );
+ }
+
+ virtual ~AnimContext() throw () override
+ {
+ if (!msFrom.isEmpty())
{
- pNode->setFrom( makeAny( aStr ) );
+ css::uno::Any aAny;
+ aAny <<= msFrom;
+ convertAnimationValueWithTimeNode(mpNode, aAny);
+ mpNode->setFrom(aAny);
}
- aStr = xAttribs->getOptionalValue( XML_by );
- if( !aStr.isEmpty() )
+
+ if (!msTo.isEmpty())
{
- pNode->setBy( makeAny( aStr ) );
+ css::uno::Any aAny;
+ aAny <<= msTo;
+ convertAnimationValueWithTimeNode(mpNode, aAny);
+ mpNode->setTo(aAny);
}
- aStr = xAttribs->getOptionalValue( XML_to );
- if( !aStr.isEmpty() )
+
+ if (!msBy.isEmpty())
{
- pNode->setTo( makeAny( aStr ) );
+ css::uno::Any aAny;
+ aAny <<= msBy;
+ convertAnimationValueWithTimeNode(mpNode, aAny);
+ mpNode->setBy(aAny);
}
- mnValueType = xAttribs->getOptionalValueToken( XML_valueType, 0 );
- }
- virtual ~AnimContext() throw () override
- {
int nKeyTimes = maTavList.size();
if( nKeyTimes > 0)
{
@@ -613,6 +626,9 @@ namespace oox { namespace ppt {
private:
sal_Int32 mnValueType;
TimeAnimationValueList maTavList;
+ OUString msFrom;
+ OUString msTo;
+ OUString msBy;
};
/** CT_TLAnimateScaleBehavior */