diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-18 10:19:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-18 11:26:32 +0200 |
commit | f512114970d42acce9a403ef68a1fd0cd35512ff (patch) | |
tree | 630aed5ad265b37d4165fcd4dfbf7de37e3ee63e | |
parent | 860f543cdbf1d7ce8ddb3f9ad81c1c9aa41f02ed (diff) |
Use ImplInheritanceHelper
Change-Id: I259bf6012684e393765cfd73e813bcf2875abd5f
-rw-r--r-- | include/sfx2/tbxctrl.hxx | 21 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 21 |
2 files changed, 8 insertions, 34 deletions
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index df4eb2b91536..2c7d81a2ec79 100644 --- a/include/sfx2/tbxctrl.hxx +++ b/include/sfx2/tbxctrl.hxx @@ -178,10 +178,9 @@ public: struct SfxToolBoxControl_Impl; class SFX2_DLLPUBLIC SfxToolBoxControl: - public ::com::sun::star::awt::XDockableWindowListener, - public ::com::sun::star::frame::XSubToolbarController, - public svt::ToolboxController - + public cppu::ImplInheritanceHelper2< + svt::ToolboxController, css::awt::XDockableWindowListener, + css::frame::XSubToolbarController> { friend class SfxToolbox; friend class SfxPopupWindow; @@ -207,11 +206,12 @@ protected: // Must be called by subclass to set a new popup window instance void SetPopupWindow( SfxPopupWindow* pWindow ); - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL acquire() throw() SAL_OVERRIDE; - virtual void SAL_CALL release() throw() SAL_OVERRIDE; + // helper methods + void createAndPositionSubToolBar( const OUString& rSubToolBarResName ); + ::Size getPersistentFloatingSize( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const OUString& rSubToolBarResName ); + bool hasBigImages() const; +public: // XEventListener using ::cppu::OPropertySetHelper::disposing; virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; @@ -251,11 +251,6 @@ protected: virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - // helper methods - void createAndPositionSubToolBar( const OUString& rSubToolBarResName ); - ::Size getPersistentFloatingSize( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const OUString& rSubToolBarResName ); - bool hasBigImages() const; - public: SFX_DECL_TOOLBOX_CONTROL(); diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 2b4efb0a5f3d..73380fde79fb 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -224,7 +224,6 @@ SfxToolBoxControl::SfxToolBoxControl( sal_uInt16 nID, ToolBox& rBox, bool bShowStringItems ) -: svt::ToolboxController() { pImpl = new SfxToolBoxControl_Impl; @@ -459,26 +458,6 @@ void SfxToolBoxControl::Dispatch( const OUString& aCommand, ::com::sun::star::un } } -// XInterface -Any SAL_CALL SfxToolBoxControl::queryInterface( const Type & rType ) -throw(::com::sun::star::uno::RuntimeException, std::exception) -{ - ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, - (static_cast< ::com::sun::star::awt::XDockableWindowListener* >(this)), - (static_cast< ::com::sun::star::frame::XSubToolbarController* >(this))); - return (aRet.hasValue() ? aRet : svt::ToolboxController::queryInterface( rType )); -} - -void SAL_CALL SfxToolBoxControl::acquire() throw() -{ - OWeakObject::acquire(); -} - -void SAL_CALL SfxToolBoxControl::release() throw() -{ - OWeakObject::release(); -} - void SAL_CALL SfxToolBoxControl::disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) { |