sfx2/source/doc/docfile.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 48fa1f49d97ce04c9d3749ae02b2874af6477e82 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri Oct 21 11:52:00 2022 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Fri Oct 21 12:01:11 2022 +0200 sfx2: avoid showing 2 dialogs in case WebDAV LOCK request fails ... with 403, also for the initial load of the document. There is an Infobar anyway that the user can click to try again to edit the document, and if that fails there will be a dialog that offers opening a copy. If opening a file:// document writable fails and it is opened read-only, there is also no extra error dialog, just the Infobar, so this is making WebDAV more consistent. Change-Id: Ice62d167199f384b246b9d60dab4eed456a62288 diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 6d10e2f6948d..8c0d101c4ea9 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1204,7 +1204,10 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand(bool bLoading, bool bN if( !bResult ) { uno::Reference< task::XInteractionHandler > xCHandler = GetInteractionHandler( true ); - if (bNoUI) + // Dialog with error is superfluous: + // on loading, will result in read-only with infobar. + // bNoUI case for Reload failing, will open dialog later. + if (bLoading || bNoUI) { xCHandler = new LockInteractionHandler(xCHandler); }