desktop/source/lib/init.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit c064bdb0d3d4f0644b7fd399b934b96c3b0ab90b Author: Henry Castro <hcas...@collabora.com> AuthorDate: Tue Aug 8 15:12:27 2023 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Wed Aug 9 22:58:07 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> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index abf346cbc969..638b9a44fb11 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -4570,12 +4570,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) @@ -4583,12 +4583,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); } }