summaryrefslogtreecommitdiff
path: root/framework/source/uielement
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-09-22 18:05:59 +0200
committerJan Holesovsky <kendy@collabora.com>2014-09-22 19:00:19 +0200
commitb1a5e34e27c0118f319aebbc5a6c9cdf05929239 (patch)
tree4859b2b093f65f24735af46f8cf0684ea4552be0 /framework/source/uielement
parentcfbcce701cd6dc3af6086428399136efef33ff59 (diff)
Revert "Related fdo#81475 Improve toolbar tooltips in Writer standard toolbar"
Unfortunately this breaks the Edit menu - it is now crowded with long texts; so while it may improve the toolbar, it definitely breaks the menu. This reverts commit b59c5ace4b7213ffd62495d0c0e5b6411f5071be.
Diffstat (limited to 'framework/source/uielement')
-rw-r--r--framework/source/uielement/toolbarmanager.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 74d66a4df3aa..39ecdb22c388 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1276,18 +1276,23 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
}
m_pToolBar->InsertItem( nId, aString, nItemBits );
m_pToolBar->SetItemCommand( nId, aCommandURL );
- OUString sQuickHelp( aString );
- // Use custom tooltip if available
if ( !aTooltip.isEmpty() )
- sQuickHelp = aTooltip;
- OUString sShortCut;
- if( RetrieveShortcut( aCommandURL, sShortCut ) )
{
- sQuickHelp += " (";
- sQuickHelp += sShortCut;
- sQuickHelp += ")";
+ m_pToolBar->SetQuickHelpText( nId, aTooltip );
+ }
+ else
+ {
+ OUString sQuickHelp( aString );
+ OUString sShortCut;
+ if( RetrieveShortcut( aCommandURL, sShortCut ) )
+ {
+ sQuickHelp += " (";
+ sQuickHelp += sShortCut;
+ sQuickHelp += ")";
+ }
+
+ m_pToolBar->SetQuickHelpText( nId, sQuickHelp );
}
- m_pToolBar->SetQuickHelpText( nId, sQuickHelp );
if ( !aLabel.isEmpty() )
{