android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 934a4937e32b4ccf4690b642ccf4787331f37b68 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Nov 23 11:35:03 2023 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Nov 23 13:20:56 2023 +0100 tdf#158331 android: Fix "Save As" for non-experimental mode While "Save" (i.e. saving back to the original location) doesn't make sense when editing is disabled (because the doc cannot be changed) and the menu entry is therefore not available when the experimental editing mode is disabled, "Save As" does make sense, e.g. in order to save a copy of a file opened from another app. The menu entry was there, but not working as expected, a 0-byte file was created. This is because `LibreOfficeMainActivity#saveFileToOriginalSource` would return early if experimental mode is disabled. No longer do that, but save the file as requested. Change-Id: I5785b6060c4ba9cdf3e9c3591b9f941ab987bf4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159857 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index 54418f5cbc8f..b21ad02383d7 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -416,7 +416,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin } public void saveFileToOriginalSource() { - if (isReadOnlyMode() || mTempFile == null || mDocumentUri == null || !mDocumentUri.getScheme().equals(ContentResolver.SCHEME_CONTENT)) + if (mTempFile == null || mDocumentUri == null || !mDocumentUri.getScheme().equals(ContentResolver.SCHEME_CONTENT)) return; boolean copyOK = false;