diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-20 11:22:32 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-20 15:04:12 +0100 |
commit | 9a110fff7d6d6ba296f896f85a4aeed0d0955350 (patch) | |
tree | 2fa891c29e31ec6f3b8dafc55e23e58c7b1c6f2e /framework | |
parent | 3d07d18a1828ef27179df119caae2ac62e5831dd (diff) |
Use an osl::Mutex directly
Change-Id: I4f483efd13c099348f06094573c499858a8431ba
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/dispatch/loaddispatcher.cxx | 9 | ||||
-rw-r--r-- | framework/source/inc/dispatch/loaddispatcher.hxx | 5 |
2 files changed, 4 insertions, 10 deletions
diff --git a/framework/source/dispatch/loaddispatcher.cxx b/framework/source/dispatch/loaddispatcher.cxx index 3d90d03b786d..7df716733c98 100644 --- a/framework/source/dispatch/loaddispatcher.cxx +++ b/framework/source/dispatch/loaddispatcher.cxx @@ -18,7 +18,6 @@ */ #include <dispatch/loaddispatcher.hxx> -#include <threadhelp/guard.hxx> #include <com/sun/star/frame/DispatchResultState.hpp> @@ -28,8 +27,7 @@ LoadDispatcher::LoadDispatcher(const css::uno::Reference< css::uno::XComponentCo const css::uno::Reference< css::frame::XFrame >& xOwnerFrame , const OUString& sTargetName , sal_Int32 nSearchFlags) - : ThreadHelpBase( ) - , m_xContext (xContext ) + : m_xContext (xContext ) , m_xOwnerFrame (xOwnerFrame ) , m_sTarget (sTargetName ) , m_nSearchFlags(nSearchFlags) @@ -85,8 +83,7 @@ css::uno::Any LoadDispatcher::impl_dispatch( const css::util::URL& rURL, // and clear our reference ...) we should hold us self alive! css::uno::Reference< css::uno::XInterface > xThis(static_cast< css::frame::XNotifyingDispatch* >(this), css::uno::UNO_QUERY); - // SAFE -> ---------------------------------- - Guard aReadLock(m_aLock); + osl::MutexGuard g(m_mutex); // We are the only client of this load env object ... but // may a dispatch request before is still in progress (?!). @@ -151,8 +148,6 @@ css::uno::Any LoadDispatcher::impl_dispatch( const css::util::URL& rURL, if ( xComponent.is () ) aRet = css::uno::makeAny( xComponent ); - aReadLock.unlock(); - // <- SAFE ---------------------------------- return aRet; } diff --git a/framework/source/inc/dispatch/loaddispatcher.hxx b/framework/source/inc/dispatch/loaddispatcher.hxx index b8b666602681..374ac2928bfe 100644 --- a/framework/source/inc/dispatch/loaddispatcher.hxx +++ b/framework/source/inc/dispatch/loaddispatcher.hxx @@ -21,7 +21,6 @@ #define INCLUDED_FRAMEWORK_SOURCE_INC_DISPATCH_LOADDISPATCHER_HXX #include <loadenv/loadenv.hxx> -#include <threadhelp/threadhelpbase.hxx> #include <com/sun/star/frame/XNotifyingDispatch.hpp> #include <com/sun/star/frame/XSynchronousDispatch.hpp> @@ -36,14 +35,14 @@ namespace framework{ @author as96863 */ -class LoadDispatcher : private ThreadHelpBase - , public ::cppu::WeakImplHelper2< css::frame::XNotifyingDispatch, // => XDispatch => XInterface +class LoadDispatcher : public ::cppu::WeakImplHelper2< css::frame::XNotifyingDispatch, // => XDispatch => XInterface css::frame::XSynchronousDispatch > { // member private: + osl::Mutex m_mutex; /** @short can be used to create own needed services on demand. */ css::uno::Reference< css::uno::XComponentContext > m_xContext; |