summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--filter/CppunitTest_filter_eps_test.mk1
-rw-r--r--sax/CppunitTest_sax_xmlimport.mk1
-rw-r--r--unotools/source/ucbhelper/ucbstreamhelper.cxx19
-rw-r--r--vcl/CppunitTest_vcl_filters_test.mk1
4 files changed, 20 insertions, 2 deletions
diff --git a/filter/CppunitTest_filter_eps_test.mk b/filter/CppunitTest_filter_eps_test.mk
index d49f10e05aeb..befc029d6cfe 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 14b6488ec192..80263316ba1d 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 51d4f65ef1e7..133fa28e3c4f 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 e1c30dfd5542..15efa5e1cfab 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))