summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-07-27 21:50:39 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-07-27 20:18:25 +0000
commit3b26a2a403ca5e99b0dd07d042d47501c091af16 (patch)
treee86ea6b7e7f38c23c848813aff772c5be0291823 /sfx2
parent84db6c1d9c57c3dc115dc22413442cf1aa5e69df (diff)
tdf#95144: Add a default css::ucb::XCommandEnvironment
Makes use of a dedicated interaction wrapper to server ssl certificates correctly. See comphelper::SimpleFileAccessInteraction for details. Change-Id: I5728225065ec03f9b793940de316ccd97ee7114d Reviewed-on: https://gerrit.libreoffice.org/27596 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 7e8283b08552..7af4a7795844 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -72,6 +72,7 @@
#include <comphelper/fileurl.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/interaction.hxx>
+#include <comphelper/simplefileaccessinteraction.hxx>
#include <framework/interaction.hxx>
#include <unotools/streamhelper.hxx>
#include <unotools/localedatawrapper.hxx>
@@ -415,7 +416,16 @@ Reference < XContent > SfxMedium::GetContent() const
if ( !pImpl->aContent.get().is() )
{
Reference < css::ucb::XContent > xContent;
- Reference < css::ucb::XCommandEnvironment > xEnv;
+
+ // tdf#95144 add a default css::ucb::XCommandEnvironment
+ // in order to have http and https protocol manage certificates correctly
+ css:: uno::Reference< task::XInteractionHandler > xIH(
+ css::task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), nullptr ) );
+
+ css::uno::Reference< css::ucb::XProgressHandler > xProgress;
+ ::ucbhelper::CommandEnvironment* pCommandEnv = new ::ucbhelper::CommandEnvironment(new comphelper::SimpleFileAccessInteraction( xIH ), xProgress);
+
+ Reference < css::ucb::XCommandEnvironment > xEnv(static_cast< css::ucb::XCommandEnvironment* >(pCommandEnv), css::uno::UNO_QUERY);
const SfxUnoAnyItem* pItem = SfxItemSet::GetItem<SfxUnoAnyItem>(pImpl->m_pSet, SID_CONTENT, false);
if ( pItem )