diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-12-04 16:09:03 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-12-04 16:09:03 +0100 |
commit | f4698d6cc8ad76fd4ef5f41ffb7bec0d8eec5be1 (patch) | |
tree | c7afd130c2b3f8bb420033190c3ccbddb63ee08f /desktop | |
parent | b1c38d864f15a2cd4a715431b1d4aa2a31106950 (diff) | |
parent | 3d61d073f6baac393264e3df0408ae60fb6ea782 (diff) |
CWS-TOOLING: integrate CWS dv16_DEV300
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 0e1955359bbc..58e2cbd9bd0a 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -284,8 +284,8 @@ private: css::uno::Reference< css::uno::XComponentContext > m_context; UpdateDialog & m_dialog; std::vector< dp_gui::TUpdateListEntry > m_vExtensionList; - css::uno::Reference< css::deployment::XUpdateInformationProvider > - m_updateInformation; + css::uno::Reference< css::deployment::XUpdateInformationProvider > m_updateInformation; + css::uno::Reference< css::task::XInteractionHandler > m_xInteractionHdl; // guarded by Application::GetSolarMutex(): css::uno::Reference< css::task::XAbortChannel > m_abort; @@ -302,7 +302,21 @@ UpdateDialog::Thread::Thread( m_updateInformation( css::deployment::UpdateInformationProvider::create(context)), m_stop(false) -{} +{ + if( m_context.is() ) + { + css::uno::Reference< css::lang::XMultiComponentFactory > xServiceManager( m_context->getServiceManager() ); + + if( xServiceManager.is() ) + { + m_xInteractionHdl = css::uno::Reference< css::task::XInteractionHandler > ( + xServiceManager->createInstanceWithContext( OUSTR( "com.sun.star.task.InteractionHandler" ), m_context), + css::uno::UNO_QUERY ); + if ( m_xInteractionHdl.is() ) + m_updateInformation->setInteractionHandler( m_xInteractionHdl ); + } + } +} void UpdateDialog::Thread::stop() { css::uno::Reference< css::task::XAbortChannel > abort; @@ -327,7 +341,11 @@ UpdateDialog::Thread::Entry::Entry( version(theVersion) {} -UpdateDialog::Thread::~Thread() {} +UpdateDialog::Thread::~Thread() +{ + if ( m_xInteractionHdl.is() ) + m_updateInformation->setInteractionHandler( css::uno::Reference< css::task::XInteractionHandler > () ); +} void UpdateDialog::Thread::execute() { @@ -1260,7 +1278,7 @@ IMPL_LINK( UpdateDialog, hyperlink_clicked, svt::FixedHyperlink*, pHyperlink ) { css::uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute( m_context->getServiceManager()->createInstanceWithContext( - ::rtl::OUString::createFromAscii( "com.sun.star.system.SystemShellExecute" ), + OUSTR( "com.sun.star.system.SystemShellExecute" ), m_context), css::uno::UNO_QUERY_THROW); //throws css::lang::IllegalArgumentException, css::system::SystemShellExecuteException xSystemShellExecute->execute( |