summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java5
-rw-r--r--android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java4
-rw-r--r--android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java3
3 files changed, 12 insertions, 0 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
index 4b22d1f96133..3f39257551ae 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEvent.java
@@ -13,6 +13,7 @@ public class LOEvent {
public static final int DRAW = 4;
public static final int CHANGE_PART = 5;
public static final int LOAD = 6;
+ public static final int REDRAW = 7;
public int mType;
private ImmutableViewportMetrics mViewportMetrics;
@@ -20,6 +21,10 @@ public class LOEvent {
private int mPartIndex;
private String mFilename;
+ public LOEvent(int type) {
+ mType = type;
+ }
+
public LOEvent(int type, int widthPixels, int heightPixels) {
mType = type;
mTypeString = "Size Changed: " + widthPixels + " " + heightPixels;
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java
index d0b024af9feb..90a358212f58 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java
@@ -30,4 +30,8 @@ public class LOEventFactory {
public static LOEvent load(String inputFile) {
return new LOEvent(LOEvent.LOAD, inputFile);
}
+
+ public static LOEvent redraw() {
+ return new LOEvent(LOEvent.REDRAW);
+ }
}
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
index b6f0b997d7a8..859a3d8eccba 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
@@ -29,4 +29,7 @@ public class LOKitShell {
return LibreOfficeMainActivity.mAppContext.mMainHandler;
}
+ public static void queueRedraw() {
+ LOKitShell.sendEvent(LOEventFactory.redraw());
+ }
}