[Libreoffice-commits] core.git: sw/source
Giuseppe Castagno
giuseppe.castagno at acca-esse.eu
Thu Oct 6 07:21:45 UTC 2016
sw/source/filter/ww8/ww8par5.cxx | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
New commits:
commit a9f820679a70ec3fc4fe4f43c8fed175b362d1fd
Author: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
Date: Wed Oct 5 20:11:51 2016 +0200
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 at libreoffice.org>
Reviewed-by: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 0466c6e..9416764 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;
More information about the Libreoffice-commits
mailing list