Kaydet (Commit) 3b26a2a4 authored tarafından Giuseppe Castagno's avatar Giuseppe Castagno Kaydeden (comit) Caolán McNamara

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/27596Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 84db6c1d
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment