summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-10-21 11:52:00 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2022-10-21 12:01:11 +0200
commit48fa1f49d97ce04c9d3749ae02b2874af6477e82 (patch)
tree7e309ae27bc52b1cd160ff782b54dd480c6769d0
parent0ee8e29fa6cb898780c465033e1d855d8e8e9234 (diff)
sfx2: avoid showing 2 dialogs in case WebDAV LOCK request failscib-6.4-12
... 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
-rw-r--r--sfx2/source/doc/docfile.cxx5
1 files changed, 4 insertions, 1 deletions
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);
}