summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-04-19 14:09:08 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2022-04-22 15:49:25 +0200
commit9d68e53b368ffebf20821702ac15dd974ab2eac6 (patch)
tree04b0be5ef4cdb38c1e7b654e25f5c5db7f9ae840 /sfx2
parent5aac97f46dcea3704705eaf9b45a88be6b553e28 (diff)
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.stahl@allotropia.de> (cherry picked from commit c929c563e2029bbb969dc417a688cca8934e69b0)
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewfrm.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 23e318fa761c..c22385427c00 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -608,7 +608,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 ???