[Libreoffice-commits] core.git: android/source
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 31 18:10:29 UTC 2021
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 441342654e5b4c61317b9a596396a1d817dd8547
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Wed Mar 31 15:04:36 2021 +0200
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Wed Mar 31 20:09:43 2021 +0200
android: Don't mark doc changed on keypress in readonly mode
Since input etc. is otherwise ignored in readonly mode,
also don't mark the document as changed on keypress.
This e.g. avoids an unnecessary dialog whether or not to
save the document after opening a document with experimental
editing mode disabled, then pressing a key (on hardware
keyboard, soft keyboard isn't shown in readonly mode)
and then pressing the "Back" button to close the document
again.
Change-Id: I095c79549719d3760666605e1c642c58e6b1bb9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113417
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 960e3374a97a..cfdc81000f51 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -168,8 +168,8 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
layerView.setOnKeyListener(new View.OnKeyListener() {
@Override
public boolean onKey(View view, int i, KeyEvent keyEvent) {
- if(keyEvent.getKeyCode() != KeyEvent.KEYCODE_BACK){
- isDocumentChanged=true;
+ if(!isReadOnlyMode() && keyEvent.getKeyCode() != KeyEvent.KEYCODE_BACK){
+ setDocumentChanged(true);
}
return false;
}
More information about the Libreoffice-commits
mailing list