diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-06-06 11:09:44 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-06-06 11:39:38 +0400 |
commit | 04ffb240d904d04875f91efae333efa605233ad5 (patch) | |
tree | 8cbe9f4f4b58d4b14634d6c875d50fd32fec211a | |
parent | f81018e4d74188b969227fe3082c5a7ca88a3fe1 (diff) |
fdo#50651: update layout after toolbar destruction
plus update confusing comments
Change-Id: I9bdab918566548b576fd22389492216fc4aff7df
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 10 | ||||
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 2fe830694e92..3f35aae4750c 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 63e24f7fb6b8..475c99aa7e84 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 ); |