diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-16 09:14:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-17 09:28:44 +0000 |
commit | 1c749fb1766263638a7a87575b84ab31ebdd5cde (patch) | |
tree | f603394d4d945f0da117e0ef865ef6eba68f2a9b /svx/source | |
parent | 3282508f8deeafd50f5af45ca0adf760efb114a3 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/form/fmscriptingenv.cxx | 8 | ||||
-rw-r--r-- | svx/source/inc/fmscriptingenv.hxx | 3 |
2 files changed, 6 insertions, 5 deletions
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 <com/sun/star/script/XEventAttacherManager.hpp> #include <rtl/ref.hxx> #include <salhelper/simplereferenceobject.hxx> +#include <mutex> class FmFormModel; @@ -78,7 +79,7 @@ namespace svxform void dispose(); private: - ::osl::Mutex m_aMutex; + std::mutex m_aMutex; rtl::Reference<FormScriptListener> m_pScriptListener; FmFormModel& m_rFormModel; bool m_bDisposed; |