Access safe data members directly

Change-Id: I06df992ca9a77e8ac21dbd1faffa9fa906daab62
This commit is contained in:
Stephan Bergmann 2014-03-18 09:26:05 +01:00
parent 43ed93b256
commit 8ca1c57f04
2 changed files with 3 additions and 21 deletions

View File

@ -24,7 +24,6 @@
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
#include <threadhelp/threadhelpbase.hxx>
#include <general.h>
#include <stdtypes.h>
@ -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

View File

@ -18,7 +18,6 @@
*/
#include <dispatch/mailtodispatcher.hxx>
#include <threadhelp/guard.hxx>
#include <general.h>
#include <services.h>
@ -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
{