android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 10b76c9578c6a90a5d0e48a0cb9f18c2d9d68e84
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Nov 23 11:35:03 2023 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Nov 24 16:30:14 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>
    (cherry picked from commit 5b1538d92e947f3afd1b4815c9c4f4d7565278dd)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159765
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

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;

Reply via email to