Access safe members directly

Change-Id: I8d145fcf3dbcb2436392ee01740255a460c610a6
This commit is contained in:
Stephan Bergmann
2014-03-20 11:10:57 +01:00
parent 5d4f525da7
commit 3a94a46fc2
2 changed files with 3 additions and 13 deletions

View File

@@ -20,7 +20,6 @@
#ifndef INCLUDED_FRAMEWORK_INC_JOBS_SHELLJOB_HXX #ifndef INCLUDED_FRAMEWORK_INC_JOBS_SHELLJOB_HXX
#define INCLUDED_FRAMEWORK_INC_JOBS_SHELLJOB_HXX #define INCLUDED_FRAMEWORK_INC_JOBS_SHELLJOB_HXX
#include <threadhelp/threadhelpbase.hxx>
#include <macros/xinterface.hxx> #include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx> #include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx> #include <macros/xserviceinfo.hxx>
@@ -49,8 +48,7 @@ namespace framework{
@author as96863 @author as96863
*/ */
class ShellJob : private ThreadHelpBase class ShellJob : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo,::com::sun::star::task::XJob >
,public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo,::com::sun::star::task::XJob >
{ {
// member // member

View File

@@ -23,7 +23,6 @@
#include <jobs/shelljob.hxx> #include <jobs/shelljob.hxx>
#include <jobs/jobconst.hxx> #include <jobs/jobconst.hxx>
#include <threadhelp/guard.hxx>
#include <services.h> #include <services.h>
@@ -80,8 +79,7 @@ DEFINE_INIT_SERVICE(ShellJob,
ShellJob::ShellJob(const css::uno::Reference< css::uno::XComponentContext >& xContext) ShellJob::ShellJob(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: ThreadHelpBase( ) : m_xContext (xContext)
, m_xContext (xContext)
{ {
} }
@@ -141,15 +139,9 @@ css::uno::Any ShellJob::impl_generateAnswer4Deactivation()
OUString ShellJob::impl_substituteCommandVariables(const OUString& sCommand) OUString ShellJob::impl_substituteCommandVariables(const OUString& sCommand)
{ {
// SYNCHRONIZED ->
Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SYNCHRONIZED
try try
{ {
css::uno::Reference< css::util::XStringSubstitution > xSubst( css::util::PathSubstitution::create(xContext) ); css::uno::Reference< css::util::XStringSubstitution > xSubst( css::util::PathSubstitution::create(m_xContext) );
const ::sal_Bool bSubstRequired = sal_True; const ::sal_Bool bSubstRequired = sal_True;
const OUString sCompleteCommand = xSubst->substituteVariables(sCommand, bSubstRequired); const OUString sCompleteCommand = xSubst->substituteVariables(sCommand, bSubstRequired);