framework/source/layoutmanager/toolbarlayoutmanager.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
New commits: commit d266cb32c3c982a60cd68650dd7ae8983744134e Author: Michael Stahl <mst...@redhat.com> Date: Thu Dec 15 13:04:00 2016 +0100 tdf#104621 framework: Redo commit 84f2ff67a7e404febf710b1dc7f66d06745c503f The fix was silly and wrong, need to check m_xUIElement, not m_aName, which may be set independently, see the confusing code in ToolbarLayoutManager::requestToolbar(). Change-Id: I279088cb2516b0a19619b5647f15f738a2624edf diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index f870b40..38a36046 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -506,7 +506,7 @@ bool ToolbarLayoutManager::createToolbar( const OUString& rResourceURL ) SolarMutexClearableGuard aWriteLock; UIElement& rElement = impl_findToolbar( rResourceURL ); - if ( !rElement.m_aName.isEmpty() ) + if (rElement.m_xUIElement.is()) { // somebody else must have created it while we released // the SolarMutex - just dispose our new instance and @@ -517,6 +517,15 @@ bool ToolbarLayoutManager::createToolbar( const OUString& rResourceURL ) xC->dispose(); return false; } + if ( !rElement.m_aName.isEmpty() ) + { + // Reuse a local entry so we are able to use the latest + // UI changes for this document. + implts_setElementData( rElement, xDockWindow ); + rElement.m_xUIElement = xUIElement; + bVisible = rElement.m_bVisible; + bFloating = rElement.m_bFloating; + } else { // Create new UI element and try to read its state data _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits