diff options
-rw-r--r-- | include/sfx2/tbxctrl.hxx | 11 | ||||
-rw-r--r-- | include/svx/tbcontrl.hxx | 5 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/toolboxcontroller.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 21 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 13 |
5 files changed, 19 insertions, 35 deletions
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index f6373c368443..96b45afe48e9 100644 --- a/include/sfx2/tbxctrl.hxx +++ b/include/sfx2/tbxctrl.hxx @@ -27,7 +27,6 @@ #include <vcl/fixed.hxx> #include <vcl/floatwin.hxx> #include <comphelper/processfactory.hxx> -#include <cppuhelper/implbase.hxx> #include <sfx2/ctrlitem.hxx> #include <sfx2/sfxstatuslistener.hxx> #include <svtools/toolboxcontroller.hxx> @@ -135,9 +134,7 @@ public: */ struct SfxToolBoxControl_Impl; -class SFX2_DLLPUBLIC SfxToolBoxControl: - public cppu::ImplInheritanceHelper< - svt::ToolboxController, css::frame::XSubToolbarController> +class SFX2_DLLPUBLIC SfxToolBoxControl: public svt::ToolboxController { friend class SfxPopupWindow; friend struct SfxTbxCtrlFactory; @@ -184,12 +181,6 @@ public: virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createItemWindow( const css::uno::Reference< css::awt::XWindow >& rParent ) throw (css::uno::RuntimeException, std::exception) override; - // XSubToolbarController - virtual sal_Bool SAL_CALL opensSubToolbar( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getSubToolbarName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL functionSelected( const OUString& aCommand ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL updateImage( ) throw (css::uno::RuntimeException, std::exception) override; - public: SFX_DECL_TOOLBOX_CONTROL(); diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx index bf808381c6ac..3d923e1cee25 100644 --- a/include/svx/tbcontrl.hxx +++ b/include/svx/tbcontrl.hxx @@ -206,7 +206,8 @@ friend class SfxStyleControllerItem_Impl; typedef std::function<void(const OUString&, const NamedColor&)> ColorSelectFunction; -class SVX_DLLPUBLIC SvxColorToolBoxControl : public SfxToolBoxControl +class SVX_DLLPUBLIC SvxColorToolBoxControl : public cppu::ImplInheritanceHelper< SfxToolBoxControl, + css::frame::XSubToolbarController > { std::unique_ptr<svx::ToolboxButtonColorUpdater> m_xBtnUpdater; PaletteManager m_aPaletteManager; @@ -227,6 +228,8 @@ public: // XSubToolbarController virtual sal_Bool SAL_CALL opensSubToolbar() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getSubToolbarName() throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL functionSelected( const OUString& rCommand ) throw (css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL updateImage() throw (css::uno::RuntimeException, std::exception) override; void setColorSelectFunction(const ColorSelectFunction& aColorSelectFunction); diff --git a/reportdesign/source/ui/inc/toolboxcontroller.hxx b/reportdesign/source/ui/inc/toolboxcontroller.hxx index 74e597d884eb..288811a420e7 100644 --- a/reportdesign/source/ui/inc/toolboxcontroller.hxx +++ b/reportdesign/source/ui/inc/toolboxcontroller.hxx @@ -30,12 +30,12 @@ #include <com/sun/star/frame/XSubToolbarController.hpp> #include <cppuhelper/implbase2.hxx> -class SfxToolBoxControl; +class SvxColorToolBoxControl; namespace rptui { typedef ::cppu::ImplHelper2 < css::lang::XServiceInfo, css::frame::XSubToolbarController> TToolboxController_BASE; - typedef rtl::Reference<SfxToolBoxControl> TToolbarHelper; + typedef rtl::Reference<SvxColorToolBoxControl> TToolbarHelper; class OToolboxController : public ::svt::ToolboxController ,public TToolboxController_BASE diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index ab32b9267313..1378d0fd962f 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -538,27 +538,6 @@ throw ( css::uno::RuntimeException, std::exception ) } } -// XSubToolbarController -sal_Bool SAL_CALL SfxToolBoxControl::opensSubToolbar() throw (css::uno::RuntimeException, std::exception) -{ - return false; -} - -OUString SAL_CALL SfxToolBoxControl::getSubToolbarName() throw (css::uno::RuntimeException, std::exception) -{ - return OUString(); -} - -void SAL_CALL SfxToolBoxControl::functionSelected( const OUString& /*aCommand*/ ) throw (css::uno::RuntimeException, std::exception) -{ - // must be implemented by sub-class -} - -void SAL_CALL SfxToolBoxControl::updateImage() throw (css::uno::RuntimeException, std::exception) -{ - // must be implemented by sub-class -} - // XToolbarController void SAL_CALL SfxToolBoxControl::execute( sal_Int16 KeyModifier ) throw (css::uno::RuntimeException, std::exception) { diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 3362174b8ad4..cf449f9ceffd 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2766,7 +2766,7 @@ SvxColorToolBoxControl::SvxColorToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ): - SfxToolBoxControl( nSlotId, nId, rTbx ), + ImplInheritanceHelper( nSlotId, nId, rTbx ), m_bSplitButton(dynamic_cast< sfx2::sidebar::SidebarToolBox* >(&rTbx) == nullptr), m_aColorSelectFunction(PaletteManager::DispatchColorCommand) { @@ -2909,6 +2909,17 @@ void SvxColorToolBoxControl::updateImage() } } +OUString SvxColorToolBoxControl::getSubToolbarName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString(); +} + +void SvxColorToolBoxControl::functionSelected( const OUString& /*rCommand*/ ) + throw (css::uno::RuntimeException, std::exception) +{ +} + SfxToolBoxControl* SvxColorToolBoxControl::CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) { return new SvxColorToolBoxControl( nSlotId, nId, rTbx ); |