[Libreoffice-commits] core.git: officecfg/registry sc/source

Dennis Francis dennisfrancis.in at gmail.com
Sat Feb 27 12:02:32 UTC 2016


 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |    6 ++
 sc/source/ui/docshell/docsh.cxx                                |   24 +++++++++-
 2 files changed, 29 insertions(+), 1 deletion(-)

New commits:
commit dab16a16fa3b853f7e139fc91817752b38dc9171
Author: Dennis Francis <dennisfrancis.in at gmail.com>
Date:   Sat Feb 27 13:56:51 2016 +0530

    tdf#97906 : Toggle reference and show data sources shortcuts
    
    In Default mode :
    F4            = Toggle reference
    Shift F4      = Toggle reference
    Ctrl+Shift+F4 = Show data sources (both Mac and non Mac)
    
    In Legacy mode :
    F4            = Show data sources
    Shift F4      = Toggle reference
    
    Change-Id: Ifb53bfa671f212d73ebb8c3f80ed5c498d517d4d
    Reviewed-on: https://gerrit.libreoffice.org/22728
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index cbf75a5..7338768 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -780,6 +780,12 @@
             <value xml:lang="en-US">.uno:ViewDataSourceBrowser</value>
           </prop>
         </node>
+        <node oor:name="F4_SHIFT_MOD3" oor:op="replace">
+          <prop oor:name="Command">
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="en-US">.uno:ViewDataSourceBrowser</value>
+          </prop>
+        </node>
         <node oor:name="F5" oor:op="replace">
           <prop oor:name="Command">
             <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 21eb4ed..5d03e98 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2976,7 +2976,7 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
         return;
 
     vector<const awt::KeyEvent*> aKeys;
-    aKeys.reserve(4);
+    aKeys.reserve(7);
 
     // Backspace key
     awt::KeyEvent aBackspace;
@@ -3002,6 +3002,24 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
     aAltDown.Modifiers = awt::KeyModifier::MOD2;
     aKeys.push_back(&aAltDown);
 
+    // F4
+    awt::KeyEvent aF4;
+    aF4.KeyCode = awt::Key::F4;
+    aF4.Modifiers = 0;
+    aKeys.push_back(&aF4);
+
+    // CTRL+SHIFT+F4
+    awt::KeyEvent aCtrlShiftF4;
+    aCtrlShiftF4.KeyCode = awt::Key::F4;
+    aCtrlShiftF4.Modifiers = awt::KeyModifier::MOD1 | awt::KeyModifier::SHIFT;
+    aKeys.push_back(&aCtrlShiftF4);
+
+    // CTRL+SHIFT+F4 Mac
+    awt::KeyEvent aCtrlShiftF4Mac;
+    aCtrlShiftF4Mac.KeyCode = awt::Key::F4;
+    aCtrlShiftF4Mac.Modifiers = awt::KeyModifier::MOD3 | awt::KeyModifier::SHIFT;
+    aKeys.push_back(&aCtrlShiftF4Mac);
+
     // Remove all involved keys first, because swapping commands don't work
     // well without doing this.
     removeKeysIfExists(xScAccel, aKeys);
@@ -3014,11 +3032,15 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
             xScAccel->setKeyEvent(aBackspace, ".uno:Delete");
             xScAccel->setKeyEvent(aCtrlD, ".uno:FillDown");
             xScAccel->setKeyEvent(aAltDown, ".uno:DataSelect");
+            xScAccel->setKeyEvent(aF4, ".uno:ToggleRelative");
+            xScAccel->setKeyEvent(aCtrlShiftF4, ".uno:ViewDataSourceBrowser");
+            xScAccel->setKeyEvent(aCtrlShiftF4Mac, ".uno:ViewDataSourceBrowser");
         break;
         case ScOptionsUtil::KEY_OOO_LEGACY:
             xScAccel->setKeyEvent(aDelete, ".uno:Delete");
             xScAccel->setKeyEvent(aBackspace, ".uno:ClearContents");
             xScAccel->setKeyEvent(aCtrlD, ".uno:DataSelect");
+            xScAccel->setKeyEvent(aF4, ".uno:ViewDataSourceBrowser");
         break;
         default:
             ;


More information about the Libreoffice-commits mailing list