INTEGRATION: CWS docking4 (1.2.54); FILE MERGED

2004/10/25 09:35:15 cd 1.2.54.2: #i10000# Fixed build problems with gcc
2004/10/22 15:27:43 cd 1.2.54.1: #i34077# Support for toolbar button/sub-toolbar behavior
This commit is contained in:
Oliver Bolte 2004-11-16 13:51:47 +00:00
parent 7e6ccf33cf
commit de33f16fd1
2 changed files with 38 additions and 9 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: toolbarmanager.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: obo $ $Date: 2004-07-06 16:53:23 $
* last change: $Author: obo $ $Date: 2004-11-16 14:51:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -116,6 +116,9 @@
#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
#include <com/sun/star/frame/XStatusListener.hpp>
#endif
#ifndef _COM_SUN_STAR_FRAME_XSUBTOOLBARCONTROLLER_HPP_
#include <com/sun/star/frame/XSubToolbarController.hpp>
#endif
//_________________________________________________________________________________________________________________
// other includes
@ -183,9 +186,16 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
void CheckAndUpdateImages();
void RefreshImages();
void FillToolbar( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rToolBarData );
void notifyRegisteredControllers( const rtl::OUString& aUIElementName, const rtl::OUString& aCommand );
static sal_Int16 GetCurrentSymbolSize();
protected:
struct ControllerParams
{
sal_Int16 nWidth;
};
typedef std::vector< ControllerParams > ControllerParamsVector;
DECL_LINK( Click, ToolBox * );
DECL_LINK( DropdownClick, ToolBox * );
DECL_LINK( DoubleClick, ToolBox * );
@ -202,7 +212,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
void RemoveControllers();
rtl::OUString RetrieveLabelFromCommand( const rtl::OUString& aCmdURL );
void CreateControllers();
void CreateControllers( const ControllerParamsVector& );
void UpdateControllers();
void AddFrameActionListener();
void AddImageOrientationListener();
@ -222,8 +232,10 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
bRotated : 1;
};
typedef std::vector< ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > ToolBarControllerVector;
typedef BaseHash< CommandInfo > CommandToInfoMap;
typedef std::vector< ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > ToolBarControllerVector;
typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XSubToolbarController > > SubToolBarControllerVector;
typedef BaseHash< CommandInfo > CommandToInfoMap;
typedef BaseHash< SubToolBarControllerVector > SubToolBarToSubToolBarControllerMap;
sal_Bool m_bDisposed : 1,
m_bIsHiContrast : 1,
@ -249,6 +261,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
::com::sun::star::uno::Reference< ::drafts::com::sun::star::ui::XImageManager > m_xDocImageManager;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xImageOrientationListener;
CommandToInfoMap m_aCommandMap;
SubToolBarToSubToolBarControllerMap m_aSubToolBarControllerMap;
};
}

View file

@ -2,9 +2,9 @@
*
* $RCSfile: toolbarwrapper.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: obo $ $Date: 2004-07-06 16:53:46 $
* last change: $Author: obo $ $Date: 2004-11-16 14:51:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -86,6 +86,10 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#endif
#ifndef _COM_SUN_STAR_UI_XUIFUNCTIONLISTENER_HPP_
#include <com/sun/star/ui/XUIFunctionListener.hpp>
#endif
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
@ -94,12 +98,18 @@ namespace framework
{
class ToolBarManager;
class ToolBarWrapper : public UIConfigElementWrapperBase
class ToolBarWrapper : public ::com::sun::star::ui::XUIFunctionListener,
public UIConfigElementWrapperBase
{
public:
ToolBarWrapper( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~ToolBarWrapper();
// XInterface
virtual void SAL_CALL acquire() throw();
virtual void SAL_CALL release() throw();
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
// XComponent
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
@ -117,11 +127,17 @@ class ToolBarWrapper : public UIConfigElementWrapperBase
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException);
// XUIConfigurationListener
// XUIConfigurationListener
virtual void SAL_CALL elementInserted( const ::drafts::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementRemoved( const ::drafts::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementReplaced( const ::drafts::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
// XUIFunctionListener
virtual void SAL_CALL functionExecute( const ::rtl::OUString& aUIElementName, const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
//-------------------------------------------------------------------------------------------------------------
// protected methods
//-------------------------------------------------------------------------------------------------------------