From 1c749fb1766263638a7a87575b84ab31ebdd5cde Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 16 Feb 2023 09:14:04 +0200 Subject: osl::Mutex->std::mutex in FormScriptingEnvironment Change-Id: I6c6fbe6126d9431f4a252aadf31c9733a41a73b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147193 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/form/fmscriptingenv.cxx | 8 ++++---- svx/source/inc/fmscriptingenv.hxx | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'svx/source') diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index 948fdb182efe..db7904174b0a 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -760,7 +760,7 @@ namespace svxform void FormScriptingEnvironment::impl_registerOrRevoke_throw( const Reference< XEventAttacherManager >& _rxManager, bool _bRegister ) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); if ( !_rxManager.is() ) throw IllegalArgumentException(); @@ -841,7 +841,7 @@ namespace svxform (void) m_rFormModel; #else SolarMutexClearableGuard aSolarGuard; - ::osl::ClearableMutexGuard aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); if ( m_bDisposed ) return; @@ -898,7 +898,7 @@ namespace svxform assert(pScript && "FormScriptingEnvironment::doFireScriptEvent: no script to execute!"); - aGuard.clear(); + aGuard.unlock(); aSolarGuard.clear(); Any aIgnoreResult; @@ -916,7 +916,7 @@ namespace svxform void FormScriptingEnvironment::dispose() { - ::osl::MutexGuard aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); m_bDisposed = true; m_pScriptListener->dispose(); m_pScriptListener.clear(); diff --git a/svx/source/inc/fmscriptingenv.hxx b/svx/source/inc/fmscriptingenv.hxx index 18d8a5e44ad5..0fdbcbc251d5 100644 --- a/svx/source/inc/fmscriptingenv.hxx +++ b/svx/source/inc/fmscriptingenv.hxx @@ -23,6 +23,7 @@ #include #include #include +#include class FmFormModel; @@ -78,7 +79,7 @@ namespace svxform void dispose(); private: - ::osl::Mutex m_aMutex; + std::mutex m_aMutex; rtl::Reference m_pScriptListener; FmFormModel& m_rFormModel; bool m_bDisposed; -- cgit