[Libreoffice-commits] .: framework/inc framework/source
Ivan Timofeev
ivantimofeev at kemper.freedesktop.org
Fri Jun 8 06:34:37 PDT 2012
framework/inc/uielement/toolbarmanager.hxx | 1 +
framework/source/uielement/addonstoolbarmanager.cxx | 3 +++
framework/source/uielement/toolbarmanager.cxx | 10 ++++++++++
3 files changed, 14 insertions(+)
New commits:
commit 1829efaf9f5d9af9d51b01d273c7b6c60970b05d
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Thu Jun 7 22:34:01 2012 +0400
fdo#35972: toolbarmanager must be aware of changes in SvtMiscOptions
Change-Id: Ie6e3036e83b5ea859e2c73df47629eb79791a52c
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 98e351d..73a631b 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 d006d14..110f7a1 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 ac73f32..a8ec4be 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
More information about the Libreoffice-commits
mailing list