Kaydet (Commit) 9a110fff authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Use an osl::Mutex directly

Change-Id: I4f483efd13c099348f06094573c499858a8431ba
üst 3d07d18a
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment