diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-18 21:07:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-20 18:50:59 +0100 |
commit | 6198ea0469d1fca24fe2de2b8ac17bbfd0f3c1b6 (patch) | |
tree | 829ebcc384af43b3c2506db070749c6f1df21a0c /svtools/source/misc | |
parent | 97d00de4afe9827ddaf299cfdfa8534425a11fe6 (diff) |
osl::Mutex->std::mutex in AcceleratorExecute
Change-Id: Ib95f4bf1d5f09e8647ce8f35e8165c6858247fd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127116
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/misc')
-rw-r--r-- | svtools/source/misc/acceleratorexecute.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 9fa76e56deaf..8302e7addd43 100644 --- a/svtools/source/misc/acceleratorexecute.cxx +++ b/svtools/source/misc/acceleratorexecute.cxx @@ -104,7 +104,7 @@ void AcceleratorExecute::init(const css::uno::Reference< css::uno::XComponentCon const css::uno::Reference< css::frame::XFrame >& xEnv ) { // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + std::unique_lock aLock(m_aLock); // take over the uno service manager m_xContext = rxContext; @@ -115,19 +115,19 @@ void AcceleratorExecute::init(const css::uno::Reference< css::uno::XComponentCon m_xDispatcher.set(xEnv, css::uno::UNO_QUERY); if (!m_xDispatcher.is()) { - aLock.clear(); + aLock.unlock(); // <- SAFE ------------------------------ css::uno::Reference< css::frame::XDispatchProvider > xDispatcher(css::frame::Desktop::create(rxContext), css::uno::UNO_QUERY_THROW); // SAFE -> ------------------------------ - aLock.reset(); + aLock.lock(); m_xDispatcher = xDispatcher; bDesktopIsUsed = true; } - aLock.clear(); + aLock.unlock(); // <- SAFE ---------------------------------- // open all needed configuration objects @@ -153,13 +153,13 @@ void AcceleratorExecute::init(const css::uno::Reference< css::uno::XComponentCon } // SAFE -> ------------------------------ - aLock.reset(); + aLock.lock(); m_xGlobalCfg = xGlobalCfg; m_xModuleCfg = xModuleCfg; m_xDocCfg = xDocCfg ; - aLock.clear(); + aLock.unlock(); // <- SAFE ---------------------------------- } @@ -183,11 +183,11 @@ bool AcceleratorExecute::execute(const css::awt::KeyEvent& aAWTKey) } // SAFE -> ---------------------------------- - osl::ClearableMutexGuard aLock(m_aLock); + std::unique_lock aLock(m_aLock); css::uno::Reference< css::frame::XDispatchProvider > xProvider = m_xDispatcher; - aLock.clear(); + aLock.unlock(); // <- SAFE ---------------------------------- // convert command in URL structure @@ -261,13 +261,13 @@ OUString AcceleratorExecute::findCommand(const css::awt::KeyEvent& aKey) OUString AcceleratorExecute::impl_ts_findCommand(const css::awt::KeyEvent& aKey) { // SAFE -> ---------------------------------- - osl::ClearableMutexGuard aLock(m_aLock); + std::unique_lock aLock(m_aLock); css::uno::Reference< css::ui::XAcceleratorConfiguration > xGlobalCfg = m_xGlobalCfg; css::uno::Reference< css::ui::XAcceleratorConfiguration > xModuleCfg = m_xModuleCfg; css::uno::Reference< css::ui::XAcceleratorConfiguration > xDocCfg = m_xDocCfg ; - aLock.clear(); + aLock.unlock(); // <- SAFE ---------------------------------- OUString sCommand; @@ -423,21 +423,21 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st css::uno::Reference< css::util::XURLTransformer > AcceleratorExecute::impl_ts_getURLParser() { // SAFE -> ---------------------------------- - ::osl::ResettableMutexGuard aLock(m_aLock); + std::unique_lock aLock(m_aLock); if (m_xURLParser.is()) return m_xURLParser; css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; - aLock.clear(); + aLock.unlock(); // <- SAFE ---------------------------------- css::uno::Reference< css::util::XURLTransformer > xParser = css::util::URLTransformer::create( xContext ); // SAFE -> ---------------------------------- - aLock.reset(); + aLock.lock(); m_xURLParser = xParser; - aLock.clear(); + aLock.unlock(); // <- SAFE ---------------------------------- return xParser; |