summaryrefslogtreecommitdiff
path: root/desktop/source/deployment
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-02 15:03:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-04 14:42:52 +0200
commitc25cb8a641723ab098980bb842caf75c0dc9b059 (patch)
treee264e2727309789e06147a7275b91abd05f9fcff /desktop/source/deployment
parent0f3f9cb63056715845d9c3565bde69470c73efb2 (diff)
fdo#46808, Adapt task::InteractionHandler UNO service to new style
Since we don't need to expose XInitialisation, we can make the new-style service implement XInteractionHandler2. Change-Id: Ib27beed1c12df17592c6472d6f58c233d2c41558
Diffstat (limited to 'desktop/source/deployment')
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx15
2 files changed, 7 insertions, 14 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 323778d4c642..b52478146734 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -50,6 +50,7 @@
#include "com/sun/star/deployment/UpdateInformationProvider.hpp"
#include "com/sun/star/deployment/XPackage.hpp"
+#include "com/sun/star/task/InteractionHandler.hpp"
#include "com/sun/star/task/XAbortChannel.hpp"
#include "com/sun/star/task/XInteractionAbort.hpp"
#include "com/sun/star/task/XInteractionApprove.hpp"
@@ -536,10 +537,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
handlerArgs[ 0 ] <<= beans::PropertyValue(
OUSTR("Context"), -1, uno::Any( m_sTitle ),
beans::PropertyState_DIRECT_VALUE );
- m_xHandler.set( m_xContext->getServiceManager()
- ->createInstanceWithArgumentsAndContext(
- OUSTR("com.sun.star.uui.InteractionHandler"),
- handlerArgs, m_xContext ), uno::UNO_QUERY_THROW );
+ m_xHandler.set( task::InteractionHandler::createWithParentAndContext(m_xContext, NULL, m_sTitle), uno::UNO_QUERY_THROW );
}
m_xHandler->handle( xRequest );
}
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 88deb2042ad0..107e7b6017cd 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -66,6 +66,7 @@
#include "com/sun/star/lang/XSingleServiceFactory.hpp"
#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
#include "com/sun/star/system/SystemShellExecute.hpp"
+#include "com/sun/star/task/InteractionHandler.hpp"
#include "com/sun/star/task/XAbortChannel.hpp"
#include "com/sun/star/task/XJob.hpp"
#include "com/sun/star/ucb/CommandAbortedException.hpp"
@@ -272,16 +273,10 @@ UpdateDialog::Thread::Thread(
{
if( m_context.is() )
{
- uno::Reference< lang::XMultiComponentFactory > xServiceManager( m_context->getServiceManager() );
-
- if( xServiceManager.is() )
- {
- m_xInteractionHdl = uno::Reference< task::XInteractionHandler > (
- xServiceManager->createInstanceWithContext( OUSTR( "com.sun.star.task.InteractionHandler" ), m_context),
- uno::UNO_QUERY );
- if ( m_xInteractionHdl.is() )
- m_updateInformation->setInteractionHandler( m_xInteractionHdl );
- }
+ m_xInteractionHdl = uno::Reference< task::XInteractionHandler > (
+ task::InteractionHandler::createDefault(m_context),
+ uno::UNO_QUERY_THROW );
+ m_updateInformation->setInteractionHandler( m_xInteractionHdl );
}
}