diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-08 11:35:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-15 09:56:02 +0200 |
commit | 23ef230fa0db1f6599ef22edc25e5ce16cc43c41 (patch) | |
tree | eef1ff96c8774969e3467561d9e18fa18e02c364 | |
parent | 28f0a6de18d79432d30becdd20d25301f93e86e9 (diff) |
fdo#46808, Use service constructor for presentation::SlideShow
Change-Id: Ib757190a9452e8cb69bff417ebd7b558038e1537
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 10 | ||||
-rw-r--r-- | slideshow/test/demoshow.cxx | 12 |
2 files changed, 8 insertions, 14 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index ea48eee52064..d317fcaf1073 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> +#include <com/sun/star/presentation/SlideShow.hpp> #include <svl/aeitem.hxx> #include <svl/urihelper.hxx> @@ -2437,13 +2438,10 @@ Reference< XSlideShow > SlideshowImpl::createSlideShow() const try { - Reference< lang::XMultiServiceFactory > xFactory( - ::comphelper::getProcessServiceFactory(), - UNO_QUERY_THROW ); + Reference< uno::XComponentContext > xContext = + ::comphelper::getProcessComponentContext(); - Reference< XInterface > xInt( xFactory->createInstance( "com.sun.star.presentation.SlideShow" ) ); - - xShow.set( xInt, UNO_QUERY_THROW ); + xShow.set( presentation::SlideShow::create(xContext), UNO_QUERY_THROW ); } catch( uno::Exception& ) { diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx index 46a026b3c960..8c9907c12080 100644 --- a/slideshow/test/demoshow.cxx +++ b/slideshow/test/demoshow.cxx @@ -35,7 +35,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/rendering/XCanvas.hpp> #include <com/sun/star/rendering/XSpriteCanvas.hpp> -#include <com/sun/star/presentation/XSlideShow.hpp> +#include <com/sun/star/presentation/SlideShow.hpp> #include <com/sun/star/presentation/XSlideShowView.hpp> #include "com/sun/star/animations/TransitionType.hpp" #include "com/sun/star/animations/TransitionSubType.hpp" @@ -430,14 +430,10 @@ void DemoWindow::init() { if( !mxShow.is() ) { - uno::Reference< lang::XMultiServiceFactory > xFactory( - ::comphelper::getProcessServiceFactory(), - uno::UNO_QUERY_THROW ); + uno::Reference< uno::XComponentContext > xContext =( + ::comphelper::getProcessComponentContext(); - uno::Reference< uno::XInterface > xInt( xFactory->createInstance( - ::rtl::OUString("com.sun.star.presentation.SlideShow") )); - - mxShow.set( xInt, + mxShow.set( presentation::SlideShow::create(xContext), uno::UNO_QUERY_THROW ); maLeftChild.setShow( mxShow ); |