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 595be045da4f868eb2df8f937446e6ae2f81cca8
Author: Ivan Timofeev <timofeev....@gmail.com>
Date:   Thu Jun 7 22:34:01 2012 +0400

    fdo#35972: toolbarmanager must be aware of changes in SvtMiscOptions
    
    Change-Id: Ie6e3036e83b5ea859e2c73df47629eb79791a52c
    (cherry picked from commit 1829efaf9f5d9af9d51b01d273c7b6c60970b05d)

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 475c99a..5b06d3d 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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to