diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2013-01-04 18:57:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-24 11:49:53 +0100 |
commit | 85f072ef33ef47b5e3e0bcd51acb5c4179cde2c2 (patch) | |
tree | e418effbb80d3dcad47f54967141487d1e653199 /framework/source/layoutmanager | |
parent | f97ca6f65182efc6542c53ac5e973b3ff398a5d1 (diff) |
Resolves: #i121577# Allow setting toolbar name in Addons.xcu
(cherry picked from commit 37894067213a63c51c7a73083d7b0ace5f5c40da)
Conflicts:
framework/inc/framework/addonsoptions.hxx
framework/source/fwe/classes/addonsoptions.cxx
framework/source/layoutmanager/toolbarlayoutmanager.cxx
officecfg/registry/schema/org/openoffice/Office/Addons.xcs
Change-Id: Icc8ed1bb5ac2cfecd6c03c53c137c503dc78bc66
Diffstat (limited to 'framework/source/layoutmanager')
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index b590ddd2e314..ebc54594322e 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1031,7 +1031,8 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() } OUString aAddonUIName = m_pAddonOptions->GetAddonsToolbarUIName( i ); - OUString aAddonTitle = aAddonUIName.getLength() ? + const bool bAddonUIName = aAddonUIName.getLength(); + OUString aAddonTitle = bAddonUIName ? aAddonUIName : implts_generateGenericAddonToolbarTitle( i+1 ); if ( !aElement.m_aName.isEmpty() ) @@ -1040,7 +1041,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() // UI changes for this document. implts_setElementData( aElement, xDockWindow ); aElement.m_xUIElement = xUIElement; - if ( aElement.m_aUIName.isEmpty() ) + if ( aElement.m_aUIName.isEmpty() && !bAddonUIName) { aElement.m_aUIName = aAddonTitle; implts_writeWindowStateData( aElement ); @@ -1053,7 +1054,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() aNewToolbar.m_bFloating = true; implts_readWindowStateData( aAddonToolBarName, aNewToolbar ); implts_setElementData( aNewToolbar, xDockWindow ); - if ( aNewToolbar.m_aUIName.isEmpty() ) + if ( aNewToolbar.m_aUIName.isEmpty() && !bAddonUIName) { aNewToolbar.m_aUIName = aAddonTitle; implts_writeWindowStateData( aNewToolbar ); |