diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-04-03 18:25:40 +0900 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-07 09:18:16 +0200 |
commit | ae4f4b7192f909eb8304dcd9c644796cb3af83f8 (patch) | |
tree | 3b81f7e9e5072dd707ee30fc39c0064929419da4 /android | |
parent | 2bbf630d9669a9fd5f961a2a238b4e485975f437 (diff) |
android: remove unneeded layerView stuff
Change-Id: Ide81f4b5dd7f71a3dda21ff51d02a12d7fe9a315
Diffstat (limited to 'android')
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/SelectionHandle.java | 2 | ||||
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/libreoffice/overlay/TextCursorView.java | 19 |
2 files changed, 3 insertions, 18 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/SelectionHandle.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/SelectionHandle.java index bcf22b53499f..38b5dc121932 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/SelectionHandle.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/canvas/SelectionHandle.java @@ -14,8 +14,8 @@ public abstract class SelectionHandle extends BitmapHandle { private static final long MINIMUM_HANDLE_UPDATE_TIME = 50 * 1000000; private final PointF mDragStartPoint = new PointF(); - private long mLastTime = 0; private final PointF mDragDocumentPosition = new PointF(); + private long mLastTime = 0; public SelectionHandle(Bitmap bitmap) { super(bitmap); diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/overlay/TextCursorView.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/overlay/TextCursorView.java index 74a0dc3f4107..44d0d5100e06 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/overlay/TextCursorView.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/overlay/TextCursorView.java @@ -127,15 +127,9 @@ public class TextCursorView extends View implements View.OnTouchListener { * @param selectionRects - list of text selection rectangles */ public void changeSelections(List<RectF> selectionRects) { - LayerView layerView = LOKitShell.getLayerView(); - if (layerView == null) { - Log.e(LOGTAG, "Can't position selections because layerView is null"); - return; - } - mSelections = selectionRects; - ImmutableViewportMetrics metrics = layerView.getViewportMetrics(); + ImmutableViewportMetrics metrics = mLayerView.getViewportMetrics(); repositionWithViewport(metrics.viewportRectLeft, metrics.viewportRectTop, metrics.zoomFactor); } @@ -147,15 +141,10 @@ public class TextCursorView extends View implements View.OnTouchListener { if (RectUtils.fuzzyEquals(mGraphicSelection.mRectangle, rectangle)) { return; } - LayerView layerView = LOKitShell.getLayerView(); - if (layerView == null) { - Log.e(LOGTAG, "Can't position selections because layerView is null"); - return; - } mGraphicSelection.mRectangle = rectangle; - ImmutableViewportMetrics metrics = layerView.getViewportMetrics(); + ImmutableViewportMetrics metrics = mLayerView.getViewportMetrics(); repositionWithViewport(metrics.viewportRectLeft, metrics.viewportRectTop, metrics.zoomFactor); } @@ -348,10 +337,6 @@ public class TextCursorView extends View implements View.OnTouchListener { return false; } - public void setLayerView(LayerView layerView) { - this.mLayerView = layerView; - } - public void positionHandle(SelectionHandle.HandleType type, RectF position) { SelectionHandle handle = getHandleForType(type); if (RectUtils.fuzzyEquals(handle.mDocumentPosition, position)) { |