diff options
author | Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> | 2015-08-19 12:13:35 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-10-05 11:18:04 +0000 |
commit | 0326352470aee1a774bb5aa314c4f3625c1372b3 (patch) | |
tree | 66cd97e3ed1fcbf813a667097cf19aade7176242 /sfx2 | |
parent | b4576f3da4d90139fc5140962d13cb91dab98797 (diff) |
tdf#83531 Opening WebDAV URL WebDav fails if write is restricted
Happened because LOCK method was not allowed without credentials.
Change-Id: I7b204e67079791a08211410ced4b0b4f015d524a
Reviewed-on: https://gerrit.libreoffice.org/17856
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index ccdad939071e..553a3d042ae1 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -42,6 +42,7 @@ #include <com/sun/star/ucb/CommandFailedException.hpp> #include <com/sun/star/ucb/CommandAbortedException.hpp> #include <com/sun/star/ucb/InteractiveLockingLockedException.hpp> +#include <com/sun/star/ucb/InteractiveNetworkWriteException.hpp> #include <com/sun/star/ucb/Lock.hpp> #include <com/sun/star/ucb/XCommandEnvironment.hpp> #include <com/sun/star/ucb/XContentIdentifierFactory.hpp> @@ -1010,6 +1011,19 @@ void SfxMedium::LockOrigFileOnDemand( bool bLoading, bool bNoUI ) bUIStatus = ShowLockedDocumentDialog( aLockData, bLoading, false ); } } + catch( ucb::InteractiveNetworkWriteException& ) + { + // This catch it's not really needed, here just for the sake of documentation on the behaviour. + // This is the most likely reason: + // - the remote site is a WebDAV with special configuration: read/only for read operations + // and read/write for write operations, the user is not allowed to lock/write and + // she cancelled the credentials request. + // this is not actually an error, but the exception is sent directly from ucb, avoiding the automatic + // management that takes part in cancelCommandExecution() + // Unfortunately there is no InteractiveNetwork*Exception available to signal this more correctly + // since it mostly happens on read/only part of webdav, this can be the most correct + // exception available + } catch( uno::Exception& ) {} } |