diff options
author | Noel Grandin <noel@peralex.com> | 2013-04-25 14:12:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-04-25 14:44:07 +0200 |
commit | c3eb3de42649a127490da40aa7774c29dc50281a (patch) | |
tree | da5edf3f63ca8a7033a9357913cc2547c16f88e5 /sd | |
parent | a66fd8a99a8c783e4782c487666369c2e567bb95 (diff) |
fdo#46808, Convert animations::Command to new style
The service already existed, just needed an IDL file
Change-Id: I5e6449522ce77c36df1857213bd028336c3354bf
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/CustomAnimationEffect.cxx | 5 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptinanimations.cxx | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 5f7a9e18bbb3..88f7bea54021 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/animations/AnimateSet.hpp> #include <com/sun/star/animations/AnimationFill.hpp> #include <com/sun/star/animations/Audio.hpp> +#include <com/sun/star/animations/Command.hpp> #include <com/sun/star/animations/IterateContainer.hpp> #include <com/sun/star/animations/ParallelTimeContainer.hpp> #include <com/sun/star/animations/SequenceTimeContainer.hpp> @@ -1651,8 +1652,8 @@ void CustomAnimationEffect::setStopAudio() if( mxAudio.is() ) removeAudio(); - Reference< XMultiServiceFactory > xMsf( ::comphelper::getProcessServiceFactory() ); - Reference< XCommand > xCommand( xMsf->createInstance( "com.sun.star.animations.Command" ), UNO_QUERY_THROW ); + Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + Reference< XCommand > xCommand( Command::create( xContext ) ); xCommand->setCommand( EffectCommands::STOPAUDIO ); diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index c6a02baf7591..dc0ccda28375 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -23,9 +23,8 @@ #include <com/sun/star/animations/Timing.hpp> #include <com/sun/star/animations/Event.hpp> #include <com/sun/star/animations/AnimationEndSync.hpp> +#include <com/sun/star/animations/Command.hpp> #include <com/sun/star/animations/EventTrigger.hpp> -#include <com/sun/star/presentation/EffectNodeType.hpp> -#include <com/sun/star/presentation/EffectPresetClass.hpp> #include <com/sun/star/animations/AnimationNodeType.hpp> #include <com/sun/star/animations/AnimationTransformType.hpp> #include <com/sun/star/animations/AnimationCalcMode.hpp> @@ -41,6 +40,8 @@ #include <com/sun/star/animations/XAnimateTransform.hpp> #include <com/sun/star/animations/ValuePair.hpp> #include <com/sun/star/animations/AnimationColorSpace.hpp> +#include <com/sun/star/presentation/EffectNodeType.hpp> +#include <com/sun/star/presentation/EffectPresetClass.hpp> #include <com/sun/star/presentation/ShapeAnimationSubType.hpp> #include <com/sun/star/presentation/EffectCommands.hpp> #include <com/sun/star/beans/NamedValue.hpp> @@ -1419,8 +1420,7 @@ int AnimationImporter::importTimeContainer( const Atom* pAtom, const Reference< if( pChildAtom->hasChildAtom( DFF_msofbtAnimCommand ) ) { Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); - const OUString aServiceName( "com.sun.star.animations.Command" ); - Reference< XAnimationNode > xChildNode( xContext->getServiceManager()->createInstanceWithContext(aServiceName, xContext), UNO_QUERY ); + Reference< XAnimationNode > xChildNode( Command::create(xContext), UNO_QUERY_THROW ); nNodes += importAnimationNodeContainer( pChildAtom, xChildNode ); Reference< XTimeContainer > xParentContainer( xNode, UNO_QUERY ); if( xParentContainer.is() && xChildNode.is() ) |