summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-17 19:49:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-18 14:54:35 +0200
commit8b69e7b26cb9812cc2ad778077db750260969a9a (patch)
treecd14ccb598c0e7db193a5e36be14ca61298510c7
parente62e6b6d018e70bcb1f0486dd72e756b17861b0a (diff)
osl::Mutex->std::mutex in EventAttacherImpl
Change-Id: I44f23fd464479d2b89469179cefff50fc6defff5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--eventattacher/source/eventattacher.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx
index 8a3b3af93338..b7988dbeff7b 100644
--- a/eventattacher/source/eventattacher.cxx
+++ b/eventattacher/source/eventattacher.cxx
@@ -39,6 +39,8 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <mutex>
+
namespace com::sun::star::lang { class XMultiServiceFactory; }
using namespace com::sun::star::uno;
@@ -249,7 +251,7 @@ private:
const Sequence<css::script::EventListener>& aListeners );
private:
- Mutex m_aMutex;
+ std::mutex m_aMutex;
Reference< XComponentContext > m_xContext;
// Save Services
@@ -303,7 +305,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments)
arg >>= xALAS;
if( xALAS.is() )
{
- Guard< Mutex > aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
m_xInvocationAdapterFactory = xALAS;
}
// Introspection service ?
@@ -311,7 +313,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments)
arg >>= xI;
if( xI.is() )
{
- Guard< Mutex > aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
m_xIntrospection = xI;
}
// Reflection service ?
@@ -319,7 +321,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments)
arg >>= xIdlR;
if( xIdlR.is() )
{
- Guard< Mutex > aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
m_xReflection = xIdlR;
}
// Converter Service ?
@@ -327,7 +329,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments)
arg >>= xC;
if( xC.is() )
{
- Guard< Mutex > aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
m_xConverter = xC;
}
@@ -341,7 +343,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments)
//*** Private helper methods ***
Reference< XIntrospection > EventAttacherImpl::getIntrospection()
{
- Guard< Mutex > aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if( !m_xIntrospection.is() )
{
m_xIntrospection = theIntrospection::get( m_xContext );
@@ -353,7 +355,7 @@ Reference< XIntrospection > EventAttacherImpl::getIntrospection()
//*** Private helper methods ***
Reference< XIdlReflection > EventAttacherImpl::getReflection()
{
- Guard< Mutex > aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if( !m_xReflection.is() )
{
m_xReflection = theCoreReflection::get(m_xContext);
@@ -365,7 +367,7 @@ Reference< XIdlReflection > EventAttacherImpl::getReflection()
//*** Private helper methods ***
Reference< XInvocationAdapterFactory2 > EventAttacherImpl::getInvocationAdapterService()
{
- Guard< Mutex > aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if( !m_xInvocationAdapterFactory.is() )
{
m_xInvocationAdapterFactory = InvocationAdapterFactory::create(m_xContext);
@@ -377,7 +379,7 @@ Reference< XInvocationAdapterFactory2 > EventAttacherImpl::getInvocationAdapterS
//*** Private helper methods ***
Reference< XTypeConverter > EventAttacherImpl::getConverter()
{
- Guard< Mutex > aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if( !m_xConverter.is() )
{
m_xConverter = Converter::create(m_xContext);