diff options
Diffstat (limited to 'sd/source/ui/presenter')
-rw-r--r-- | sd/source/ui/presenter/PresenterCanvas.cxx | 19 | ||||
-rw-r--r-- | sd/source/ui/presenter/PresenterCanvas.hxx | 17 | ||||
-rw-r--r-- | sd/source/ui/presenter/SlideRenderer.cxx | 19 | ||||
-rw-r--r-- | sd/source/ui/presenter/SlideRenderer.hxx | 17 |
4 files changed, 66 insertions, 6 deletions
diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index 8407ee0de734..908908c7277c 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase1.hxx> +#include <cppuhelper/supportsservice.hxx> #include <rtl/ref.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/window.hxx> @@ -213,6 +214,24 @@ void SAL_CALL PresenterCanvas::initialize ( } } +OUString PresenterCanvas::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("com.sun.star.comp.Draw.PresenterCanvasFactory"); +} + +sal_Bool PresenterCanvas::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> PresenterCanvas::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{"com.sun.star.rendering.Canvas"}; +} + //----- XCanvas --------------------------------------------------------------- void SAL_CALL PresenterCanvas::clear (void) diff --git a/sd/source/ui/presenter/PresenterCanvas.hxx b/sd/source/ui/presenter/PresenterCanvas.hxx index 80dabd43d1de..d60d41f95c9b 100644 --- a/sd/source/ui/presenter/PresenterCanvas.hxx +++ b/sd/source/ui/presenter/PresenterCanvas.hxx @@ -27,23 +27,25 @@ #include <com/sun/star/awt/XWindowListener.hpp> #include <com/sun/star/geometry/AffineMatrix2D.hpp> #include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/rendering/XSpriteCanvas.hpp> #include <com/sun/star/rendering/XBitmapCanvas.hpp> #include <com/sun/star/rendering/VolatileContentDestroyedException.hpp> #include <cppuhelper/basemutex.hxx> -#include <cppuhelper/compbase4.hxx> +#include <cppuhelper/compbase.hxx> #include <boost/noncopyable.hpp> #include <boost/shared_ptr.hpp> namespace sd { namespace presenter { namespace { - typedef ::cppu::WeakComponentImplHelper4 < + typedef ::cppu::WeakComponentImplHelper < css::rendering::XSpriteCanvas, css::rendering::XBitmap, css::awt::XWindowListener, - css::lang::XInitialization + css::lang::XInitialization, + css::lang::XServiceInfo > PresenterCanvasInterfaceBase; } @@ -147,6 +149,15 @@ public: const css::uno::Sequence<css::uno::Any>& rArguments) throw(css::uno::Exception, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // XCanvas virtual void SAL_CALL clear (void) diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index eb0b5f8161e5..c744aac4a378 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -25,6 +25,7 @@ #include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <cppcanvas/vclfactory.hxx> +#include <cppuhelper/supportsservice.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -62,6 +63,24 @@ void SAL_CALL SlideRenderer::initialize (const Sequence<Any>& rArguments) } } +OUString SlideRenderer::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("com.sun.star.comp.Draw.SlideRenderer"); +} + +sal_Bool SlideRenderer::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> SlideRenderer::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{"com.sun.star.drawing.SlideRenderer"}; +} + //----- XSlideRenderer -------------------------------------------------------- Reference<awt::XBitmap> SlideRenderer::createPreview ( diff --git a/sd/source/ui/presenter/SlideRenderer.hxx b/sd/source/ui/presenter/SlideRenderer.hxx index 6e318bcbc193..19846faca260 100644 --- a/sd/source/ui/presenter/SlideRenderer.hxx +++ b/sd/source/ui/presenter/SlideRenderer.hxx @@ -24,19 +24,21 @@ #include <com/sun/star/drawing/XDrawPage.hpp> #include <com/sun/star/drawing/XSlideRenderer.hpp> #include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/rendering/XSpriteCanvas.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/basemutex.hxx> -#include <cppuhelper/compbase2.hxx> +#include <cppuhelper/compbase.hxx> #include <boost/noncopyable.hpp> namespace sd { namespace presenter { namespace { - typedef ::cppu::WeakComponentImplHelper2 < + typedef ::cppu::WeakComponentImplHelper < css::drawing::XSlideRenderer, - css::lang::XInitialization + css::lang::XInitialization, + css::lang::XServiceInfo > SlideRendererInterfaceBase; } @@ -57,6 +59,15 @@ public: virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments) throw (css::uno::Exception, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // XSlideRenderer virtual css::uno::Reference<css::awt::XBitmap> SAL_CALL createPreview ( |