summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-06-07 22:34:01 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-06-08 17:31:50 +0400
commit595be045da4f868eb2df8f937446e6ae2f81cca8 (patch)
tree18fdb2cc0714ab268edc9d324b55af3dea80eb9b
parent043626bf4331043a6db6b318f90db1289c644f3c (diff)
fdo#35972: toolbarmanager must be aware of changes in SvtMiscOptions
Change-Id: Ie6e3036e83b5ea859e2c73df47629eb79791a52c (cherry picked from commit 1829efaf9f5d9af9d51b01d273c7b6c60970b05d)
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx1
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx3
-rw-r--r--framework/source/uielement/toolbarmanager.cxx10
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 475c99aa7e84..5b06d3d93ffd 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -299,6 +299,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()
@@ -348,6 +350,8 @@ void ToolBarManager::Destroy()
m_pToolBar->SetCommandHdl( aEmpty );
m_pToolBar = 0;
+
+ SvtMiscOptions().RemoveListenerLink( LINK( this, ToolBarManager, MiscOptionsChanged ) );
}
ToolBox* ToolBarManager::GetToolBar() const
@@ -2125,6 +2129,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