[Libreoffice-commits] core.git: filter/CppunitTest_filter_eps_test.mk sax/CppunitTest_sax_xmlimport.mk unotools/source vcl/CppunitTest_vcl_filters_test.mk
Giuseppe Castagno
giuseppe.castagno at acca-esse.eu
Mon Aug 8 10:56:21 UTC 2016
filter/CppunitTest_filter_eps_test.mk | 1 +
sax/CppunitTest_sax_xmlimport.mk | 1 +
unotools/source/ucbhelper/ucbstreamhelper.cxx | 19 +++++++++++++++++--
vcl/CppunitTest_vcl_filters_test.mk | 1 +
4 files changed, 20 insertions(+), 2 deletions(-)
New commits:
commit f60eaab748add19683e66c7e4bc073c9ce7887f7
Author: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
Date: Sat Aug 6 17:30:31 2016 +0200
Related: tdf#99312, add specialized interaction handler
Needed to manage https certificates and authentication whenever
needed.
Change-Id: If20b85a9b349b203a8c46d453afa823629d114cb
Reviewed-on: https://gerrit.libreoffice.org/27927
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
diff --git a/filter/CppunitTest_filter_eps_test.mk b/filter/CppunitTest_filter_eps_test.mk
index d49f10e..befc029 100644
--- a/filter/CppunitTest_filter_eps_test.mk
+++ b/filter/CppunitTest_filter_eps_test.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_CppunitTest_use_components,filter_eps_test,\
i18npool/util/i18npool \
ucb/source/core/ucb1 \
ucb/source/ucp/file/ucpfile1 \
+ uui/util/uui \
))
$(eval $(call gb_CppunitTest_use_configuration,filter_eps_test))
diff --git a/sax/CppunitTest_sax_xmlimport.mk b/sax/CppunitTest_sax_xmlimport.mk
index 14b6488..8026331 100644
--- a/sax/CppunitTest_sax_xmlimport.mk
+++ b/sax/CppunitTest_sax_xmlimport.mk
@@ -48,6 +48,7 @@ $(eval $(call gb_CppunitTest_use_components,sax_xmlimport,\
sax/source/expatwrap/expwrap \
ucb/source/core/ucb1 \
ucb/source/ucp/file/ucpfile1 \
+ uui/util/uui \
))
$(eval $(call gb_CppunitTest_use_configuration,sax_xmlimport))
diff --git a/unotools/source/ucbhelper/ucbstreamhelper.cxx b/unotools/source/ucbhelper/ucbstreamhelper.cxx
index 51d4f65..133fa28 100644
--- a/unotools/source/ucbhelper/ucbstreamhelper.cxx
+++ b/unotools/source/ucbhelper/ucbstreamhelper.cxx
@@ -20,12 +20,14 @@
#include <rtl/ustring.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <comphelper/processfactory.hxx>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/ucb/InsertCommandArgument.hpp>
#include <com/sun/star/io/XActiveDataStreamer.hpp>
+#include <comphelper/simplefileaccessinteraction.hxx>
#include <ucbhelper/content.hxx>
#include <unotools/streamwrap.hxx>
#include <ucblockbytes.hxx>
@@ -140,7 +142,14 @@ static SvStream* lcl_CreateStream( const OUString& rFileName, StreamMode eOpenMo
SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode )
{
- return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), true /* bEnsureFileExists */ );
+ // related tdf#99312
+ // create a specialized interaction handler to manages Web certificates and Web credentials when needed
+ Reference< XInteractionHandler > xIH(
+ css::task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), nullptr ) );
+ Reference < XInteractionHandler > xIHScoped( static_cast< XInteractionHandler *> (
+ new comphelper::SimpleFileAccessInteraction( xIH ) ) );
+
+ return lcl_CreateStream( rFileName, eOpenMode, xIHScoped, true /* bEnsureFileExists */ );
}
SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode,
@@ -152,7 +161,13 @@ SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode e
SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode,
bool bFileExists )
{
- return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), !bFileExists );
+ // related tdf#99312
+ // create a specialized interaction handler to manages Web certificates and Web credentials when needed
+ Reference< XInteractionHandler > xIH(
+ css::task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), nullptr ) );
+ Reference < XInteractionHandler > xIHScoped( static_cast< XInteractionHandler *> (
+ new comphelper::SimpleFileAccessInteraction( xIH ) ) );
+ return lcl_CreateStream( rFileName, eOpenMode, xIHScoped,!bFileExists );
}
SvStream* UcbStreamHelper::CreateStream( const Reference < XInputStream >& xStream )
diff --git a/vcl/CppunitTest_vcl_filters_test.mk b/vcl/CppunitTest_vcl_filters_test.mk
index e1c30df..15efa5e 100644
--- a/vcl/CppunitTest_vcl_filters_test.mk
+++ b/vcl/CppunitTest_vcl_filters_test.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_CppunitTest_use_components,vcl_filters_test,\
i18npool/util/i18npool \
ucb/source/core/ucb1 \
ucb/source/ucp/file/ucpfile1 \
+ uui/util/uui \
))
$(eval $(call gb_CppunitTest_use_configuration,vcl_filters_test))
More information about the Libreoffice-commits
mailing list