summaryrefslogtreecommitdiff
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-19 15:28:08 +0200
commitc929c563e2029bbb969dc417a688cca8934e69b0 (patch)
tree8260d4793fe54f715af0cf6d10ff02ca0c8f4fdc
parent122905d30e8918e0ebe0ad3a84a50c7681ae228e (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>
-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 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 ???