diff options
author | Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> | 2016-10-15 16:21:42 +0200 |
---|---|---|
committer | Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> | 2016-10-17 10:45:04 +0000 |
commit | 26c99e42db233e375a007c49e1e903359caa1ce3 (patch) | |
tree | 71a2ec04b5db83a95e2f3a2e266091d6df4ffac5 /include | |
parent | 3c4f17b571ba041cb03d5c7e27968ee11edfb97d (diff) |
tdf#103274: Add helper for a default XCommandEnvironment reference.
This helper should be used where the empty XCommandEnvironment
e.g. something like:
css::uno::Reference< css::ucb::XCommandEnvironment >()
is currently used.
See comment in the committed code (include/unotools/ucbhelper.hxx)
for details.
A case use is presented in this commit, please see:
sfx2/source/doc/docfile.cxx for details.
Change-Id: Ieb97c0ed61f31ef8df532c8be0e7ff1035327915
Reviewed-on: https://gerrit.libreoffice.org/29927
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
Diffstat (limited to 'include')
-rw-r--r-- | include/unotools/ucbhelper.hxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/unotools/ucbhelper.hxx b/include/unotools/ucbhelper.hxx index 1777a408584f..653d82805d6b 100644 --- a/include/unotools/ucbhelper.hxx +++ b/include/unotools/ucbhelper.hxx @@ -80,6 +80,36 @@ UNOTOOLS_DLLPUBLIC bool IsSubPath( UNOTOOLS_DLLPUBLIC bool EqualURLs( OUString const & url1, OUString const & url2); +/** +* Returns a default XCommandEnvironment to be used +* when creating a ucbhelper::Content. +* +* Due to the way the WebDAV UCP provider works, an interaction handler +* is always needed: +* 1) to activate the credential dialog or to provide the cached credentials +* whenever the server requests them; +* +* 2) in case of ssl connection (https) to activate the dialog to show the +* certificate if said certificate looks wrong or dubious. +* +* This helper provides the XCommandEnvironment with an interaction +* handler that intercepts: +* 1) css::ucb::AuthenticationRequest() +* 2) css::ucb::CertificateValidationRequest() +* 3) css::ucb::InteractiveIOException() +* 4) css::ucb::UnsupportedDataSinkException() +* +* Exception 1) and 2) will be passed to the UI handler, e.g. shown to +* the user for interaction. +* +* Exception 3) and 4) will be have a default 'Abort' result. +* See comphelper::StillReadWriteInteraction for details. +* comphelper::StillReadWriteInteraction was introduced in +* commit bbe51f039dffca2506ea542feb78571b6358b981. +*/ +UNOTOOLS_DLLPUBLIC + css::uno::Reference< css::ucb::XCommandEnvironment > getDefaultCommandEnvironment(); + } } #endif |