diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-06-07 22:34:01 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-06-08 17:30:49 +0400 |
commit | 1829efaf9f5d9af9d51b01d273c7b6c60970b05d (patch) | |
tree | 6eafd55e3dd96923854fcd0348a35d00d3b99fcb | |
parent | 78b7f6e138c561ccc3082a93b155934b4b9c3649 (diff) |
fdo#35972: toolbarmanager must be aware of changes in SvtMiscOptions
Change-Id: Ie6e3036e83b5ea859e2c73df47629eb79791a52c
-rw-r--r-- | framework/inc/uielement/toolbarmanager.hxx | 1 | ||||
-rw-r--r-- | framework/source/uielement/addonstoolbarmanager.cxx | 3 | ||||
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 10 |
3 files changed, 14 insertions, 0 deletions
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 98e351d9ae06..73a631b31303 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -170,6 +170,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener DECL_LINK(Deactivate, void *); DECL_LINK( StateChanged, StateChangedType* ); DECL_LINK( DataChanged, DataChangedEvent* ); + DECL_LINK( MiscOptionsChanged, void* ); DECL_LINK( MenuButton, ToolBox * ); DECL_LINK( MenuSelect, Menu * ); diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index d006d140908f..110f7a157cd7 100644 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -219,6 +219,9 @@ void AddonsToolBarManager::RefreshImages() ); } } + m_pToolBar->SetToolboxButtonSize( bBigImages ? TOOLBOX_BUTTONSIZE_LARGE : TOOLBOX_BUTTONSIZE_SMALL ); + ::Size aSize = m_pToolBar->CalcWindowSizePixel(); + m_pToolBar->SetOutputSizePixel( aSize ); } void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue > >& rAddonToolbar ) diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index ac73f320061d..a8ec4be8319c 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -301,6 +301,8 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic m_aAsyncUpdateControllersTimer.SetTimeout( 50 ); m_aAsyncUpdateControllersTimer.SetTimeoutHdl( LINK( this, ToolBarManager, AsyncUpdateControllersHdl ) ); + + SvtMiscOptions().AddListenerLink( LINK( this, ToolBarManager, MiscOptionsChanged ) ); } ToolBarManager::~ToolBarManager() @@ -350,6 +352,8 @@ void ToolBarManager::Destroy() m_pToolBar->SetCommandHdl( aEmpty ); m_pToolBar = 0; + + SvtMiscOptions().RemoveListenerLink( LINK( this, ToolBarManager, MiscOptionsChanged ) ); } ToolBox* ToolBarManager::GetToolBar() const @@ -2127,6 +2131,12 @@ IMPL_LINK( ToolBarManager, DataChanged, DataChangedEvent*, pDataChangedEvent ) return 1; } +IMPL_LINK_NOARG(ToolBarManager, MiscOptionsChanged) +{ + CheckAndUpdateImages(); + return 0; +} + IMPL_LINK_NOARG(ToolBarManager, AsyncUpdateControllersHdl) { // The guard must be in its own context as the we can get destroyed when our |