From 7cf5fea49991cce9198d43d63a5fb403234f6d4c Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 27 Feb 2013 21:00:02 +0200 Subject: Send text input to the LO code Change-Id: I28070fb1a8b85c9737d2a78a8a713243ce47dde9 --- .../src/org/libreoffice/android/experimental/desktop/Desktop.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'android') diff --git a/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java b/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java index a3eb4d64dcc9..5c5433062db1 100644 --- a/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java +++ b/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java @@ -45,6 +45,7 @@ public class Desktop /* implementend by vcl */ public static native void renderVCL(Bitmap bitmap); public static native void setViewSize(int width, int height); + public static native void key(char c, short timestamp); /** * This class contains the state that is initialized once and never changes @@ -217,6 +218,10 @@ public class Desktop @Override public boolean commitText(CharSequence text, int newCursorPosition) { Log.i(TAG, "commitText(" + text + ", " + newCursorPosition + ")"); + short timestamp = (short) (System.currentTimeMillis() % Short.MAX_VALUE); + for (int i = 0; i < text.length(); i++) { + Desktop.key(text.charAt(i), timestamp); + } return true; } } -- cgit v1.2.3