diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-09-30 20:58:43 +0200 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-09-30 20:45:37 +0100 |
commit | 0be0147bd5512a83da4d25e492469fc67d5d0030 (patch) | |
tree | 348c74e8798f7e73fe2ea67463af276c57a54f64 | |
parent | 651a6780554215107bfb29abf50481db48a2e973 (diff) |
android: redraw LOEvent
Change-Id: I6171f7a36c07f53eeec0cc83caa168ec97459d53
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()); + } } |