diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-03-11 13:44:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-03-11 13:44:53 +0100 |
commit | 54da5514c3b9a180a081e9836741e3297f71da7d (patch) | |
tree | e858cd7912f179542067415d902873b17bb15a42 /sd | |
parent | e75979eaed5c417da5f33f7259f070afbaa674b8 (diff) |
Looks like no need to instantiate PresenterCanvas via service manager
(see commit message of 86ce77b9255ab92cceb6164828c90b0b3e1ee9ed "Don't adertise
PresenterCanvas as com.sun.star.rendering.Canvas service"; maybe it was just
cargo cult to make it available as a service in the first place)
Change-Id: I31291a7685c89d469309754cc4630b824a276890
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/presenter/PresenterCanvas.cxx | 101 | ||||
-rw-r--r-- | sd/source/ui/presenter/PresenterCanvas.hxx | 24 | ||||
-rw-r--r-- | sd/util/sd.component | 3 |
3 files changed, 1 insertions, 127 deletions
diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index 0465e2031c9c..2df5cda400c8 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -18,7 +18,6 @@ */ #include "PresenterCanvas.hxx" -#include "facreg.hxx" #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> @@ -27,10 +26,8 @@ #include <basegfx/range/b2drectangle.hxx> #include <basegfx/tools/canvastools.hxx> #include <canvas/canvastools.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase.hxx> -#include <cppuhelper/supportsservice.hxx> #include <rtl/ref.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/window.hxx> @@ -109,19 +106,6 @@ private: //===== PresenterCanvas ======================================================= -PresenterCanvas::PresenterCanvas() - : PresenterCanvasInterfaceBase(m_aMutex), - mxUpdateCanvas(), - mxSharedCanvas(), - mxSharedWindow(), - mxWindow(), - maOffset(), - mpUpdateRequester(), - maClipRectangle(), - mbOffsetUpdatePending(true) -{ -} - PresenterCanvas::PresenterCanvas ( const Reference<rendering::XSpriteCanvas>& rxUpdateCanvas, const Reference<awt::XWindow>& rxUpdateWindow, @@ -157,82 +141,6 @@ void SAL_CALL PresenterCanvas::disposing() mxWindow->removeWindowListener(this); } -//----- XInitialization ------------------------------------------------------- - -void SAL_CALL PresenterCanvas::initialize ( - const Sequence<Any>& rArguments) - throw(Exception, RuntimeException, std::exception) -{ - if (rBHelper.bDisposed || rBHelper.bInDispose) - ThrowIfDisposed(); - - if (rArguments.getLength() == 5) - { - try - { - // First and second argument may be NULL. - rArguments[0] >>= mxUpdateCanvas; - rArguments[1] >>= mxUpdateWindow; - - if ( ! (rArguments[2] >>= mxSharedWindow)) - { - throw lang::IllegalArgumentException("PresenterCanvas: invalid shared window", - static_cast<XWeak*>(this), - 1); - } - - if ( ! (rArguments[3] >>= mxSharedCanvas)) - { - throw lang::IllegalArgumentException("PresenterCanvas: invalid shared canvas", - static_cast<XWeak*>(this), - 2); - } - - if ( ! (rArguments[4] >>= mxWindow)) - { - throw lang::IllegalArgumentException("PresenterCanvas: invalid window", - static_cast<XWeak*>(this), - 3); - } - - mpUpdateRequester = CanvasUpdateRequester::Instance(mxUpdateCanvas); - - mbOffsetUpdatePending = true; - if (mxWindow.is()) - mxWindow->addWindowListener(this); - } - catch (RuntimeException&) - { - mxSharedWindow = nullptr; - mxWindow = nullptr; - throw; - } - } - else - { - throw RuntimeException("PresenterCanvas: invalid number of arguments", - static_cast<XWeak*>(this)); - } -} - -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() @@ -984,13 +892,4 @@ void PresenterCustomSprite::ThrowIfDisposed() } } // end of namespace ::sd::presenter - -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL -com_sun_star_comp_Draw_PresenterCanvasFactory_get_implementation(css::uno::XComponentContext*, - css::uno::Sequence<css::uno::Any> const &) -{ - return cppu::acquire(new sd::presenter::PresenterCanvas()); -} - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/presenter/PresenterCanvas.hxx b/sd/source/ui/presenter/PresenterCanvas.hxx index 6bbcdb0ba63b..2484ea933fa5 100644 --- a/sd/source/ui/presenter/PresenterCanvas.hxx +++ b/sd/source/ui/presenter/PresenterCanvas.hxx @@ -43,9 +43,7 @@ namespace { typedef ::cppu::WeakComponentImplHelper < css::rendering::XSpriteCanvas, css::rendering::XBitmap, - css::awt::XWindowListener, - css::lang::XInitialization, - css::lang::XServiceInfo + css::awt::XWindowListener > PresenterCanvasInterfaceBase; } @@ -67,11 +65,6 @@ class PresenterCanvas public PresenterCanvasInterfaceBase { public: - /** This constructor is used when a PresenterCanvas object is created as - a service. - */ - PresenterCanvas(); - /** This constructor is used when a PresenterCanvas object is created directly, typically by the PresenterCanvasFactory. @param rxUpdateCanvas @@ -130,21 +123,6 @@ public: const css::geometry::RealPoint2D& rLocation, const css::geometry::RealSize2D& rSize); - // XInitialization - - virtual void SAL_CALL initialize ( - const css::uno::Sequence<css::uno::Any>& rArguments) - throw(css::uno::Exception, css::uno::RuntimeException, std::exception) override; - - OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - - sal_Bool SAL_CALL supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException, std::exception) override; - - css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; - // XCanvas virtual void SAL_CALL clear() diff --git a/sd/util/sd.component b/sd/util/sd.component index 74b66bc6d6f7..fb70297d12f9 100644 --- a/sd/util/sd.component +++ b/sd/util/sd.component @@ -31,9 +31,6 @@ <service name="com.sun.star.drawing.DrawingDocumentFactory"/> <service name="com.sun.star.presentation.PresentationDocument"/> </implementation> - <implementation name="com.sun.star.comp.Draw.PresenterCanvasFactory" - constructor="com_sun_star_comp_Draw_PresenterCanvasFactory_get_implementation"> - </implementation> <implementation name="com.sun.star.comp.Draw.PresenterHelper" constructor="com_sun_star_comp_Draw_PresenterHelper_get_implementation"> <service name="com.sun.star.drawing.PresenterHelper"/> |