From 1e85fc5b2d8aeafb12f414c6bf0692fb2ca221eb Mon Sep 17 00:00:00 2001 From: Ariel Constenla-Haile Date: Sat, 25 May 2013 22:10:02 +0000 Subject: svt::ToolboxController clean-up Some small clean-up to use the PopupMenu ToolbarController (cherry picked from commit e1687ce159e787d98f79d29a3d2131cca4b6ec71) Conflicts: svtools/inc/svtools/toolboxcontroller.hxx svtools/source/uno/toolboxcontroller.cxx Change-Id: Ie5e0397c32352d52cf2664bdbab920923e74bd03 --- include/svtools/toolboxcontroller.hxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/svtools/toolboxcontroller.hxx b/include/svtools/toolboxcontroller.hxx index 6bccf935be9c..02126611c342 100644 --- a/include/svtools/toolboxcontroller.hxx +++ b/include/svtools/toolboxcontroller.hxx @@ -37,6 +37,7 @@ #include #include #include +#include #include @@ -44,7 +45,8 @@ class ToolBox; namespace svt { -struct ToolboxController_Impl; + +struct DispatchInfo; class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusListener, public ::com::sun::star::frame::XToolbarController, @@ -112,12 +114,15 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL const OUString& getCommandURL() const { return m_aCommandURL; } - const OUString& getModuleName() const; + const OUString& getModuleName() const { return m_sModuleName; } + void dispatchCommand( const OUString& sCommandURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ); void enable( bool bEnable ); + DECL_STATIC_LINK( ToolboxController, ExecuteHdl_Impl, DispatchInfo* ); + protected: bool getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox ); void setSupportVisibleProperty(sal_Bool bValue); //shizhoubo @@ -142,17 +147,23 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL void unbindListener(); sal_Bool isBound() const; sal_Bool hasBigImages() const; + // TODO remove ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > getURLTransformer() const; + // TODO remove ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > getParent() const; sal_Bool m_bInitialized : 1, m_bDisposed : 1; + sal_uInt16 m_nToolBoxId; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; - ToolboxController_Impl* m_pImpl; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; OUString m_aCommandURL; URLToDispatchMap m_aListenerMap; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener + + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xParentWindow; + ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xUrlTransformer; + OUString m_sModuleName; }; } -- cgit