diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-12-15 13:04:00 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-12-15 13:36:24 +0100 |
commit | d266cb32c3c982a60cd68650dd7ae8983744134e (patch) | |
tree | ea1cf879b241bb40650f38f9ef70b9c22ab09161 /framework | |
parent | bd6723fd539bb63d230a2f985ac98ff7daafcbff (diff) |
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
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index f870b40f29b7..38a36046c2d4 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 |