summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-10-05 20:11:51 +0200
committerGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-10-06 07:19:29 +0000
commita9f820679a70ec3fc4fe4f43c8fed175b362d1fd (patch)
tree1203469273c287a7d61ff42f539497ea82f62ad7 /sw/source/filter
parent3c4e60f142df7b3235d0058dbbb15838a19f8ecd (diff)
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 <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx16
1 files 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 <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx>
+#include <comphelper/simplefileaccessinteraction.hxx>
#include <sot/storinfo.hxx>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <svl/urihelper.hxx>
@@ -37,6 +39,7 @@
#include <sfx2/linkmgr.hxx>
#include <ucbhelper/content.hxx>
+#include <ucbhelper/commandenvironment.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <hintids.hxx>
@@ -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;