summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-02-17 10:33:47 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-02-23 10:10:22 +0100
commitbfe3a47e1e5bb51b7f9440b6155d002eedcea22b (patch)
tree4abe069df6959ac50b108063d56173482c1f878d /desktop
parent0622d2658a8ccadadfb5eb2180a252833c3a9c22 (diff)
lok::Office::postKeyEvent: allow different char and key code
editeng is not happy with non-zero char code for css::awt::Key::ESCAPE. Change-Id: If26923df7defb8a47766e9109835a8569067e578
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx6
-rw-r--r--desktop/source/lib/lokandroid.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3be8a2002eaa..a144b51969bf 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -265,7 +265,7 @@ static char * lo_getError (LibreOfficeKit* pThis);
static LibreOfficeKitDocument* lo_documentLoadWithOptions (LibreOfficeKit* pThis,
const char* pURL,
const char* pOptions);
-static void lo_postKeyEvent (LibreOfficeKit* pThis, int nType, int nCode);
+static void lo_postKeyEvent (LibreOfficeKit* pThis, int nType, int nCharCode, int nKeyCode);
struct LibLibreOffice_Impl : public _LibreOfficeKit
@@ -712,12 +712,12 @@ static char* lo_getError (LibreOfficeKit *pThis)
return pMemory;
}
-static void lo_postKeyEvent(LibreOfficeKit* /*pThis*/, int nType, int nCode)
+static void lo_postKeyEvent(LibreOfficeKit* /*pThis*/, int nType, int nCharCode, int nKeyCode)
{
#if defined(UNX) && !defined(MACOSX) && !defined(ENABLE_HEADLESS)
if (SalFrame *pFocus = SvpSalFrame::GetFocusFrame())
{
- KeyEvent aEvent(nCode, nCode, 0);
+ KeyEvent aEvent(nCharCode, nKeyCode, 0);
switch (nType)
{
case LOK_KEYEVENT_KEYINPUT:
diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx
index 5403ea0544ad..9ea1842975a3 100644
--- a/desktop/source/lib/lokandroid.cxx
+++ b/desktop/source/lib/lokandroid.cxx
@@ -76,10 +76,10 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_destroyAn
}
extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_postKeyEvent
- (JNIEnv* pEnv, jobject aObject, jint nType, jint nCode)
+ (JNIEnv* pEnv, jobject aObject, jint nType, jint nCharCode, jint nKeyCode)
{
LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
- pLibreOfficeKit->pClass->postKeyEvent(pLibreOfficeKit, nType, nCode);
+ pLibreOfficeKit->pClass->postKeyEvent(pLibreOfficeKit, nType, nCharCode, nKeyCode);
}
namespace