From b59c5ace4b7213ffd62495d0c0e5b6411f5071be Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Sat, 6 Sep 2014 12:03:17 +0200 Subject: Related fdo#81475 Improve toolbar tooltips in Writer standard toolbar and show the shortcut in the tooltip also when there is a custom tooltip Change-Id: Ia3f5d17df3769479f7aacf63a83507ccb8593103 Reviewed-on: https://gerrit.libreoffice.org/11303 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt --- framework/source/uielement/toolbarmanager.cxx | 23 ++++++++------------- .../org/openoffice/Office/UI/GenericCommands.xcu | 24 +++++++++++----------- .../org/openoffice/Office/UI/WriterCommands.xcu | 6 +++--- sw/uiconfig/swriter/toolbar/standardbar.xml | 18 ++++++++-------- 4 files changed, 33 insertions(+), 38 deletions(-) diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 39ecdb22c388..74d66a4df3aa 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1276,23 +1276,18 @@ 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 ) ) { - m_pToolBar->SetQuickHelpText( nId, aTooltip ); - } - else - { - OUString sQuickHelp( aString ); - OUString sShortCut; - if( RetrieveShortcut( aCommandURL, sShortCut ) ) - { - sQuickHelp += " ("; - sQuickHelp += sShortCut; - sQuickHelp += ")"; - } - - m_pToolBar->SetQuickHelpText( nId, sQuickHelp ); + sQuickHelp += " ("; + sQuickHelp += sShortCut; + sQuickHelp += ")"; } + m_pToolBar->SetQuickHelpText( nId, sQuickHelp ); if ( !aLabel.isEmpty() ) { diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 60fed197e93f..e0a32068aee2 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -1264,7 +1264,7 @@ - Undo + Undo Last Action @@ -2019,7 +2019,7 @@ - Print File Directly + Print Document Directly 1 @@ -2246,7 +2246,7 @@ - ~File... + ~Document... 1 @@ -3077,7 +3077,7 @@ - ~Spelling... + Check ~Spelling and Grammar... @@ -3087,7 +3087,7 @@ - ~Spelling and Grammar... + Check ~Spelling and Grammar... 1 @@ -3103,7 +3103,7 @@ - ~Spelling... + Check ~Spelling and Grammar... 1 @@ -3366,7 +3366,7 @@ - Redo + Redo Last Action 1 @@ -3382,7 +3382,7 @@ - Format Paintbrush (double click for multi-selection) + Clone Formatting (double click for multi-selection) 9 @@ -3403,7 +3403,7 @@ - Cu~t + Cu~t Selection 1 @@ -3411,7 +3411,7 @@ - ~Copy + ~Copy Selection 1 @@ -3419,7 +3419,7 @@ - ~Paste + ~Paste from Clipboard 1 @@ -5445,7 +5445,7 @@ - ~Spellcheck + Toggle Auto ~Spellcheck diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 59f52b2e2474..c0bd4217c768 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -88,7 +88,7 @@ - Insert Endnote Directly + Insert Endnote 1 @@ -492,7 +492,7 @@ - Insert Fields + Insert Field 9 @@ -561,7 +561,7 @@ - Insert Footnote Directly + Insert Footnote 1 diff --git a/sw/uiconfig/swriter/toolbar/standardbar.xml b/sw/uiconfig/swriter/toolbar/standardbar.xml index 84f262d2db8d..0e4fe9b745d1 100644 --- a/sw/uiconfig/swriter/toolbar/standardbar.xml +++ b/sw/uiconfig/swriter/toolbar/standardbar.xml @@ -19,10 +19,10 @@ --> - + - - + + @@ -46,14 +46,14 @@ - - - + + + - - + + - + -- cgit v1.2.3