[Libreoffice-commits] .: Branch 'libreoffice-3-6' - framework/source
Ivan Timofeev
ivantimofeev at kemper.freedesktop.org
Wed Jun 6 00:40:42 PDT 2012
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 10 +++++++++-
framework/source/uielement/toolbarmanager.cxx | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 04ffb240d904d04875f91efae333efa605233ad5
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Wed Jun 6 11:09:44 2012 +0400
fdo#50651: update layout after toolbar destruction
plus update confusing comments
Change-Id: I9bdab918566548b576fd22389492216fc4aff7df
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 2fe8306..3f35aae 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -3938,7 +3938,7 @@ throw (uno::RuntimeException)
// user closes a toolbar =>
// context sensitive toolbar: only destroy toolbar and store state.
- // context sensitive toolbar: make it invisible, store state and destroy it.
+ // non context sensitive toolbar: make it invisible, store state and destroy it.
if ( !pIter->m_bContextSensitive )
pIter->m_bVisible = sal_False;
@@ -3954,6 +3954,14 @@ throw (uno::RuntimeException)
{
implts_writeWindowStateData( aUIElement );
destroyToolbar( aName );
+
+ ReadGuard aReadLock( m_aLock );
+ bool bLayoutDirty = m_bLayoutDirty;
+ ILayoutNotifications* pParentLayouter( m_pParentLayouter );
+ aWriteLock.unlock();
+
+ if ( bLayoutDirty && pParentLayouter )
+ pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED );
}
}
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 63e24f7..475c99a 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -2152,7 +2152,7 @@ IMPL_STATIC_LINK_NOINSTANCE( ToolBarManager, ExecuteHdl_Impl, ExecuteInfo*, pExe
( pExecuteInfo->xLayoutManager.is() ) &&
( pExecuteInfo->xWindow.is() ))
{
- // Use docking window close to close the toolbar. The layout manager is
+ // Use docking window close to close the toolbar. The toolbar layout manager is
// listener and will react correctly according to the context sensitive
// flag of our toolbar.
Window* pWin = VCLUnoHelper::GetWindow( pExecuteInfo->xWindow );
More information about the Libreoffice-commits
mailing list