[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - android/experimental

Miklos Vajna vmiklos at collabora.co.uk
Thu Jan 22 09:28:22 PST 2015


 android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java |   14 +++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit a07858d80694e6991234e150c7d83be699ffbfe5
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jan 22 18:27:36 2015 +0100

    android: translate DEL/ENTER in LOKitTileProvider
    
    Change-Id: Idda4769fc85a4059ba46706430f30ed247dddaa3

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
index 0e0b031..08561d8 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
@@ -278,7 +278,19 @@ public class LOKitTileProvider implements TileProvider, Document.MessageCallback
 
     @Override
     public void keyPress(KeyEvent keyEvent) {
-        int code = keyEvent.getUnicodeChar();
+        int code = 0;
+        switch (keyEvent.getKeyCode())
+        {
+        case KeyEvent.KEYCODE_DEL:
+            code = com.sun.star.awt.Key.BACKSPACE;
+            break;
+        case KeyEvent.KEYCODE_ENTER:
+            code = com.sun.star.awt.Key.RETURN;
+            break;
+        default:
+            code = keyEvent.getUnicodeChar();
+            break;
+        }
         mOffice.postKeyEvent(Office.KEY_PRESS, code);
     }
 


More information about the Libreoffice-commits mailing list