diff options
author | Noel Grandin <noel@peralex.com> | 2013-04-25 13:23:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-04-25 14:44:06 +0200 |
commit | 725d23bee0a32eb19554efb5204789b6eb500b03 (patch) | |
tree | dc0d7a95420b41d9d02114cfd98c789bb5416331 /sd | |
parent | 6f0b59e36437b8962769559dc4aabaaba897df00 (diff) |
fdo#46808, Convert animations::AnimateColor and AnimateSet to new style
The services already existed, just needed IDL files
Change-Id: Ifc1980160b8472bc9bf96a36ca4bff2c4153a8b1
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/CustomAnimationEffect.cxx | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 9b397bea4708..0bbaf013ea51 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -19,6 +19,8 @@ #include <tools/debug.hxx> #include <com/sun/star/util/XCloneable.hpp> +#include <com/sun/star/animations/AnimateColor.hpp> +#include <com/sun/star/animations/AnimateSet.hpp> #include <com/sun/star/animations/AnimationFill.hpp> #include <com/sun/star/animations/ParallelTimeContainer.hpp> #include <com/sun/star/animations/SequenceTimeContainer.hpp> @@ -72,18 +74,10 @@ #include "animations.hxx" using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; using namespace ::com::sun::star::presentation; using namespace ::com::sun::star::animations; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::Sequence; -using ::com::sun::star::uno::XInterface; -using ::com::sun::star::uno::UNO_QUERY; -using ::com::sun::star::uno::UNO_QUERY_THROW; -using ::com::sun::star::uno::Any; -using ::com::sun::star::uno::makeAny; -using ::com::sun::star::uno::Exception; -using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::container::XEnumerationAccess; using ::com::sun::star::container::XEnumeration; using ::com::sun::star::beans::NamedValue; @@ -978,12 +972,13 @@ Reference< XAnimationNode > CustomAnimationEffect::createAfterEffectNode() const { DBG_ASSERT( mbHasAfterEffect, "sd::CustomAnimationEffect::createAfterEffectNode(), this node has no after effect!" ); - Reference< XMultiServiceFactory > xMsf( ::comphelper::getProcessServiceFactory() ); + Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); - const char* pServiceName = maDimColor.hasValue() ? - "com.sun.star.animations.AnimateColor" : "com.sun.star.animations.AnimateSet"; - - Reference< XAnimate > xAnimate( xMsf->createInstance(OUString::createFromAscii(pServiceName) ), UNO_QUERY_THROW ); + Reference< XAnimate > xAnimate; + if( maDimColor.hasValue() ) + xAnimate = AnimateColor::create( xContext ); + else + xAnimate = AnimateSet::create( xContext ); Any aTo; OUString aAttributeName; |