From 8ca1c57f0449c951515c3c3b448d0acda56b26fb Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 18 Mar 2014 09:26:05 +0100 Subject: [PATCH] Access safe data members directly Change-Id: I06df992ca9a77e8ac21dbd1faffa9fa906daab62 --- framework/inc/dispatch/mailtodispatcher.hxx | 9 +-------- framework/source/dispatch/mailtodispatcher.cxx | 15 ++------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/framework/inc/dispatch/mailtodispatcher.hxx b/framework/inc/dispatch/mailtodispatcher.hxx index 1053384dfb4e..5e283cedee02 100644 --- a/framework/inc/dispatch/mailtodispatcher.hxx +++ b/framework/inc/dispatch/mailtodispatcher.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -46,18 +45,12 @@ namespace framework{ @descr It's a special dispatch object which is used registered for "mailto:*" URLs and will be automaticly used from the framework dispatch mechanism if such URL occurred. - @base ThreadHelpBase - exports a lock member to guarantee right initialize value of it @base OWeakObject provides XWeak and ref count mechanism @devstatus ready to use */ -class MailToDispatcher : // baseclasses - // Order is necessary for right initialization! - private ThreadHelpBase , - // interfaces - public ::cppu::WeakImplHelper3< +class MailToDispatcher : public ::cppu::WeakImplHelper3< css::lang::XServiceInfo, css::frame::XDispatchProvider, css::frame::XNotifyingDispatch> // => XDispatch diff --git a/framework/source/dispatch/mailtodispatcher.cxx b/framework/source/dispatch/mailtodispatcher.cxx index 0be69d9e06c0..1d008a658173 100644 --- a/framework/source/dispatch/mailtodispatcher.cxx +++ b/framework/source/dispatch/mailtodispatcher.cxx @@ -18,7 +18,6 @@ */ #include -#include #include #include @@ -58,10 +57,7 @@ DEFINE_INIT_SERVICE(MailToDispatcher, reference to uno servicemanager for creation of new services */ MailToDispatcher::MailToDispatcher( const css::uno::Reference< css::uno::XComponentContext >& rxContext ) - // Init baseclasses first - : ThreadHelpBase( &Application::GetSolarMutex() ) - // Init member - , m_xContext ( rxContext ) + : m_xContext ( rxContext ) { } @@ -73,7 +69,6 @@ MailToDispatcher::MailToDispatcher( const css::uno::Reference< css::uno::XCompon */ MailToDispatcher::~MailToDispatcher() { - m_xContext = NULL; } @@ -200,13 +195,7 @@ sal_Bool MailToDispatcher::implts_dispatch( const css::util::URL& { sal_Bool bSuccess = sal_False; - css::uno::Reference< css::uno::XComponentContext > xContext; - /* SAFE */{ - Guard aReadLock( m_aLock ); - xContext = m_xContext; - /* SAFE */} - - css::uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute = css::system::SystemShellExecute::create( xContext ); + css::uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute = css::system::SystemShellExecute::create( m_xContext ); try {