Use an osl::Mutex directly
Change-Id: I4adad36de95c022a7945b61a44bb6166ad87a8a7
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#ifndef INCLUDED_FRAMEWORK_INC_DISPATCH_OXT_HANDLER_HXX
|
||||
#define INCLUDED_FRAMEWORK_INC_DISPATCH_OXT_HANDLER_HXX
|
||||
|
||||
#include <threadhelp/threadhelpbase.hxx>
|
||||
#include <macros/xinterface.hxx>
|
||||
#include <macros/xtypeprovider.hxx>
|
||||
#include <macros/xserviceinfo.hxx>
|
||||
@@ -53,11 +52,7 @@ namespace framework{
|
||||
@devstatus ready
|
||||
@threadsafe yes
|
||||
*//*-*************************************************************************************************************/
|
||||
class Oxt_Handler : // baseclasses
|
||||
// Order is necessary for right initialization!
|
||||
private ThreadHelpBase
|
||||
// interfaces
|
||||
, public ::cppu::WeakImplHelper3<
|
||||
class Oxt_Handler : public ::cppu::WeakImplHelper3<
|
||||
css::lang::XServiceInfo,
|
||||
css::frame::XNotifyingDispatch, // => XDispatch
|
||||
css::document::XExtendedFilterDetection >
|
||||
@@ -114,6 +109,7 @@ class Oxt_Handler : // baseclasses
|
||||
// (should be private everyway!)
|
||||
|
||||
private:
|
||||
osl::Mutex m_mutex;
|
||||
|
||||
css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory ; /// global uno service factory to create new services
|
||||
css::uno::Reference< css::uno::XInterface > m_xSelfHold ; /// we must protect us against dieing during async(!) dispatch() call!
|
||||
|
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
#include <dispatch/oxt_handler.hxx>
|
||||
#include <threadhelp/guard.hxx>
|
||||
#include <threadhelp/transactionguard.hxx>
|
||||
#include <services.h>
|
||||
#include <unotools/mediadescriptor.hxx>
|
||||
@@ -60,10 +59,7 @@ DEFINE_INIT_SERVICE ( Oxt_Handler,
|
||||
@threadsafe yes
|
||||
*//*-*************************************************************************************************************/
|
||||
Oxt_Handler::Oxt_Handler( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory )
|
||||
// Init baseclasses first
|
||||
: ThreadHelpBase ( )
|
||||
// Init member
|
||||
, m_xFactory ( xFactory )
|
||||
: m_xFactory ( xFactory )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -117,8 +113,7 @@ void SAL_CALL Oxt_Handler::dispatchWithNotification( const css::util::URL& aURL,
|
||||
const css::uno::Reference< css::frame::XDispatchResultListener >& xListener )
|
||||
throw( css::uno::RuntimeException, std::exception )
|
||||
{
|
||||
// SAFE {
|
||||
Guard aLock( m_aLock );
|
||||
osl::MutexGuard g(m_mutex);
|
||||
|
||||
OUString sServiceName = "com.sun.star.deployment.ui.PackageManagerDialog";
|
||||
css::uno::Sequence< css::uno::Any > lParams(1);
|
||||
@@ -137,9 +132,6 @@ void SAL_CALL Oxt_Handler::dispatchWithNotification( const css::util::URL& aURL,
|
||||
aEvent.State = css::frame::DispatchResultState::SUCCESS;
|
||||
xListener->dispatchFinished( aEvent );
|
||||
}
|
||||
|
||||
// } SAFE
|
||||
aLock.unlock();
|
||||
}
|
||||
|
||||
void SAL_CALL Oxt_Handler::dispatch( const css::util::URL& aURL ,
|
||||
|
Reference in New Issue
Block a user