diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-18 12:24:49 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-18 13:29:12 +0100 |
commit | 1ae379f6bd85f7d6f7ebf58b15d7108a2982d74d (patch) | |
tree | 481f18b7ded341a5559eca588e00c33a1d06cd23 /framework | |
parent | c0fb2640665d552b39deb2192d59fa11ea701d51 (diff) |
Access safe data members directly
Change-Id: I2305c17d03c4b6ba3f77c7c5952aadda627118ac
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/dispatch/systemexec.hxx | 9 | ||||
-rw-r--r-- | framework/source/dispatch/systemexec.cxx | 17 |
2 files changed, 4 insertions, 22 deletions
diff --git a/framework/inc/dispatch/systemexec.hxx b/framework/inc/dispatch/systemexec.hxx index a8e36e0a715b..8fdab69d6e49 100644 --- a/framework/inc/dispatch/systemexec.hxx +++ b/framework/inc/dispatch/systemexec.hxx @@ -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> @@ -47,18 +46,12 @@ namespace framework{ It forwards all URL's to the underlying operating system. So it would e.g. be possible to open HTML files outside the office within a web browser. - @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 SystemExec : // baseclasses - // Order is necessary for right initialization! - private ThreadHelpBase , - // interfaces - public ::cppu::WeakImplHelper3< +class SystemExec : public ::cppu::WeakImplHelper3< css::lang::XServiceInfo , css::frame::XDispatchProvider , css::frame::XNotifyingDispatch > // => XDispatch diff --git a/framework/source/dispatch/systemexec.cxx b/framework/source/dispatch/systemexec.cxx index 97a30ecd57c6..6a5f8263d609 100644 --- a/framework/source/dispatch/systemexec.cxx +++ b/framework/source/dispatch/systemexec.cxx @@ -18,7 +18,6 @@ */ #include <dispatch/systemexec.hxx> -#include <threadhelp/guard.hxx> #include <general.h> #include <services.h> @@ -57,10 +56,7 @@ DEFINE_INIT_SERVICE(SystemExec, SystemExec::SystemExec( const css::uno::Reference< css::uno::XComponentContext >& rxContext ) - // Init baseclasses first - : ThreadHelpBase( &Application::GetSolarMutex() ) - // Init member - , m_xContext ( rxContext ) + : m_xContext ( rxContext ) { } @@ -68,7 +64,6 @@ SystemExec::SystemExec( const css::uno::Reference< css::uno::XComponentContext > SystemExec::~SystemExec() { - m_xContext = NULL; } @@ -122,21 +117,15 @@ void SAL_CALL SystemExec::dispatchWithNotification( const css::util::URL& } OUString sSystemURLWithVariables = aURL.Complete.copy(PROTOCOL_LENGTH, c); - // SAFE -> - Guard aReadLock(m_aLock); - css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; - aReadLock.unlock(); - // <- SAFE - // TODO check security settings ... try { - css::uno::Reference< css::util::XStringSubstitution > xPathSubst( css::util::PathSubstitution::create(xContext) ); + css::uno::Reference< css::util::XStringSubstitution > xPathSubst( css::util::PathSubstitution::create(m_xContext) ); OUString sSystemURL = xPathSubst->substituteVariables(sSystemURLWithVariables, sal_True); // sal_True force an exception if unknown variables exists ! - css::uno::Reference< css::system::XSystemShellExecute > xShell = css::system::SystemShellExecute::create( xContext ); + css::uno::Reference< css::system::XSystemShellExecute > xShell = css::system::SystemShellExecute::create( m_xContext ); xShell->execute(sSystemURL, OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY); impl_notifyResultListener(xListener, css::frame::DispatchResultState::SUCCESS); |