desktop/source/lib/init.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 86eb55db6378309097f0bcee201177694fefe018
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Tue Aug 8 15:12:27 2023 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Mon Aug 14 17:05:14 2023 +0200

    lok: use constant keys enumeration
    
    Useful to better readability code.
    
    Signed-off-by: Henry Castro <hcas...@collabora.com>
    Change-Id: I335d010c3b1ddf3f8052b7ed6cb0f94ad20045f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155495
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155633

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 28ddbd384896..aa717dfe17cf 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4471,12 +4471,12 @@ static void 
doc_removeTextContext(LibreOfficeKitDocument* pThis, unsigned nLOKWi
         // backspace
         if (nLOKWindowId == 0)
         {
-            KeyEvent aEvt(8, 1283);
+            KeyEvent aEvt(8, KEY_BACKSPACE);
             for (int i = 0; i < nCharBefore; ++i)
                 pWindow->KeyInput(aEvt);
         }
         else
-            SfxLokHelper::postKeyEventAsync(pWindow, LOK_KEYEVENT_KEYINPUT, 8, 
1283, nCharBefore - 1);
+            SfxLokHelper::postKeyEventAsync(pWindow, LOK_KEYEVENT_KEYINPUT, 8, 
KEY_BACKSPACE, nCharBefore - 1);
     }
 
     if (nCharAfter > 0)
@@ -4484,12 +4484,12 @@ static void 
doc_removeTextContext(LibreOfficeKitDocument* pThis, unsigned nLOKWi
         // delete (forward)
         if (nLOKWindowId == 0)
         {
-            KeyEvent aEvt(46, 1286);
+            KeyEvent aEvt(46, KEY_DELETE);
             for (int i = 0; i < nCharAfter; ++i)
                 pWindow->KeyInput(aEvt);
         }
         else
-            SfxLokHelper::postKeyEventAsync(pWindow, LOK_KEYEVENT_KEYINPUT, 
46, 1286, nCharAfter - 1);
+            SfxLokHelper::postKeyEventAsync(pWindow, LOK_KEYEVENT_KEYINPUT, 
46, KEY_DELETE, nCharAfter - 1);
     }
 }
 

Reply via email to