svx/source/form/fmscriptingenv.cxx | 8 ++++---- svx/source/inc/fmscriptingenv.hxx | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-)
New commits: commit 1c749fb1766263638a7a87575b84ab31ebdd5cde Author: Noel Grandin <[email protected]> AuthorDate: Thu Feb 16 09:14:04 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Feb 17 09:28:44 2023 +0000 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 <[email protected]> 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;
