summaryrefslogtreecommitdiffstats
path: root/svtools/source/contnr/templwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/contnr/templwin.cxx')
-rw-r--r--svtools/source/contnr/templwin.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 9a77b770a851..9579759419b3 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -71,6 +71,7 @@
#include <com/sun/star/script/XTypeConverter.hpp>
#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <unotools/localedatawrapper.hxx>
#include <com/sun/star/container/XNameContainer.hpp>
#include <vcl/waitobj.hxx>
@@ -669,8 +670,9 @@ void SvtFrameWindow_Impl::ShowDocInfo( const String& rURL )
{
try
{
- uno::Reference < task::XInteractionHandler > xInteractionHandler( ::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" )) ), uno::UNO_QUERY );
+ uno::Reference < task::XInteractionHandler > xInteractionHandler(
+ task::InteractionHandler::createDefault(::comphelper::getProcessComponentContext()),
+ uno::UNO_QUERY_THROW );
uno::Sequence < beans::PropertyValue> aProps(1);
aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aProps[0].Value <<= xInteractionHandler;
@@ -752,8 +754,8 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B
aArgs[1].Value.setValue( &b, ::getBooleanCppuType() );
aArgs[2].Name = ASCII_STR("AsTemplate"); // prevents getting an empty URL with getURL()!
- uno::Reference < task::XInteractionHandler > xInteractionHandler( ::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" )) ), uno::UNO_QUERY );
+ uno::Reference < task::XInteractionHandler > xInteractionHandler(
+ task::InteractionHandler::createDefault(::comphelper::getProcessComponentContext()), uno::UNO_QUERY_THROW );
aArgs[3].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aArgs[3].Value <<= xInteractionHandler;