diff options
Diffstat (limited to 'framework/source/uielement/toolbarmanager.cxx')
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 23 |
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() ) { |