From 3b26a2a403ca5e99b0dd07d042d47501c091af16 Mon Sep 17 00:00:00 2001 From: Giuseppe Castagno Date: Wed, 27 Jul 2016 21:50:39 +0200 Subject: tdf#95144: Add a default css::ucb::XCommandEnvironment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Caolán McNamara --- sfx2/source/doc/docfile.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sfx2') 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 #include #include +#include #include #include #include @@ -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(pImpl->m_pSet, SID_CONTENT, false); if ( pItem ) -- cgit v1.2.3