summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-04-19 14:09:08 +0200
committerAndras Timar <andras.timar@collabora.com>2022-04-25 11:13:30 +0200
commit89c2dfcbb749b9b8d9d6e29e92b0d1086f2abf1d (patch)
treed3e8b8b58f073e5340457b6077f8655f9838252f /sfx2
parent608ddfdd8bc3640b36ee632691c16015fad3451d (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) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133141 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
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 fd66caabd0d4..f8940b3ae8b4 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -599,7 +599,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 ???