[Libreoffice-commits] .: Branch 'feature/calc-key-binding-compat' - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed Oct 13 18:38:17 PDT 2010
sc/source/ui/docshell/docsh.cxx | 13 ++++++++++---
sc/source/ui/src/optdlg.src | 2 +-
2 files changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 764e33d386f7e881e1563c009f5069e33a0ee5f4
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Oct 13 21:37:08 2010 -0400
Let's use Ctrl-Shift-D to launch selection list in LibreOffice.
The legacy OOo used Ctrl-D for launching selection list, but we
use Ctrl-D for "fill down". Luckily Ctrl-Shift-D is not taken.
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 9a43e32..a51b13d 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2854,7 +2854,7 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
return;
vector<const awt::KeyEvent*> aKeys;
- aKeys.reserve(3);
+ aKeys.reserve(4);
// Backsapce key
awt::KeyEvent aBackspace;
@@ -2874,8 +2874,14 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
aCtrlD.Modifiers = awt::KeyModifier::MOD1;
aKeys.push_back(&aCtrlD);
- // Remove all involved keys first, as swapping of commands don't work well
- // without this.
+ // Ctrl-Shift-D
+ awt::KeyEvent aCtrlShiftD;
+ aCtrlShiftD.KeyCode = awt::Key::D;
+ aCtrlShiftD.Modifiers = awt::KeyModifier::MOD1 | awt::KeyModifier::SHIFT;
+ aKeys.push_back(&aCtrlShiftD);
+
+ // Remove all involved keys first, because swapping commands don't work
+ // well without doing this.
removeKeysIfExists(xScAccel, aKeys);
xScAccel->store();
@@ -2885,6 +2891,7 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
xScAccel->setKeyEvent(aDelete, OUString::createFromAscii(".uno:ClearContents"));
xScAccel->setKeyEvent(aBackspace, OUString::createFromAscii(".uno:Delete"));
xScAccel->setKeyEvent(aCtrlD, OUString::createFromAscii(".uno:FillDown"));
+ xScAccel->setKeyEvent(aCtrlShiftD, OUString::createFromAscii(".uno:DataSelect"));
break;
case ScOptionsUtil::KEY_OOO_LEGACY:
xScAccel->setKeyEvent(aDelete, OUString::createFromAscii(".uno:Delete"));
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index ac85805..f1dc874 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -299,7 +299,7 @@ TabPage RID_SCPAGE_COMPATIBILITY
Pos = MAP_APPFONT ( 12, 16 ) ;
Size = MAP_APPFONT ( 165, 24 ) ;
Wordbreak = TRUE;
- Text [ en-US ] = "Select desired ~key binding type. This may overwrite the existing key bindings if any." ;
+ Text [ en-US ] = "Select desired ~key binding type. Changing the key binding type may overwrite some of the existing key bindings." ;
};
ListBox LB_KEY_BINDINGS
More information about the Libreoffice-commits
mailing list