sfx2/source/view/viewfrm.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c929c563e2029bbb969dc417a688cca8934e69b0
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Apr 19 14:09:08 2022 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue Apr 19 15:28:08 2022 +0200

    sfx2: do reload on SID_EDITDOC in SfxViewFrame::ExecReload_Impl()
    
    commit b505ca5b9c31b3d9c639406d03a25bea4e914242 "Switch to read-only
    mode: do not force reload document if possible" replaced "true" with
    "bNeedsReload" here - but this is a problem when switching from
    read-only to editable.
    
    1. Start LO and load a document from WebDAV editable
    2. Start other LO and load the same document from WebDAV read-only
    3. In first LO, edit document, store it and close it
    4. In second LO, click "Edit Document" button
    5. LO doesn't reload the document and shows stale content
    
    It's not clear what problem that commit was trying to solve, but let's
    assume that it intended to change only what happens when switching from
    editable to read-only.
    
    Change-Id: I69c779c5c0c5c2ccda677ea8cb353c8716916861
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133171
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 1a7eeafb2bee..bbf1a679dd4a 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -596,7 +596,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
                 }
             }
 
-            rReq.AppendItem( SfxBoolItem( SID_FORCERELOAD, bNeedsReload) );
+            rReq.AppendItem( SfxBoolItem(SID_FORCERELOAD,
+                    rReq.GetSlot() == SID_EDITDOC || bNeedsReload) );
             rReq.AppendItem( SfxBoolItem( SID_SILENT, true ));
 
             [[fallthrough]]; //TODO ???

Reply via email to