diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-01-09 19:39:37 +0900 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-12 11:06:43 +0100 |
commit | b6a12074bcd498aa2a879dbd4e4eaa23103dad5c (patch) | |
tree | c18e9ddbc5de06739fbb47dfa81da845a2761f94 /android/experimental | |
parent | b214b0bd5271b3ab46a7317899be4b23064a6b66 (diff) |
android: Fix what invalidate rect numbers should mean
Assumption was that the invalidate rectangle numbers from LOK
mean (left, top, right, bottom) but they mean (width, height, x, y)
so we need to adapt to that for now.
Change-Id: Icc9c2c8aef63a8e292ff299969f2cbaf45ad0eab
Diffstat (limited to 'android/experimental')
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java index 14a6acb4a5cb..ebc692777df9 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java @@ -287,15 +287,15 @@ public class LOKitTileProvider implements TileProvider, Document.MessageCallback String[] coordinates = payload.split(","); if (coordinates.length == 4) { - int left = Integer.decode(coordinates[0].trim()); - int top = Integer.decode(coordinates[1].trim()); - int right = Integer.decode(coordinates[2].trim()); - int bottom = Integer.decode(coordinates[3].trim()); + int width = Integer.decode(coordinates[0].trim()); + int height = Integer.decode(coordinates[1].trim()); + int x = Integer.decode(coordinates[2].trim()); + int y = Integer.decode(coordinates[3].trim()); RectF rect = new RectF( - twipToPixel(left, mDPI), - twipToPixel(top, mDPI), - twipToPixel(right, mDPI), - twipToPixel(bottom, mDPI) + twipToPixel(x, mDPI), + twipToPixel(y, mDPI), + twipToPixel(x + width, mDPI), + twipToPixel(y + height, mDPI) ); Log.i(LOGTAG, "Invalidate R: " + rect +" - " + getPageWidth() + " " + getPageHeight()); tileInvalidationCallback.invalidate(rect); |