summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-10-15 16:21:42 +0200
committerGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-10-17 10:45:04 +0000
commit26c99e42db233e375a007c49e1e903359caa1ce3 (patch)
tree71a2ec04b5db83a95e2f3a2e266091d6df4ffac5 /sfx2
parent3c4f17b571ba041cb03d5c7e27968ee11edfb97d (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 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 2179f8248284..e41f7161838b 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -394,8 +394,11 @@ util::DateTime SfxMedium::GetInitFileDate( bool bIgnoreOldValue )
{
try
{
- uno::Reference< css::ucb::XCommandEnvironment > xDummyEnv;
- ::ucbhelper::Content aContent( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() );
+ // add a default css::ucb::XCommandEnvironment
+ // in order to have the WebDAV UCP provider manage http/https authentication correctly
+ ::ucbhelper::Content aContent( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ),
+ utl::UCBContentHelper::getDefaultCommandEnvironment(),
+ comphelper::getProcessComponentContext() );
aContent.getPropertyValue("DateModified") >>= pImpl->m_aDateTime;
pImpl->m_bGotDateTime = true;