diff options
author | Noel Grandin <noel@peralex.com> | 2013-07-02 17:10:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-07-23 10:05:43 +0200 |
commit | fe4e2689f6b0c4312f9b227c4aa1ca770c5690bd (patch) | |
tree | c5b46ddec258ee9ef19564e8f14f2f8960fc2872 /framework | |
parent | a30c91fd02beb7a0af9b4702c15b1756192b8ac5 (diff) |
Convert framework::ToolBarManager to WeakImplHelper
Change-Id: I2fc48b892c68cc6054ceec51c4b050e445c22f6a
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/uielement/toolbarmanager.hxx | 34 | ||||
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 19 |
2 files changed, 16 insertions, 37 deletions
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 1b26588cdfbd..7ad772de9803 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -27,26 +27,26 @@ #include <stdtypes.h> #include <uielement/commandinfo.hxx> -#include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/frame/XStatusListener.hpp> -#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> #include <com/sun/star/frame/XModuleManager.hpp> #include <com/sun/star/frame/XUIControllerFactory.hpp> -#include <com/sun/star/ui/XImageManager.hpp> -#include <com/sun/star/ui/XUIConfigurationManager.hpp> #include <com/sun/star/frame/XSubToolbarController.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/frame/XToolbarController.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/ui/XImageManager.hpp> +#include <com/sun/star/ui/XUIConfigurationManager.hpp> #include <com/sun/star/ui/ItemStyle.hpp> -#include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/ui/XAcceleratorConfiguration.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/util/XURLTransformer.hpp> #include <rtl/ustring.hxx> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase4.hxx> #include <cppuhelper/interfacecontainer.hxx> #include <tools/link.hxx> @@ -59,13 +59,15 @@ class ToolBox; namespace framework { -class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener , - public ::com::sun::star::frame::XStatusListener , - public ::com::sun::star::lang::XComponent , - public ::com::sun::star::lang::XTypeProvider , - public ::com::sun::star::ui::XUIConfigurationListener, - public ThreadHelpBase , - public ::cppu::OWeakObject +typedef ::cppu::WeakImplHelper4< + ::com::sun::star::frame::XFrameActionListener, + ::com::sun::star::frame::XStatusListener, + ::com::sun::star::lang::XComponent, + ::com::sun::star::ui::XUIConfigurationListener + > ToolbarManager_Base; + +class ToolBarManager : public ToolbarManager_Base, + public ThreadHelpBase { public: ToolBarManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, @@ -74,10 +76,6 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener ToolBox* pToolBar ); virtual ~ToolBarManager(); - // XInterface, XTypeProvider, XServiceInfo - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER - ToolBox* GetToolBar() const; // XFrameActionListener diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 7d22760eed31..d8d6554d1be1 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -180,31 +180,12 @@ static ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager //***************************************************************************************************************** // XInterface, XTypeProvider, XServiceInfo //***************************************************************************************************************** -DEFINE_XINTERFACE_6 ( ToolBarManager , - OWeakObject , - DIRECT_INTERFACE( ::com::sun::star::lang::XTypeProvider ), - DIRECT_INTERFACE( ::com::sun::star::lang::XComponent ), - DIRECT_INTERFACE( ::com::sun::star::frame::XFrameActionListener ), - DIRECT_INTERFACE( ::com::sun::star::ui::XUIConfigurationListener ), - DIRECT_INTERFACE( ::com::sun::star::frame::XStatusListener ), - DERIVED_INTERFACE( ::com::sun::star::lang::XEventListener, ::com::sun::star::frame::XFrameActionListener ) - ) - -DEFINE_XTYPEPROVIDER_6 ( ToolBarManager , - ::com::sun::star::lang::XTypeProvider , - ::com::sun::star::lang::XComponent , - ::com::sun::star::ui::XUIConfigurationListener , - ::com::sun::star::frame::XFrameActionListener , - ::com::sun::star::frame::XStatusListener , - ::com::sun::star::lang::XEventListener - ) ToolBarManager::ToolBarManager( const Reference< XComponentContext >& rxContext, const Reference< XFrame >& rFrame, const OUString& rResourceName, ToolBox* pToolBar ) : ThreadHelpBase( &Application::GetSolarMutex() ), - OWeakObject(), m_bDisposed( false ), m_bSmallSymbols( !SvtMiscOptions().AreCurrentSymbolsLarge() ), m_bModuleIdentified( false ), |