Kaydet (Commit) 6721736e authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

android: Remove unneeded LOEvents

Change-Id: I057db0c3e254a9e9c90dace5551d6de51aff21c1
üst 7c42247d
package org.libreoffice;
import android.graphics.Rect;
import org.mozilla.gecko.gfx.ComposedTileLayer;
import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
import org.mozilla.gecko.gfx.IntSize;
public class LOEvent {
public static final int SIZE_CHANGED = 1;
public static final int TILE_SIZE = 2;
public static final int VIEWPORT = 3;
public static final int DRAW = 4;
public static final int CHANGE_PART = 5;
public static final int LOAD = 6;
public static final int CLOSE = 7;
public static final int REDRAW = 8;
public static final int TILE_REQUEST = 9;
public static final int CHANGE_PART = 3;
public static final int LOAD = 4;
public static final int CLOSE = 5;
public static final int REDRAW = 6;
public static final int TILE_REQUEST = 7;
public final int mType;
public ImmutableViewportMetrics mViewportMetrics;
public String mTypeString;
public int mPartIndex;
public String mFilename;
......@@ -54,17 +48,6 @@ public class LOEvent {
mTypeString = "Tile size";
}
public LOEvent(int type, ImmutableViewportMetrics viewportMetrics) {
mType = type;
mTypeString = "Viewport";
mViewportMetrics = viewportMetrics;
}
public LOEvent(int type, Rect rect) {
mType = type;
mTypeString = "Draw";
}
public LOEvent(int type, int partIndex) {
mType = type;
mPartIndex = partIndex;
......
package org.libreoffice;
import android.graphics.Rect;
import org.mozilla.gecko.gfx.ComposedTileLayer;
import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
import org.mozilla.gecko.gfx.IntSize;
public class LOEventFactory {
public static LOEvent draw(Rect rect) {
return new LOEvent(LOEvent.DRAW, rect);
}
public static LOEvent sizeChanged(int widthPixels, int heightPixels) {
return new LOEvent(LOEvent.SIZE_CHANGED, widthPixels, heightPixels);
}
......@@ -20,10 +13,6 @@ public class LOEventFactory {
return new LOEvent(LOEvent.TILE_SIZE, tileSize);
}
public static LOEvent viewport(ImmutableViewportMetrics viewportMetrics) {
return new LOEvent(LOEvent.VIEWPORT, viewportMetrics);
}
public static LOEvent changePart(int part) {
return new LOEvent(LOEvent.CHANGE_PART, part);
}
......
......@@ -111,13 +111,6 @@ public class LOKitThread extends Thread {
case LOEvent.CLOSE:
closeDocument();
break;
case LOEvent.VIEWPORT:
mViewportMetrics = event.mViewportMetrics;
draw();
break;
case LOEvent.DRAW:
draw();
break;
case LOEvent.SIZE_CHANGED:
redraw();
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment