android/source/src/java/org/libreoffice/LOKitThread.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 22ca75e90b87c1b9c77e09b5d96a2b58424aff4b Author: Michael Weghorn <[email protected]> AuthorDate: Thu Nov 13 15:08:56 2025 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Nov 18 16:45:36 2025 +0100 tdf#169422 android: Adjust doc pos + zoom on window size change When the size of the app window for LibreOffice Viewer changes (e.g. because a user manually resized the window on a desktop device or when rotating a device), recalculate the document position and zoom factor to make proper use of the newly available space. On app window resize/rotation, GeckoLayerClient sends a LOEvent.SIZE_CHANGED event (see e.g. GeckoLayerClient.setViewportSize). In order to achieve the desired result, adjust the corresponding event handler to call LOKitThread.redraw with a `resetZoomAndPosition` param of true instead of false. Change-Id: I2a088975e6083ce72641c8e2ea9d111015fb50bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193967 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> (cherry picked from commit 95e6108c20f8035ec837ea852fc2285b9677d5f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194019 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java b/android/source/src/java/org/libreoffice/LOKitThread.java index fd40c3089102..05e748582ba6 100644 --- a/android/source/src/java/org/libreoffice/LOKitThread.java +++ b/android/source/src/java/org/libreoffice/LOKitThread.java @@ -280,7 +280,7 @@ class LOKitThread extends Thread { closeDocument(); break; case LOEvent.SIZE_CHANGED: - redraw(false); + redraw(true); break; case LOEvent.CHANGE_PART: changePart(event.mPartIndex);
