[Libreoffice-commits] core.git: include/vcl svx/source vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 2 10:39:45 UTC 2020


 include/vcl/keycod.hxx        |    2 +-
 svx/source/svdraw/svdview.cxx |    1 -
 vcl/source/window/keycod.cxx  |    7 +++----
 3 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 44fd4f1aacdd9a77fd4f5d2d1d300d3c73c35861
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Sep 1 15:03:04 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Sep 2 12:38:48 2020 +0200

    KeyFuncType::REPEAT is just a bare KEY_REPEAT case
    
    the one use of it in SdrView::KeyInput already has a handler for KEY_REPEAT in
    its default branch, so we can drop KeyFuncType::REPEAT
    
    Change-Id: I6dd7612ab551baf3dfdccf0179b3efadfb7659ad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101876
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/keycod.hxx b/include/vcl/keycod.hxx
index 6219897b55cb..8da99ba7ccb9 100644
--- a/include/vcl/keycod.hxx
+++ b/include/vcl/keycod.hxx
@@ -28,7 +28,7 @@ namespace vcl { class Window; }
 
 enum class KeyFuncType : sal_Int32 { DONTKNOW,
                    CUT, COPY, PASTE, UNDO,
-                   REDO, DELETE, REPEAT };
+                   REDO, DELETE };
 
 namespace vcl
 {
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 95869b217b07..d74e5e8bf800 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -168,7 +168,6 @@ bool SdrView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
             case KeyFuncType::DELETE: DeleteMarked(); break;
             case KeyFuncType::UNDO: mpModel->Undo(); break;
             case KeyFuncType::REDO: mpModel->Redo(); break;
-            case KeyFuncType::REPEAT: mpModel->Repeat(*this); break;
             default: {
                 switch (rKEvt.GetKeyCode().GetFullCode()) {
                     case KEY_ESCAPE: {
diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index 193115f5a6a1..349e87ecbf43 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -26,7 +26,7 @@
 #include <vcl/window.hxx>
 #include <vcl/keycod.hxx>
 
-const sal_uInt16 aImplKeyFuncTab[(static_cast<int>(KeyFuncType::REPEAT)+1)*4] =
+const sal_uInt16 aImplKeyFuncTab[(static_cast<int>(KeyFuncType::DELETE)+1)*4] =
 {
     0, 0, 0, 0,                                                    // KeyFuncType::DONTKNOW
     KEY_X | KEY_MOD1, KEY_DELETE | KEY_SHIFT, KEY_CUT, 0,          // KeyFuncType::CUT
@@ -34,8 +34,7 @@ const sal_uInt16 aImplKeyFuncTab[(static_cast<int>(KeyFuncType::REPEAT)+1)*4] =
     KEY_V | KEY_MOD1, KEY_INSERT | KEY_SHIFT, KEY_PASTE, 0,        // KeyFuncType::PASTE
     KEY_Z | KEY_MOD1, KEY_BACKSPACE | KEY_MOD2, KEY_UNDO, 0,       // KeyFuncType::UNDO
     KEY_Y | KEY_MOD1, KEY_UNDO | KEY_SHIFT, 0, 0,                  // KeyFuncType::REDO
-    KEY_DELETE, 0, 0, 0,                                           // KeyFuncType::DELETE
-    KEY_REPEAT, 0, 0, 0                                            // KeyFuncType::REPEAT
+    KEY_DELETE, 0, 0, 0                                            // KeyFuncType::DELETE
 };
 
 bool ImplGetKeyCode( KeyFuncType eFunc, sal_uInt16& rCode1, sal_uInt16& rCode2, sal_uInt16& rCode3, sal_uInt16& rCode4 )
@@ -79,7 +78,7 @@ KeyFuncType vcl::KeyCode::GetFunction() const
     sal_uInt16 nCompCode = GetModifier() | GetCode();
     if ( nCompCode )
     {
-        for ( sal_uInt16 i = sal_uInt16(KeyFuncType::CUT); i <= sal_uInt16(KeyFuncType::REPEAT); i++ )
+        for ( sal_uInt16 i = sal_uInt16(KeyFuncType::CUT); i <= sal_uInt16(KeyFuncType::DELETE); i++ )
         {
             sal_uInt16 nKeyCode1;
             sal_uInt16 nKeyCode2;


More information about the Libreoffice-commits mailing list