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

New commits:
commit 4c2aa7e073d6ab9f063272011d2866addeeed526
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Tue Aug 8 15:12:27 2023 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Fri Sep 1 15:59:34 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/+/156416
    Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 21c47eacdfc7..6db6f722bee6 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4534,12 +4534,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)
@@ -4547,12 +4547,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