framework/source/loadenv/loadenv.cxx | 10 +++++----- framework/source/uielement/uicommanddescription.cxx | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-)
New commits: commit 89fa0a42ecd71ee9e4f80d127ced396c79d5e650 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Feb 13 22:10:16 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Feb 14 06:59:40 2023 +0000 osl::Mutex->std::mutex in LoadEnvListener Change-Id: If76feb51f0d2f187603fb1af7c27bbe3391b645b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146944 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 89feaa25d0ab..a01bc50fe582 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -105,7 +105,7 @@ class LoadEnvListener : public ::cppu::WeakImplHelper< css::frame::XLoadEventLis css::frame::XDispatchResultListener > { private: - osl::Mutex m_mutex; + std::mutex m_mutex; bool m_bWaitingResult; LoadEnv* m_pLoadEnv; @@ -468,7 +468,7 @@ css::uno::Reference< css::lang::XComponent > LoadEnv::getTargetComponent() const void SAL_CALL LoadEnvListener::loadFinished(const css::uno::Reference< css::frame::XFrameLoader >&) { - osl::MutexGuard g(m_mutex); + std::unique_lock g(m_mutex); if (m_bWaitingResult) m_pLoadEnv->impl_setResult(true); m_bWaitingResult = false; @@ -476,7 +476,7 @@ void SAL_CALL LoadEnvListener::loadFinished(const css::uno::Reference< css::fram void SAL_CALL LoadEnvListener::loadCancelled(const css::uno::Reference< css::frame::XFrameLoader >&) { - osl::MutexGuard g(m_mutex); + std::unique_lock g(m_mutex); if (m_bWaitingResult) m_pLoadEnv->impl_setResult(false); m_bWaitingResult = false; @@ -484,7 +484,7 @@ void SAL_CALL LoadEnvListener::loadCancelled(const css::uno::Reference< css::fra void SAL_CALL LoadEnvListener::dispatchFinished(const css::frame::DispatchResultEvent& aEvent) { - osl::MutexGuard g(m_mutex); + std::unique_lock g(m_mutex); if (!m_bWaitingResult) return; @@ -508,7 +508,7 @@ void SAL_CALL LoadEnvListener::dispatchFinished(const css::frame::DispatchResult void SAL_CALL LoadEnvListener::disposing(const css::lang::EventObject&) { - osl::MutexGuard g(m_mutex); + std::unique_lock g(m_mutex); if (m_bWaitingResult) m_pLoadEnv->impl_setResult(false); m_bWaitingResult = false; commit 7da5639531303c7de34382c5030b67a489a6e3d5 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Feb 13 22:06:51 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Feb 14 06:59:32 2023 +0000 osl::Mutex->std::mutex in ConfigurationAccess_UICommand Change-Id: Id92161815cd1f336c030aa4491e67a84aaddeb87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index 8054cf4bff8d..f37663bc0e54 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -71,7 +71,7 @@ namespace { class ConfigurationAccess_UICommand : // Order is necessary for right initialization! public ::cppu::WeakImplHelper<XNameAccess,XContainerListener> { - osl::Mutex m_aMutex; + std::mutex m_aMutex; public: ConfigurationAccess_UICommand( std::u16string_view aModuleName, const Reference< XNameAccess >& xGenericUICommands, const Reference< XComponentContext >& rxContext ); virtual ~ConfigurationAccess_UICommand() override; @@ -176,7 +176,7 @@ ConfigurationAccess_UICommand::ConfigurationAccess_UICommand( std::u16string_vie ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand() { // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); Reference< XContainer > xContainer( m_xConfigAccess, UNO_QUERY ); if ( xContainer.is() ) xContainer->removeContainerListener(m_xConfigListener); @@ -188,7 +188,7 @@ ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand() // XNameAccess Any ConfigurationAccess_UICommand::getByNameImpl( const OUString& rCommandURL ) { - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); if ( !m_bConfigAccessInitialized ) { initializeConfigAccess(); @@ -432,7 +432,7 @@ Any ConfigurationAccess_UICommand::getInfoFromCommand( const OUString& rCommandU Sequence< OUString > ConfigurationAccess_UICommand::getAllCommands() { // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); if ( !m_bConfigAccessInitialized ) { @@ -523,21 +523,21 @@ void ConfigurationAccess_UICommand::initializeConfigAccess() // container.XContainerListener void SAL_CALL ConfigurationAccess_UICommand::elementInserted( const ContainerEvent& ) { - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); m_bCacheFilled = false; fillCache(); } void SAL_CALL ConfigurationAccess_UICommand::elementRemoved( const ContainerEvent& ) { - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); m_bCacheFilled = false; fillCache(); } void SAL_CALL ConfigurationAccess_UICommand::elementReplaced( const ContainerEvent& ) { - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); m_bCacheFilled = false; fillCache(); } @@ -547,7 +547,7 @@ void SAL_CALL ConfigurationAccess_UICommand::disposing( const EventObject& aEven { // SAFE // remove our reference to the config access - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); Reference< XInterface > xIfac1( aEvent.Source, UNO_QUERY ); Reference< XInterface > xIfac2( m_xConfigAccess, UNO_QUERY );