[Libreoffice-commits] core.git: sfx2/source
Giuseppe Castagno
giuseppe.castagno at acca-esse.eu
Wed Jul 27 20:18:54 UTC 2016
sfx2/source/doc/docfile.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 3b26a2a403ca5e99b0dd07d042d47501c091af16
Author: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
Date: Wed Jul 27 21:50:39 2016 +0200
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 7e8283b..7af4a77 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 )
More information about the Libreoffice-commits
mailing list