diff options
author | Henry Castro <hcastro@collabora.com> | 2023-08-08 15:12:27 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2023-09-01 15:59:34 +0200 |
commit | 4c2aa7e073d6ab9f063272011d2866addeeed526 (patch) | |
tree | f35b86cfcf7071ae686d37e2dd54db76fdf638fd /desktop/source | |
parent | 670f0c406707a20422124396b6f8da235de7b3a6 (diff) |
lok: use constant keys enumeration
Useful to better readability code.
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I335d010c3b1ddf3f8052b7ed6cb0f94ad20045f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155495
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156416
Tested-by: Jenkins
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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); } } |