[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - 6 commits - android/experimental
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Wed Mar 18 01:07:51 PDT 2015
android/experimental/LOAndroid3/src/java/org/libreoffice/DrawElementHandle.java | 40 +++
android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java | 10
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java | 7
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java | 22 +
android/experimental/LOAndroid3/src/java/org/libreoffice/MockTileProvider.java | 8
android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java | 111 ++++++++--
android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java | 10
7 files changed, 179 insertions(+), 29 deletions(-)
New commits:
commit a3b502f88f13f0ca0eb60e02d507ca525f137f10
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Wed Mar 18 14:53:24 2015 +0900
android: move handle code to DrawElementHandle
Change-Id: Ica316ed9660e235e756ef380da8f441c976de07f
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/DrawElementHandle.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/DrawElementHandle.java
new file mode 100644
index 0000000..1af0724
--- /dev/null
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/DrawElementHandle.java
@@ -0,0 +1,40 @@
+/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+package org.libreoffice;
+
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.PointF;
+
+public class DrawElementHandle {
+ public PointF mPosition = new PointF();
+ private float mRadius = 20.0f;
+ private Paint mGraphicHandleFillPaint = new Paint();
+ private Paint mGraphicSelectionPaint = new Paint();
+
+ public DrawElementHandle(Paint graphicSelectionPaint) {
+ mGraphicSelectionPaint = graphicSelectionPaint;
+
+ mGraphicHandleFillPaint.setStyle(Paint.Style.FILL);
+ mGraphicHandleFillPaint.setColor(Color.WHITE);
+ }
+
+ public void draw(Canvas canvas) {
+ canvas.drawCircle(mPosition.x, mPosition.y, mRadius, mGraphicHandleFillPaint);
+ canvas.drawCircle(mPosition.x, mPosition.y, mRadius, mGraphicSelectionPaint);
+ }
+
+ public void reposition(float x, float y) {
+ mPosition.x = x;
+ mPosition.y = y;
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
index 0128f94..c9ecabb 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
@@ -51,14 +51,16 @@ public class TextCursorView extends View implements View.OnTouchListener {
private RectF mGraphicSelection = new RectF();
private RectF mGraphicScaledSelection = new RectF();
private Paint mGraphicSelectionPaint = new Paint();
- private Paint mGraphicHandleFillPaint = new Paint();
- private float mRadius = 20.0f;
+
+
private boolean mGraphicSelectionVisible;
private PointF mTouchStart = new PointF();
private PointF mDeltaPoint = new PointF();
private boolean mGraphicSelectionMove = false;
private LayerView mLayerView;
+ private DrawElementHandle mHandles[] = new DrawElementHandle[8];
+
public TextCursorView(Context context) {
super(context);
initialize();
@@ -92,11 +94,17 @@ public class TextCursorView extends View implements View.OnTouchListener {
mGraphicSelectionPaint.setStyle(Paint.Style.STROKE);
mGraphicSelectionPaint.setColor(Color.BLACK);
mGraphicSelectionPaint.setStrokeWidth(2);
-
- mGraphicHandleFillPaint.setStyle(Paint.Style.FILL);
- mGraphicHandleFillPaint.setColor(Color.WHITE);
mGraphicSelectionVisible = false;
+ mHandles[0] = new DrawElementHandle(mGraphicSelectionPaint);
+ mHandles[1] = new DrawElementHandle(mGraphicSelectionPaint);
+ mHandles[2] = new DrawElementHandle(mGraphicSelectionPaint);
+ mHandles[3] = new DrawElementHandle(mGraphicSelectionPaint);
+ mHandles[4] = new DrawElementHandle(mGraphicSelectionPaint);
+ mHandles[5] = new DrawElementHandle(mGraphicSelectionPaint);
+ mHandles[6] = new DrawElementHandle(mGraphicSelectionPaint);
+ mHandles[7] = new DrawElementHandle(mGraphicSelectionPaint);
+
postDelayed(cursorAnimation, CURSOR_BLINK_TIME);
mInitialized = true;
@@ -156,6 +164,16 @@ public class TextCursorView extends View implements View.OnTouchListener {
mGraphicScaledSelection = RectUtils.scale(mGraphicSelection, zoom);
mGraphicScaledSelection.offset(-x, -y);
+
+ mHandles[0].reposition(mGraphicScaledSelection.left, mGraphicScaledSelection.top);
+ mHandles[1].reposition(mGraphicScaledSelection.centerX(), mGraphicScaledSelection.top);
+ mHandles[2].reposition(mGraphicScaledSelection.right, mGraphicScaledSelection.top);
+ mHandles[3].reposition(mGraphicScaledSelection.left, mGraphicScaledSelection.centerY());
+ mHandles[4].reposition(mGraphicScaledSelection.right, mGraphicScaledSelection.centerY());
+ mHandles[5].reposition(mGraphicScaledSelection.left, mGraphicScaledSelection.bottom);
+ mHandles[6].reposition(mGraphicScaledSelection.centerX(), mGraphicScaledSelection.bottom);
+ mHandles[7].reposition(mGraphicScaledSelection.right, mGraphicScaledSelection.bottom);
+
invalidate();
}
@@ -172,29 +190,10 @@ public class TextCursorView extends View implements View.OnTouchListener {
}
if (mGraphicSelectionVisible) {
canvas.drawRect(mGraphicScaledSelection, mGraphicSelectionPaint);
- canvas.drawCircle(mGraphicScaledSelection.left, mGraphicScaledSelection.top, mRadius, mGraphicHandleFillPaint);
- canvas.drawCircle(mGraphicScaledSelection.left, mGraphicScaledSelection.top, mRadius, mGraphicSelectionPaint);
- canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.top, mRadius, mGraphicHandleFillPaint);
- canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.top, mRadius, mGraphicSelectionPaint);
-
- canvas.drawCircle(mGraphicScaledSelection.left, mGraphicScaledSelection.bottom, mRadius, mGraphicHandleFillPaint);
- canvas.drawCircle(mGraphicScaledSelection.left, mGraphicScaledSelection.bottom, mRadius, mGraphicSelectionPaint);
-
- canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.bottom, mRadius, mGraphicHandleFillPaint);
- canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.bottom, mRadius, mGraphicSelectionPaint);
-
- canvas.drawCircle(mGraphicScaledSelection.left, mGraphicScaledSelection.centerY(), mRadius, mGraphicHandleFillPaint);
- canvas.drawCircle(mGraphicScaledSelection.left, mGraphicScaledSelection.centerY(), mRadius, mGraphicSelectionPaint);
-
- canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.centerY(), mRadius, mGraphicHandleFillPaint);
- canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.centerY(), mRadius, mGraphicSelectionPaint);
-
- canvas.drawCircle(mGraphicScaledSelection.centerX(), mGraphicScaledSelection.top, mRadius, mGraphicHandleFillPaint);
- canvas.drawCircle(mGraphicScaledSelection.centerX(), mGraphicScaledSelection.top, mRadius, mGraphicSelectionPaint);
-
- canvas.drawCircle(mGraphicScaledSelection.centerX(), mGraphicScaledSelection.bottom, mRadius, mGraphicHandleFillPaint);
- canvas.drawCircle(mGraphicScaledSelection.centerX(), mGraphicScaledSelection.bottom, mRadius, mGraphicSelectionPaint);
+ for (DrawElementHandle handle : mHandles) {
+ handle.draw(canvas);
+ }
if (mGraphicSelectionMove) {
RectF one = new RectF(mGraphicScaledSelection);
commit 700f9b980cc9144868cb61c31b1d0edb12aaac31
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Wed Mar 18 14:17:01 2015 +0900
android: draw also the center handles for graphic selection
Change-Id: Ic466e9efc0cb97fb39e94624f018ab5b98a54929
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
index 7ce235e..0128f94 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
@@ -184,6 +184,18 @@ public class TextCursorView extends View implements View.OnTouchListener {
canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.bottom, mRadius, mGraphicHandleFillPaint);
canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.bottom, mRadius, mGraphicSelectionPaint);
+ canvas.drawCircle(mGraphicScaledSelection.left, mGraphicScaledSelection.centerY(), mRadius, mGraphicHandleFillPaint);
+ canvas.drawCircle(mGraphicScaledSelection.left, mGraphicScaledSelection.centerY(), mRadius, mGraphicSelectionPaint);
+
+ canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.centerY(), mRadius, mGraphicHandleFillPaint);
+ canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.centerY(), mRadius, mGraphicSelectionPaint);
+
+ canvas.drawCircle(mGraphicScaledSelection.centerX(), mGraphicScaledSelection.top, mRadius, mGraphicHandleFillPaint);
+ canvas.drawCircle(mGraphicScaledSelection.centerX(), mGraphicScaledSelection.top, mRadius, mGraphicSelectionPaint);
+
+ canvas.drawCircle(mGraphicScaledSelection.centerX(), mGraphicScaledSelection.bottom, mRadius, mGraphicHandleFillPaint);
+ canvas.drawCircle(mGraphicScaledSelection.centerX(), mGraphicScaledSelection.bottom, mRadius, mGraphicSelectionPaint);
+
if (mGraphicSelectionMove) {
RectF one = new RectF(mGraphicScaledSelection);
one.offset(mDeltaPoint.x, mDeltaPoint.y);
commit 08714159dbdd5abfa138553b90aa8fb5710eef4d
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Wed Mar 18 14:00:44 2015 +0900
android: change cursor blink time to a constant static field
Change-Id: I49947cccfd2662533da3087cb1f04dc91014cfb0
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
index f44a840..7ce235e 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
@@ -34,6 +34,7 @@ import java.util.List;
public class TextCursorView extends View implements View.OnTouchListener {
private static final String LOGTAG = TextCursorView.class.getSimpleName();
private static final float CURSOR_WIDTH = 2f;
+ private static final int CURSOR_BLINK_TIME = 500;
private boolean mInitialized = false;
private RectF mCursorPosition = new RectF();
@@ -96,7 +97,7 @@ public class TextCursorView extends View implements View.OnTouchListener {
mGraphicHandleFillPaint.setColor(Color.WHITE);
mGraphicSelectionVisible = false;
- postDelayed(cursorAnimation, 500);
+ postDelayed(cursorAnimation, CURSOR_BLINK_TIME);
mInitialized = true;
}
@@ -197,7 +198,7 @@ public class TextCursorView extends View implements View.OnTouchListener {
mCursorPaint.setAlpha(mCursorPaint.getAlpha() == 0 ? 0xFF : 0);
invalidate();
}
- postDelayed(cursorAnimation, 500);
+ postDelayed(cursorAnimation, CURSOR_BLINK_TIME);
}
};
commit 89f91675c9491fedf6d5a92009e251999cfcd034
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Wed Mar 18 13:53:48 2015 +0900
android: move graphic selection, use a touch event to transmit
Initiali implementation moving of graphic selection in
TextCursorView. Transmit start and end coordinates of the move
using a touch event with a special type "GraphicSelectionStart"
and "GraphicSelectionEnd" set.
In LOKitThread process the event and delegate the request to the
TileProvider (setGraphicSelectionStart/setGraphicSelectionEnd).
Change-Id: Iccceeb3d4de2fc1761b23fc5ede99d00d5e803aa
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
index 3bed163..1477730 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
@@ -304,10 +304,14 @@ public class LOKitThread extends Thread {
mTileProvider.mouseButtonUp(documentCoordinate, 1);
mTileProvider.mouseButtonDown(documentCoordinate, 2);
mTileProvider.mouseButtonUp(documentCoordinate, 2);
- } else { // "SingleTap"
+ } else if (touchType.equals("SingleTap")) {
mInvalidationHandler.changeStateTo(InvalidationHandler.OverlayState.TRANSITION);
mTileProvider.mouseButtonDown(documentCoordinate, 1);
mTileProvider.mouseButtonUp(documentCoordinate, 1);
+ } else if (touchType.equals("GraphicSelectionStart")) {
+ mTileProvider.setGraphicSelectionStart(documentCoordinate);
+ } else if (touchType.equals("GraphicSelectionEnd")) {
+ mTileProvider.setGraphicSelectionEnd(documentCoordinate);
}
}
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
index 8eb1cc8..f44a840 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/TextCursorView.java
@@ -12,10 +12,12 @@ import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
+import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.Log;
+import android.view.MotionEvent;
import android.view.View;
import android.widget.RelativeLayout;
@@ -29,7 +31,7 @@ import java.util.List;
/**
* Text cursor view responsible to show the cursor drawable on the screen.
*/
-public class TextCursorView extends View {
+public class TextCursorView extends View implements View.OnTouchListener {
private static final String LOGTAG = TextCursorView.class.getSimpleName();
private static final float CURSOR_WIDTH = 2f;
@@ -51,6 +53,10 @@ public class TextCursorView extends View {
private Paint mGraphicHandleFillPaint = new Paint();
private float mRadius = 20.0f;
private boolean mGraphicSelectionVisible;
+ private PointF mTouchStart = new PointF();
+ private PointF mDeltaPoint = new PointF();
+ private boolean mGraphicSelectionMove = false;
+ private LayerView mLayerView;
public TextCursorView(Context context) {
super(context);
@@ -67,9 +73,12 @@ public class TextCursorView extends View {
initialize();
}
+ /**
+ * Initialize the selection and cursor view.
+ */
private void initialize() {
if (!mInitialized) {
- postDelayed(cursorAnimation, 500);
+ setOnTouchListener(this);
mCursorPaint.setColor(Color.BLACK);
mCursorPaint.setAlpha(0xFF);
@@ -87,6 +96,8 @@ public class TextCursorView extends View {
mGraphicHandleFillPaint.setColor(Color.WHITE);
mGraphicSelectionVisible = false;
+ postDelayed(cursorAnimation, 500);
+
mInitialized = true;
}
}
@@ -171,6 +182,12 @@ public class TextCursorView extends View {
canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.bottom, mRadius, mGraphicHandleFillPaint);
canvas.drawCircle(mGraphicScaledSelection.right, mGraphicScaledSelection.bottom, mRadius, mGraphicSelectionPaint);
+
+ if (mGraphicSelectionMove) {
+ RectF one = new RectF(mGraphicScaledSelection);
+ one.offset(mDeltaPoint.x, mDeltaPoint.y);
+ canvas.drawRect(one, mGraphicSelectionPaint);
+ }
}
}
@@ -213,6 +230,54 @@ public class TextCursorView extends View {
mGraphicSelectionVisible = false;
invalidate();
}
+
+ @Override
+ public boolean onTouch(View view, MotionEvent event) {
+ if (mLayerView == null) {
+ mLayerView = LOKitShell.getLayerView();
+ if (mLayerView == null) {
+ return false;
+ }
+ }
+
+ switch (event.getActionMasked()) {
+ case MotionEvent.ACTION_DOWN: {
+ mTouchStart.x = event.getX();
+ mTouchStart.y = event.getY();
+ if (mGraphicSelectionVisible && mGraphicScaledSelection.contains(mTouchStart.x, mTouchStart.y)) {
+ mGraphicSelectionMove = true;
+ PointF documentPoint = mLayerView.getLayerClient().convertViewPointToLayerPoint(mTouchStart);
+ Log.i(LOGTAG, "Down: " + documentPoint);
+ LOKitShell.sendTouchEvent("GraphicSelectionStart", documentPoint);
+ return true;
+ }
+ }
+ case MotionEvent.ACTION_UP: {
+ if (mGraphicSelectionMove) {
+ mGraphicSelectionMove = false;
+ mTouchStart.offset(mDeltaPoint.x, mDeltaPoint.y);
+ PointF documentPoint = mLayerView.getLayerClient().convertViewPointToLayerPoint(mTouchStart);
+ Log.i(LOGTAG, "Up: " + documentPoint);
+ LOKitShell.sendTouchEvent("GraphicSelectionEnd", documentPoint);
+ mTouchStart.x = 0.0f;
+ mTouchStart.y = 0.0f;
+ mDeltaPoint.x = 0.0f;
+ mDeltaPoint.y = 0.0f;
+ invalidate();
+ return true;
+ }
+ }
+ case MotionEvent.ACTION_MOVE: {
+ if (mGraphicSelectionMove) {
+ mDeltaPoint.x = event.getX() - mTouchStart.x;
+ mDeltaPoint.y = event.getY() - mTouchStart.y;
+ invalidate();
+ return true;
+ }
+ }
+ }
+ return false;
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit dab52c656a8d8ff4ba3d980bb2312e98600e68a2
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Tue Mar 17 17:47:58 2015 +0900
android: set graphic selection via TileProvider
Change-Id: I26c3eb03ad3bcc23bed380e873d353bc2941de9a
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
index 45603d7..1ea06d6 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
@@ -457,6 +457,28 @@ public class LOKitTileProvider implements TileProvider {
setTextSelection(Document.SET_TEXT_SELECTION_RESET, documentCoordinate);
}
+ /**
+ * @see org.libreoffice.TileProvider#setGraphicSelectionStart(android.graphics.PointF)
+ */
+ @Override
+ public void setGraphicSelectionStart(PointF documentCoordinate) {
+ setGraphicSelection(Document.SET_GRAPHIC_SELECTION_START, documentCoordinate);
+ }
+
+ /**
+ * @see org.libreoffice.TileProvider#setGraphicSelectionEnd(android.graphics.PointF)
+ */
+ @Override
+ public void setGraphicSelectionEnd(PointF documentCoordinate) {
+ setGraphicSelection(Document.SET_GRAPHIC_SELECTION_END, documentCoordinate);
+ }
+
+ private void setGraphicSelection(int type, PointF documentCoordinate) {
+ int x = (int) pixelToTwip(documentCoordinate.x, mDPI);
+ int y = (int) pixelToTwip(documentCoordinate.y, mDPI);
+ mDocument.setGraphicSelection(type, x, y);
+ }
+
@Override
protected void finalize() throws Throwable {
close();
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/MockTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/MockTileProvider.java
index d986875..44f9e6b 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/MockTileProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/MockTileProvider.java
@@ -126,6 +126,14 @@ public class MockTileProvider implements TileProvider {
}
@Override
+ public void setGraphicSelectionStart(PointF documentCoordinate) {
+ }
+
+ @Override
+ public void setGraphicSelectionEnd(PointF documentCoordinate) {
+ }
+
+ @Override
public void changePart(int partIndex) {
}
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java
index 701806e..9a70696 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java
@@ -134,6 +134,16 @@ public interface TileProvider {
* @param documentCoordinate
*/
void setTextSelectionReset(PointF documentCoordinate);
+
+ /**
+ * Send a request to change start the change of graphic selection.
+ */
+ void setGraphicSelectionStart(PointF documentCoordinate);
+
+ /**
+ * Send a request to change end the change of graphic selection..
+ */
+ void setGraphicSelectionEnd(PointF documentCoordinate);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit fb725c825beae9eef1914ad1e33430f215b7c729
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Tue Mar 17 17:42:41 2015 +0900
android: TileProvider is unused in InvalidationHandler
Change-Id: I455e58f4395cb463efa888fe69ee7ea48b4681fb
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
index 6bbe110..e9110f6 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
@@ -19,25 +19,15 @@ public class InvalidationHandler implements Document.MessageCallback {
private static String LOGTAG = InvalidationHandler.class.getSimpleName();
private final TextCursorLayer mTextCursorLayer;
private final TextSelection mTextSelection;
- private TileProvider mTileProvider;
private OverlayState mState;
public InvalidationHandler(LibreOfficeMainActivity mainActivity) {
mTextCursorLayer = mainActivity.getTextCursorLayer();
mTextSelection = mainActivity.getTextSelection();
- mTileProvider = null;
mState = OverlayState.NONE;
}
/**
- * Sets the tile provider, without this the
- * @param tileProvider
- */
- public void setTileProvider(TileProvider tileProvider) {
- mTileProvider = tileProvider;
- }
-
- /**
* Processes callback message
*
* @param messageID - ID of the message
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
index 7cc4b6e..3bed163 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
@@ -178,7 +178,6 @@ public class LOKitThread extends Thread {
mInvalidationHandler = new InvalidationHandler(LibreOfficeMainActivity.mAppContext);
mTileProvider = TileProviderFactory.create(mLayerClient, mInvalidationHandler, filename);
- mInvalidationHandler.setTileProvider(mTileProvider);
if (mTileProvider.isReady()) {
LOKitShell.showProgressSpinner();
More information about the Libreoffice-commits
mailing list