From a9f820679a70ec3fc4fe4f43c8fed175b362d1fd Mon Sep 17 00:00:00 2001 From: Giuseppe Castagno Date: Wed, 5 Oct 2016 20:11:51 +0200 Subject: Related: tdf#102499 (4), default css::ucb::XCommandEnvironment. Make use of a dedicated interaction wrapper to serve ssl certificates correctly. See comphelper::SimpleFileAccessInteraction for details. Change-Id: Id78cd3f21223a797791598459af32eeec3539f2a Reviewed-on: https://gerrit.libreoffice.org/29541 Tested-by: Jenkins Reviewed-by: Giuseppe Castagno --- sw/source/filter/ww8/ww8par5.cxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 0466c6e707b2..94167640764a 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -24,11 +24,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include @@ -37,6 +39,7 @@ #include #include +#include #include #include @@ -2313,9 +2316,18 @@ bool CanUseRemoteLink(const OUString &rGrfName) bool bUseRemote = false; try { + // Related: tdf#102499, add a default css::ucb::XCommandEnvironment + // in order to have https protocol manage certificates correctly + uno::Reference< task::XInteractionHandler > xIH( + task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), nullptr)); + + uno::Reference< ucb::XProgressHandler > xProgress; + ::ucbhelper::CommandEnvironment* pCommandEnv = + new ::ucbhelper::CommandEnvironment(new comphelper::SimpleFileAccessInteraction( xIH ), xProgress); + ::ucbhelper::Content aCnt(rGrfName, - uno::Reference< ucb::XCommandEnvironment >(), - comphelper::getProcessComponentContext() ); + static_cast< ucb::XCommandEnvironment* >(pCommandEnv), + comphelper::getProcessComponentContext()); OUString aTitle; aCnt.getPropertyValue("Title") >>= aTitle; -- cgit v1.2.3