[Libreoffice-commits] core.git: framework/source officecfg/registry sw/uiconfig

Samuel Mehrbrodt s.mehrbrodt at gmail.com
Sun Sep 21 09:06:53 PDT 2014


 framework/source/uielement/toolbarmanager.cxx                        |   23 +++------
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |   24 +++++-----
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu  |    6 +-
 sw/uiconfig/swriter/toolbar/standardbar.xml                          |   18 +++----
 4 files changed, 33 insertions(+), 38 deletions(-)

New commits:
commit b59c5ace4b7213ffd62495d0c0e5b6411f5071be
Author: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
Date:   Sat Sep 6 12:03:17 2014 +0200

    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 <s.mehrbrodt at gmail.com>
    Tested-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>

diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 39ecdb2..74d66a4 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 60fed19..e0a3206 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 @@
       </node>
       <node oor:name=".uno:UndoAction" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Undo</value>
+          <value xml:lang="en-US">Undo Last Action</value>
         </prop>
       </node>
       <node oor:name=".uno:ToggleControlFocus" oor:op="replace">
@@ -2019,7 +2019,7 @@
       </node>
       <node oor:name=".uno:PrintDefault" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Print File Directly</value>
+          <value xml:lang="en-US">Print Document Directly</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
@@ -2246,7 +2246,7 @@
       </node>
       <node oor:name=".uno:InsertDoc" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">~File...</value>
+          <value xml:lang="en-US">~Document...</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
@@ -3077,7 +3077,7 @@
       </node>
       <node oor:name=".uno:SpellingDialog" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">~Spelling...</value>
+          <value xml:lang="en-US">Check ~Spelling and Grammar...</value>
         </prop>
       </node>
       <node oor:name=".uno:RecheckDocument" oor:op="replace">
@@ -3087,7 +3087,7 @@
       </node>
       <node oor:name=".uno:SpellingAndGrammarDialog" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">~Spelling and Grammar...</value>
+          <value xml:lang="en-US">Check ~Spelling and Grammar...</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
@@ -3103,7 +3103,7 @@
       </node>
       <node oor:name=".uno:SpellDialog" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">~Spelling...</value>
+          <value xml:lang="en-US">Check ~Spelling and Grammar...</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
@@ -3366,7 +3366,7 @@
       </node>
       <node oor:name=".uno:Redo" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Redo</value>
+          <value xml:lang="en-US">Redo Last Action</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
@@ -3382,7 +3382,7 @@
       </node>
       <node oor:name=".uno:FormatPaintbrush" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Format Paintbrush (double click for multi-selection)</value>
+          <value xml:lang="en-US">Clone Formatting (double click for multi-selection)</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>9</value>
@@ -3403,7 +3403,7 @@
       </node>
       <node oor:name=".uno:Cut" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Cu~t</value>
+          <value xml:lang="en-US">Cu~t Selection</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
@@ -3411,7 +3411,7 @@
       </node>
       <node oor:name=".uno:Copy" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">~Copy</value>
+          <value xml:lang="en-US">~Copy Selection</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
@@ -3419,7 +3419,7 @@
       </node>
       <node oor:name=".uno:Paste" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">~Paste</value>
+          <value xml:lang="en-US">~Paste from Clipboard</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
@@ -5445,7 +5445,7 @@
       </node>
       <node oor:name=".uno:SpellingMenu" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">~Spellcheck</value>
+          <value xml:lang="en-US">Toggle Auto ~Spellcheck</value>
         </prop>
       </node>
       <node oor:name=".uno:LanguageMenu" oor:op="replace">
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 59f52b2..c0bd421 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 @@
       </node>
       <node oor:name=".uno:InsertEndnote" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Insert Endnote Directly</value>
+          <value xml:lang="en-US">Insert Endnote</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
@@ -492,7 +492,7 @@
       </node>
       <node oor:name=".uno:InsertFieldCtrl" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Insert Fields</value>
