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:
parent
7e6ccf33cf
commit
de33f16fd1
2 changed files with 38 additions and 9 deletions
|
@ -2,9 +2,9 @@
|
||||||
*
|
*
|
||||||
* $RCSfile: toolbarmanager.hxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
|
@ -116,6 +116,9 @@
|
||||||
#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
|
#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
|
||||||
#include <com/sun/star/frame/XStatusListener.hpp>
|
#include <com/sun/star/frame/XStatusListener.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _COM_SUN_STAR_FRAME_XSUBTOOLBARCONTROLLER_HPP_
|
||||||
|
#include <com/sun/star/frame/XSubToolbarController.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
//_________________________________________________________________________________________________________________
|
//_________________________________________________________________________________________________________________
|
||||||
// other includes
|
// other includes
|
||||||
|
@ -183,9 +186,16 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
|
||||||
void CheckAndUpdateImages();
|
void CheckAndUpdateImages();
|
||||||
void RefreshImages();
|
void RefreshImages();
|
||||||
void FillToolbar( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rToolBarData );
|
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();
|
static sal_Int16 GetCurrentSymbolSize();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
struct ControllerParams
|
||||||
|
{
|
||||||
|
sal_Int16 nWidth;
|
||||||
|
};
|
||||||
|
typedef std::vector< ControllerParams > ControllerParamsVector;
|
||||||
|
|
||||||
DECL_LINK( Click, ToolBox * );
|
DECL_LINK( Click, ToolBox * );
|
||||||
DECL_LINK( DropdownClick, ToolBox * );
|
DECL_LINK( DropdownClick, ToolBox * );
|
||||||
DECL_LINK( DoubleClick, ToolBox * );
|
DECL_LINK( DoubleClick, ToolBox * );
|
||||||
|
@ -202,7 +212,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
|
||||||
|
|
||||||
void RemoveControllers();
|
void RemoveControllers();
|
||||||
rtl::OUString RetrieveLabelFromCommand( const rtl::OUString& aCmdURL );
|
rtl::OUString RetrieveLabelFromCommand( const rtl::OUString& aCmdURL );
|
||||||
void CreateControllers();
|
void CreateControllers( const ControllerParamsVector& );
|
||||||
void UpdateControllers();
|
void UpdateControllers();
|
||||||
void AddFrameActionListener();
|
void AddFrameActionListener();
|
||||||
void AddImageOrientationListener();
|
void AddImageOrientationListener();
|
||||||
|
@ -222,8 +232,10 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
|
||||||
bRotated : 1;
|
bRotated : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
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::XStatusListener > > ToolBarControllerVector;
|
||||||
typedef BaseHash< CommandInfo > CommandToInfoMap;
|
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,
|
sal_Bool m_bDisposed : 1,
|
||||||
m_bIsHiContrast : 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< ::drafts::com::sun::star::ui::XImageManager > m_xDocImageManager;
|
||||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xImageOrientationListener;
|
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xImageOrientationListener;
|
||||||
CommandToInfoMap m_aCommandMap;
|
CommandToInfoMap m_aCommandMap;
|
||||||
|
SubToolBarToSubToolBarControllerMap m_aSubToolBarControllerMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
*
|
*
|
||||||
* $RCSfile: toolbarwrapper.hxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
|
@ -86,6 +86,10 @@
|
||||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _COM_SUN_STAR_UI_XUIFUNCTIONLISTENER_HPP_
|
||||||
|
#include <com/sun/star/ui/XUIFunctionListener.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
//_________________________________________________________________________________________________________________
|
//_________________________________________________________________________________________________________________
|
||||||
// other includes
|
// other includes
|
||||||
//_________________________________________________________________________________________________________________
|
//_________________________________________________________________________________________________________________
|
||||||
|
@ -94,12 +98,18 @@ namespace framework
|
||||||
{
|
{
|
||||||
|
|
||||||
class ToolBarManager;
|
class ToolBarManager;
|
||||||
class ToolBarWrapper : public UIConfigElementWrapperBase
|
class ToolBarWrapper : public ::com::sun::star::ui::XUIFunctionListener,
|
||||||
|
public UIConfigElementWrapperBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ToolBarWrapper( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
|
ToolBarWrapper( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
|
||||||
virtual ~ToolBarWrapper();
|
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
|
// XComponent
|
||||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
|
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 ::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);
|
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 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 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);
|
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
|
// protected methods
|
||||||
//-------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue