diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-10-04 14:36:34 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-04 14:42:52 +0200 |
commit | dd11a1e57a2565560803dc3fef5fccc9e7157105 (patch) | |
tree | 4adf17c00e21a17b0137a286ce1547b0e56bea2f /desktop | |
parent | c25cb8a641723ab098980bb842caf75c0dc9b059 (diff) |
Fixes/improvements on previous commit
* UUIInteractionHandler still needs to implement XInitialization.
* Moved ambiguating InteractionHandler typedef out of the way.
* Removed InteractionHandler.createDefault, as it was originally stated that "it
is strongly recommended that [the "Parent"] property is supplied."
* Added back documentation about Parent and Context.
* Simplified some call-sites to directly use XInteractionHandler2.
Change-Id: I1029b8f3cf079171c75920cafaaa44b5bbada883
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/configinit.cxx | 2 | ||||
-rw-r--r-- | desktop/source/app/dispatchwatcher.cxx | 5 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 9 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 6 |
4 files changed, 8 insertions, 14 deletions
diff --git a/desktop/source/app/configinit.cxx b/desktop/source/app/configinit.cxx index 66b1c6e3d4d0..9394a9b59be5 100644 --- a/desktop/source/app/configinit.cxx +++ b/desktop/source/app/configinit.cxx @@ -165,7 +165,7 @@ void ConfigurationErrorHandler::deactivate() ConfigurationErrorHandler::InteractionHandler ConfigurationErrorHandler::getDefaultInteractionHandler() { uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); - InteractionHandler xHandler( com::sun::star::task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW ); + InteractionHandler xHandler( com::sun::star::task::InteractionHandler::createWithParent(xContext, 0), UNO_QUERY ); return xHandler; } //------------------------------------------------------------------------------ diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index 091d48465205..261fa64572de 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -227,9 +227,8 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch } else { - Reference < XInteractionHandler > xInteraction( - InteractionHandler::createDefault(::comphelper::getProcessComponentContext()), - UNO_QUERY_THROW ); + Reference < XInteractionHandler2 > xInteraction( + InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), 0) ); aArgs[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" )); aArgs[1].Value <<= xInteraction; diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index b52478146734..943d37e6b33b 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -36,7 +36,6 @@ #include <cstddef> -#include "com/sun/star/beans/PropertyValue.hpp" #include "com/sun/star/beans/NamedValue.hpp" #include "com/sun/star/deployment/DependencyException.hpp" @@ -134,7 +133,7 @@ class ProgressCmdEnv task::XInteractionHandler, ucb::XProgressHandler > { - uno::Reference< task::XInteractionHandler> m_xHandler; + uno::Reference< task::XInteractionHandler2> m_xHandler; uno::Reference< uno::XComponentContext > m_xContext; uno::Reference< task::XAbortChannel> m_xAbortChannel; @@ -533,11 +532,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & // forward to UUI handler: if (! m_xHandler.is()) { // late init: - uno::Sequence< uno::Any > handlerArgs( 1 ); - handlerArgs[ 0 ] <<= beans::PropertyValue( - OUSTR("Context"), -1, uno::Any( m_sTitle ), - beans::PropertyState_DIRECT_VALUE ); - m_xHandler.set( task::InteractionHandler::createWithParentAndContext(m_xContext, NULL, m_sTitle), uno::UNO_QUERY_THROW ); + m_xHandler = task::InteractionHandler::createWithParentAndContext(m_xContext, NULL, m_sTitle); } 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 107e7b6017cd..e22463347c1d 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -273,9 +273,9 @@ UpdateDialog::Thread::Thread( { if( m_context.is() ) { - m_xInteractionHdl = uno::Reference< task::XInteractionHandler > ( - task::InteractionHandler::createDefault(m_context), - uno::UNO_QUERY_THROW ); + m_xInteractionHdl.set( + task::InteractionHandler::createWithParent(m_context, 0), + uno::UNO_QUERY ); m_updateInformation->setInteractionHandler( m_xInteractionHdl ); } } |