+          <value xml:lang="en-US">Insert Field</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>9</value>
@@ -561,7 +561,7 @@
       </node>
       <node oor:name=".uno:InsertFootnote" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Insert Footnote Directly</value>
+          <value xml:lang="en-US">Insert Footnote</value>
         </prop>
         <prop oor:name="Properties" oor:type="xs:int">
           <value>1</value>
diff --git a/sw/uiconfig/swriter/toolbar/standardbar.xml b/sw/uiconfig/swriter/toolbar/standardbar.xml
index 84f262d..0e4fe9b 100644
--- a/sw/uiconfig/swriter/toolbar/standardbar.xml
+++ b/sw/uiconfig/swriter/toolbar/standardbar.xml
@@ -19,10 +19,10 @@
 -->
 <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink">
  <toolbar:toolbaritem xlink:href=".uno:OpenUrl" toolbar:visible="false"/>
- <toolbar:toolbaritem xlink:href=".uno:AddDirect" toolbar:helpid="5537"/>
+ <toolbar:toolbaritem xlink:href=".uno:AddDirect" toolbar:helpid="5537" toolbar:tooltip="Create New Document"/>
  <toolbar:toolbaritem xlink:href=".uno:NewDoc" toolbar:visible="false" toolbar:helpid="5500"/>
- <toolbar:toolbaritem xlink:href=".uno:OpenFromWriter" toolbar:style="dropdown"/>
- <toolbar:toolbaritem xlink:href=".uno:Save" toolbar:helpid="5505"/>
+ <toolbar:toolbaritem xlink:href=".uno:OpenFromWriter" toolbar:style="dropdown" toolbar:tooltip="Open Document"/>
+ <toolbar:toolbaritem xlink:href=".uno:Save" toolbar:helpid="5505" toolbar:tooltip="Save Document"/>
  <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false" toolbar:helpid="5502"/>
  <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:visible="false" toolbar:helpid="5331"/>
  <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF" toolbar:helpid="6674"/>
@@ -46,14 +46,14 @@
  <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
  <toolbar:toolbaritem xlink:href=".uno:ControlCodes" toolbar:helpid="20224"/>
  <toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:InsertTable" toolbar:helpid="20330"/>
- <toolbar:toolbaritem xlink:href=".uno:InsertGraphic"/>
- <toolbar:toolbaritem xlink:href=".uno:InsertObjectChart"/>
+ <toolbar:toolbaritem xlink:href=".uno:InsertTable" toolbar:helpid="20330" toolbar:tooltip="Insert Table"/>
+ <toolbar:toolbaritem xlink:href=".uno:InsertGraphic" toolbar:tooltip="Insert Image"/>
+ <toolbar:toolbaritem xlink:href=".uno:InsertObjectChart" toolbar:tooltip="Insert Chart"/>
  <toolbar:toolbaritem xlink:href=".uno:InsertFootnote"/>
- <toolbar:toolbaritem xlink:href=".uno:HyperlinkDialog" toolbar:helpid="5678"/>
- <toolbar:toolbaritem xlink:href=".uno:InsertSymbol"/>
+ <toolbar:toolbaritem xlink:href=".uno:HyperlinkDialog" toolbar:helpid="5678" toolbar:tooltip="Insert Hyperlink"/>
+ <toolbar:toolbaritem xlink:href=".uno:InsertSymbol" toolbar:tooltip="Insert Special Character"/>
  <toolbar:toolbaritem xlink:href=".uno:InsertFieldCtrl"/>
- <toolbar:toolbaritem xlink:href=".uno:InsertAnnotation"/>
+ <toolbar:toolbaritem xlink:href=".uno:InsertAnnotation" toolbar:tooltip="Insert Comment"/>
  <toolbar:toolbarseparator/>
  <toolbar:toolbaritem xlink:href=".uno:InsertDraw" toolbar:helpid="10244"/>
  <toolbar:toolbaritem xlink:href=".uno:ViewDataSourceBrowser" toolbar:visible="false" toolbar:helpid="6660"/>


More information about the Libreoffice-commits mailing list