[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - android/experimental
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Tue Mar 3 00:49:51 PST 2015
android/experimental/LOAndroid3/src/java/org/mozilla/gecko/TextSelectionHandle.java | 18 ++++++----
1 file changed, 12 insertions(+), 6 deletions(-)
New commits:
commit fdbebe96c619cb73fe9b5164dfdf29e6dcf3b99f
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Tue Mar 3 17:48:47 2015 +0900
android: fix mHandleType initialization
Change-Id: I40df42b941ab1fbf9d847772e8b5c0ddea5cfcb7
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/TextSelectionHandle.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/TextSelectionHandle.java
index 61f5355..36472a5 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/TextSelectionHandle.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/TextSelectionHandle.java
@@ -55,12 +55,18 @@ public class TextSelectionHandle extends ImageView implements View.OnTouchListen
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TextSelectionHandle);
int handleType = a.getInt(R.styleable.TextSelectionHandle_handleType, 0x01);
- if (handleType == 0x01) {
- mHandleType = HandleType.START;
- } else if (handleType == 0x02) {
- mHandleType = HandleType.MIDDLE;
- } else if (handleType == 0x03) {
- mHandleType = HandleType.END;
+ switch (handleType) {
+ case 1:
+ mHandleType = HandleType.START;
+ break;
+ case 2:
+ mHandleType = HandleType.MIDDLE;
+ break;
+ case 3:
+ mHandleType = HandleType.END;
+ break;
+ default:
+ throw new RuntimeException("Unknown text handle id");
}
mIsRTL = false;
More information about the Libreoffice-commits
mailing list