Access safe data members directly
Change-Id: I06df992ca9a77e8ac21dbd1faffa9fa906daab62
This commit is contained in:
@@ -24,7 +24,6 @@
|
|||||||
#include <macros/xinterface.hxx>
|
#include <macros/xinterface.hxx>
|
||||||
#include <macros/xtypeprovider.hxx>
|
#include <macros/xtypeprovider.hxx>
|
||||||
#include <macros/xserviceinfo.hxx>
|
#include <macros/xserviceinfo.hxx>
|
||||||
#include <threadhelp/threadhelpbase.hxx>
|
|
||||||
#include <general.h>
|
#include <general.h>
|
||||||
#include <stdtypes.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
|
@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.
|
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
|
@base OWeakObject
|
||||||
provides XWeak and ref count mechanism
|
provides XWeak and ref count mechanism
|
||||||
|
|
||||||
@devstatus ready to use
|
@devstatus ready to use
|
||||||
*/
|
*/
|
||||||
class MailToDispatcher : // baseclasses
|
class MailToDispatcher : public ::cppu::WeakImplHelper3<
|
||||||
// Order is necessary for right initialization!
|
|
||||||
private ThreadHelpBase ,
|
|
||||||
// interfaces
|
|
||||||
public ::cppu::WeakImplHelper3<
|
|
||||||
css::lang::XServiceInfo,
|
css::lang::XServiceInfo,
|
||||||
css::frame::XDispatchProvider,
|
css::frame::XDispatchProvider,
|
||||||
css::frame::XNotifyingDispatch> // => XDispatch
|
css::frame::XNotifyingDispatch> // => XDispatch
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <dispatch/mailtodispatcher.hxx>
|
#include <dispatch/mailtodispatcher.hxx>
|
||||||
#include <threadhelp/guard.hxx>
|
|
||||||
#include <general.h>
|
#include <general.h>
|
||||||
#include <services.h>
|
#include <services.h>
|
||||||
|
|
||||||
@@ -58,10 +57,7 @@ DEFINE_INIT_SERVICE(MailToDispatcher,
|
|||||||
reference to uno servicemanager for creation of new services
|
reference to uno servicemanager for creation of new services
|
||||||
*/
|
*/
|
||||||
MailToDispatcher::MailToDispatcher( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
|
MailToDispatcher::MailToDispatcher( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
|
||||||
// Init baseclasses first
|
: m_xContext ( rxContext )
|
||||||
: ThreadHelpBase( &Application::GetSolarMutex() )
|
|
||||||
// Init member
|
|
||||||
, m_xContext ( rxContext )
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +69,6 @@ MailToDispatcher::MailToDispatcher( const css::uno::Reference< css::uno::XCompon
|
|||||||
*/
|
*/
|
||||||
MailToDispatcher::~MailToDispatcher()
|
MailToDispatcher::~MailToDispatcher()
|
||||||
{
|
{
|
||||||
m_xContext = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -200,13 +195,7 @@ sal_Bool MailToDispatcher::implts_dispatch( const css::util::URL&
|
|||||||
{
|
{
|
||||||
sal_Bool bSuccess = sal_False;
|
sal_Bool bSuccess = sal_False;
|
||||||
|
|
||||||
css::uno::Reference< css::uno::XComponentContext > xContext;
|
css::uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute = css::system::SystemShellExecute::create( m_xContext );
|
||||||
/* SAFE */{
|
|
||||||
Guard aReadLock( m_aLock );
|
|
||||||
xContext = m_xContext;
|
|
||||||
/* SAFE */}
|
|
||||||
|
|
||||||
css::uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute = css::system::SystemShellExecute::create( xContext );
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user