summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/fpsmartcontent.cxx9
-rw-r--r--fpicker/source/office/iodlg.cxx11
2 files changed, 9 insertions, 11 deletions
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx
index 5de4395ed362..98cbd32ae464 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -20,6 +20,7 @@
#include "fpsmartcontent.hxx"
#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/ucb/ContentInfo.hpp>
#include <com/sun/star/ucb/ContentInfoAttribute.hpp>
#include <com/sun/star/ucb/XContent.hpp>
@@ -79,9 +80,9 @@ namespace svt
//--------------------------------------------------------------------
void SmartContent::enableOwnInteractionHandler(::svt::OFilePickerInteractionHandler::EInterceptedInteractions eInterceptions)
{
- Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
+ Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
Reference< XInteractionHandler > xGlobalInteractionHandler = Reference< XInteractionHandler >(
- xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") ) ), UNO_QUERY );
+ InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
m_pOwnInteraction = new ::svt::OFilePickerInteractionHandler(xGlobalInteractionHandler);
m_pOwnInteraction->enableInterceptions(eInterceptions);
@@ -98,9 +99,9 @@ namespace svt
m_pOwnInteraction = NULL;
m_xOwnInteraction = Reference< XInteractionHandler >();
- Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
+ Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
Reference< XInteractionHandler > xGlobalInteractionHandler = Reference< XInteractionHandler >(
- xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") ) ), UNO_QUERY );
+ InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
}
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 46e2b708f506..264e673b883d 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -72,7 +72,7 @@
#include <osl/file.h>
#include <vcl/waitobj.hxx>
-#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include "com/sun/star/ucb/InteractiveAugmentedIOException.hpp"
#include "fpinteraction.hxx"
#include <osl/process.h>
@@ -2001,13 +2001,10 @@ void SvtFileDialog::displayIOException( const String& _rURL, IOErrorCode _eCode
pRequest->addContinuation( new ::comphelper::OInteractionAbort( ) );
Reference< XInteractionHandler > xHandler(
- ::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") )
- ),
- UNO_QUERY
+ InteractionHandler::createDefault( ::comphelper::getProcessComponentContext() ),
+ UNO_QUERY_THROW
);
- if ( xHandler.is() )
- xHandler->handle( xRequest );
+ xHandler->handle( xRequest );
}
catch( const Exception& )
{