From 3a94a46fc2cba33fd7d735bbcd62692f1e51183a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 20 Mar 2014 11:10:57 +0100 Subject: [PATCH] Access safe members directly Change-Id: I8d145fcf3dbcb2436392ee01740255a460c610a6 --- framework/inc/jobs/shelljob.hxx | 4 +--- framework/source/jobs/shelljob.cxx | 12 ++---------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/framework/inc/jobs/shelljob.hxx b/framework/inc/jobs/shelljob.hxx index 8d051ffe897b..1a7870f1e317 100644 --- a/framework/inc/jobs/shelljob.hxx +++ b/framework/inc/jobs/shelljob.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_FRAMEWORK_INC_JOBS_SHELLJOB_HXX #define INCLUDED_FRAMEWORK_INC_JOBS_SHELLJOB_HXX -#include #include #include #include @@ -49,8 +48,7 @@ namespace framework{ @author as96863 */ -class ShellJob : private ThreadHelpBase - ,public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo,::com::sun::star::task::XJob > +class ShellJob : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo,::com::sun::star::task::XJob > { // member diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx index 8a63290fc4cc..997ce0644dd5 100644 --- a/framework/source/jobs/shelljob.cxx +++ b/framework/source/jobs/shelljob.cxx @@ -23,7 +23,6 @@ #include #include -#include #include @@ -80,8 +79,7 @@ DEFINE_INIT_SERVICE(ShellJob, 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) { - // SYNCHRONIZED -> - Guard aReadLock(m_aLock); - css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; - aReadLock.unlock(); - // <- SYNCHRONIZED - 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 OUString sCompleteCommand = xSubst->substituteVariables(sCommand, bSubstRequired);