diff options
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 22 | ||||
-rw-r--r-- | sd/source/ui/unoidl/randomnode.cxx | 10 |
2 files changed, 13 insertions, 19 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 4dc8ef9b2fcf..e686b3e20e01 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -20,6 +20,7 @@ #include <com/sun/star/presentation/EffectPresetClass.hpp> #include <com/sun/star/animations/XAnimationNodeSupplier.hpp> +#include <com/sun/star/animations/ParallelTimeContainer.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/drawing/XDrawView.hpp> #include <com/sun/star/drawing/XShape.hpp> @@ -2364,18 +2365,15 @@ void CustomAnimationPane::onPreview( bool bForcePreview ) void CustomAnimationPane::preview( const Reference< XAnimationNode >& xAnimationNode ) { - Reference< XTimeContainer > xRoot(::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY); - if( xRoot.is() ) - { - Sequence< ::com::sun::star::beans::NamedValue > aUserData( 1 ); - aUserData[0].Name = "node-type"; - aUserData[0].Value <<= ::com::sun::star::presentation::EffectNodeType::TIMING_ROOT; - xRoot->setUserData( aUserData ); - xRoot->appendChild( xAnimationNode ); - - Reference< XAnimationNode > xNode( xRoot, UNO_QUERY ); - SlideShow::StartPreview( mrBase, mxCurrentPage, xNode ); - } + Reference< XParallelTimeContainer > xRoot = ParallelTimeContainer::create( ::comphelper::getProcessComponentContext() ); + Sequence< ::com::sun::star::beans::NamedValue > aUserData( 1 ); + aUserData[0].Name = "node-type"; + aUserData[0].Value <<= ::com::sun::star::presentation::EffectNodeType::TIMING_ROOT; + xRoot->setUserData( aUserData ); + xRoot->appendChild( xAnimationNode ); + + Reference< XAnimationNode > xNode( xRoot, UNO_QUERY ); + SlideShow::StartPreview( mrBase, mxCurrentPage, xNode ); } diff --git a/sd/source/ui/unoidl/randomnode.cxx b/sd/source/ui/unoidl/randomnode.cxx index ee3c74b15e4d..a18fd1c22619 100644 --- a/sd/source/ui/unoidl/randomnode.cxx +++ b/sd/source/ui/unoidl/randomnode.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/animations/AnimationFill.hpp> #include <com/sun/star/animations/XAnimate.hpp> #include <com/sun/star/animations/AnimationRestart.hpp> +#include <com/sun/star/animations/ParallelTimeContainer.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> @@ -597,13 +598,8 @@ Reference< XEnumeration > SAL_CALL RandomAnimationNode::createEnumeration() else { // no presets? give empty node! - Reference< XMultiServiceFactory > xServiceFactory( comphelper::getProcessServiceFactory() ); - Reference< XEnumerationAccess > aEmptyEnumAccess( - xServiceFactory->createInstance( "com.sun.star.animations.ParallelTimeContainer" ), - UNO_QUERY ); - - if( aEmptyEnumAccess.is() ) - xEnum = aEmptyEnumAccess->createEnumeration(); + Reference< XParallelTimeContainer > xTimeContainer = ParallelTimeContainer::create( comphelper::getProcessComponentContext() ); + xEnum = xTimeContainer->createEnumeration(); } return xEnum; |