From 189bb791d248273758bd2b42e0ec216937fa22d9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 24 Jul 2013 16:35:33 +0200 Subject: fdo#66691: Revert fix for i#121577 Allow setting toolbar name in Addons.xcu ...which incompatibly changed Addons.xcs and breaks extensions (and LibreLogo, which adds to Addons.xcu even though it is not an extension). See the mail thread starting at "[Libreoffice-commits] core.git: #i121577# Allow setting toolbar name in Addons.xcu" for details. This reverts commit 85f072ef33ef47b5e3e0bcd51acb5c4179cde2c2 "Resolves: #i121577# Allow setting toolbar name in Addons.xcu" plus follow-up af572d9fbb744c9691abe465815d7927a9d11510 "Related: #i121577# Allow setting toolbar name in Addons.xcu," f13f9b5cc5267a7a5606b1a89db91b6d7aef5f9c "various .xcus are gone now," and 37d9921797a3ad3be8257fbfee11326549fcd987 "odk/examples/python/toolpanel/CalcWindowState.xcu is still in use," plus those parts of f97ca6f65182efc6542c53ac5e973b3ff398a5d1 "Resolves: #i116455# Make toolbar style settings persistent" that apparently belong to the fix for i#121577 rather than i#116455. Change-Id: Ib744566f3d8da7d9008d7dad8bec60f1bf32e743 --- framework/source/layoutmanager/toolbarlayoutmanager.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'framework/source/layoutmanager') diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 4abdbc928382..13dfb80c939d 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1040,10 +1040,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() } } - OUString aAddonUIName = m_pAddonOptions->GetAddonsToolbarUIName( i ); - const bool bAddonUIName = aAddonUIName.getLength(); - OUString aAddonTitle = bAddonUIName ? - aAddonUIName : implts_generateGenericAddonToolbarTitle( i+1 ); + OUString aGenericAddonTitle = implts_generateGenericAddonToolbarTitle( i+1 ); if ( !aElement.m_aName.isEmpty() ) { @@ -1051,9 +1048,9 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() // UI changes for this document. implts_setElementData( aElement, xDockWindow ); aElement.m_xUIElement = xUIElement; - if ( aElement.m_aUIName.isEmpty() && !bAddonUIName) + if ( aElement.m_aUIName.isEmpty() ) { - aElement.m_aUIName = aAddonTitle; + aElement.m_aUIName = aGenericAddonTitle; implts_writeWindowStateData( aElement ); } } @@ -1064,9 +1061,9 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() aNewToolbar.m_bFloating = true; implts_readWindowStateData( aAddonToolBarName, aNewToolbar ); implts_setElementData( aNewToolbar, xDockWindow ); - if ( aNewToolbar.m_aUIName.isEmpty() && !bAddonUIName) + if ( aNewToolbar.m_aUIName.isEmpty() ) { - aNewToolbar.m_aUIName = aAddonTitle; + aNewToolbar.m_aUIName = aGenericAddonTitle; implts_writeWindowStateData( aNewToolbar ); } implts_insertToolbar( aNewToolbar ); @@ -1079,7 +1076,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() SolarMutexGuard aGuard; Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow->GetText().isEmpty() ) - pWindow->SetText( aAddonTitle ); + pWindow->SetText( aGenericAddonTitle ); if ( pWindow->GetType() == WINDOW_TOOLBOX ) { ToolBox* pToolbar = (ToolBox *)pWindow; -- cgit