summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-02-27 21:00:02 +0200
committerTor Lillqvist <tml@iki.fi>2013-02-27 21:00:53 +0200
commit7cf5fea49991cce9198d43d63a5fb403234f6d4c (patch)
tree99cb6def8167de9c1f90642e5661d3b6d6bcc464 /android
parent86d734c03bcb57d11347404e2cbc7586981bc6e4 (diff)
Send text input to the LO code
Change-Id: I28070fb1a8b85c9737d2a78a8a713243ce47dde9
Diffstat (limited to 'android')
-rw-r--r--android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java5
1 files changed, 5 insertions, 0 deletions
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;
}
}