summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2023-08-08 15:12:27 -0400
committerHenry Castro <hcastro@collabora.com>2023-08-14 17:05:14 +0200
commit86eb55db6378309097f0bcee201177694fefe018 (patch)
tree4fd33aca645dc0e2359388d15988e3813a6e9f3c
parent359651c3f4c4615b2fdc859fa6d63989dd5396b1 (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/+/155633
-rw-r--r--desktop/source/lib/init.cxx8
1 files changed, 4 insertions, 4 deletions
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);
}
}