summaryrefslogtreecommitdiffstats
path: root/desktop/source/app
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/app')
-rw-r--r--desktop/source/app/configinit.cxx15
-rw-r--r--desktop/source/app/dispatchwatcher.cxx9
2 files changed, 8 insertions, 16 deletions
diff --git a/desktop/source/app/configinit.cxx b/desktop/source/app/configinit.cxx
index 393a755ea96b..66b1c6e3d4d0 100644
--- a/desktop/source/app/configinit.cxx
+++ b/desktop/source/app/configinit.cxx
@@ -36,6 +36,7 @@
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include <stdio.h>
+#include <com/sun/star/task/InteractionHandler.hpp>
// ----------------------------------------------------------------------------
@@ -45,7 +46,6 @@ using rtl::OUString;
using uno::UNO_QUERY;
// ----------------------------------------------------------------------------
-static char const CONFIGURATION_ERROR_HANDLER[] = "com.sun.star.configuration.backend.InteractionHandler";
// must be aligned with configmgr/source/misc/configinteractionhandler
static char const CONFIG_ERROR_HANDLER[] = "configuration.interaction-handler";
@@ -164,17 +164,8 @@ void ConfigurationErrorHandler::deactivate()
ConfigurationErrorHandler::InteractionHandler ConfigurationErrorHandler::getDefaultInteractionHandler()
{
- uno::Reference< lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory();
-
- OSL_ENSURE( xServiceManager.is(),"No ServiceManager set for ConfigurationErrorHandler");
-
- InteractionHandler xHandler;
-
- if (xServiceManager.is())
- {
- xHandler.set( xServiceManager->createInstance(k_ERRORHANDLER), UNO_QUERY );
- }
-
+ uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ InteractionHandler xHandler( com::sun::star::task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
return xHandler;
}
//------------------------------------------------------------------------------
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 1ed73d59f48f..091d48465205 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -41,7 +41,7 @@
#include <comphelper/synchronousdispatch.hxx>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
@@ -73,6 +73,7 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::view;
+using namespace ::com::sun::star::task;
namespace desktop
{
@@ -226,9 +227,9 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
}
else
{
- Reference < com::sun::star::task::XInteractionHandler > xInteraction(
- ::comphelper::getProcessServiceFactory()->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler")) ),
- com::sun::star::uno::UNO_QUERY );
+ Reference < XInteractionHandler > xInteraction(
+ InteractionHandler::createDefault(::comphelper::getProcessComponentContext()),
+ UNO_QUERY_THROW );
aArgs[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aArgs[1].Value <<= xInteraction;