Kaydet (Commit) fe4e2689 authored tarafından Noel Grandin's avatar Noel Grandin

Convert framework::ToolBarManager to WeakImplHelper

Change-Id: I2fc48b892c68cc6054ceec51c4b050e445c22f6a
üst a30c91fd
......@@ -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
......
......@@ -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 ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment