[Libreoffice-commits] core.git: comphelper/source include/comphelper

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 30 09:03:38 UTC 2021


 comphelper/source/misc/accessiblekeybindinghelper.cxx |    8 ++++----
 include/comphelper/accessiblekeybindinghelper.hxx     |    9 +++------
 2 files changed, 7 insertions(+), 10 deletions(-)

New commits:
commit f107e6893491bdf9e9bd1a8620218640ea76095a
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jul 29 19:42:51 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jul 30 11:03:04 2021 +0200

    osl::Mutex->std::mutex in OAccessibleKeyBindingHelper
    
    Change-Id: Ib308ede9561a3ff26cfc43bee202f3151fa07392
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119694
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/comphelper/source/misc/accessiblekeybindinghelper.cxx b/comphelper/source/misc/accessiblekeybindinghelper.cxx
index ce1203e42fcd..c30cb3307d48 100644
--- a/comphelper/source/misc/accessiblekeybindinghelper.cxx
+++ b/comphelper/source/misc/accessiblekeybindinghelper.cxx
@@ -55,7 +55,7 @@ namespace comphelper
 
     void OAccessibleKeyBindingHelper::AddKeyBinding( const Sequence< awt::KeyStroke >& rKeyBinding )
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
+        std::lock_guard aGuard( m_aMutex );
 
         m_aKeyBindings.push_back( rKeyBinding );
     }
@@ -63,7 +63,7 @@ namespace comphelper
 
     void OAccessibleKeyBindingHelper::AddKeyBinding( const awt::KeyStroke& rKeyStroke )
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
+        std::lock_guard aGuard( m_aMutex );
         m_aKeyBindings.push_back( { rKeyStroke } );
     }
 
@@ -73,7 +73,7 @@ namespace comphelper
 
     sal_Int32 OAccessibleKeyBindingHelper::getAccessibleKeyBindingCount()
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
+        std::lock_guard aGuard( m_aMutex );
 
         return m_aKeyBindings.size();
     }
@@ -81,7 +81,7 @@ namespace comphelper
 
     Sequence< awt::KeyStroke > OAccessibleKeyBindingHelper::getAccessibleKeyBinding( sal_Int32 nIndex )
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
+        std::lock_guard aGuard( m_aMutex );
 
         if ( nIndex < 0 || nIndex >= static_cast<sal_Int32>(m_aKeyBindings.size()) )
             throw IndexOutOfBoundsException();
diff --git a/include/comphelper/accessiblekeybindinghelper.hxx b/include/comphelper/accessiblekeybindinghelper.hxx
index 4de48bf3ec39..fe6b03521f5b 100644
--- a/include/comphelper/accessiblekeybindinghelper.hxx
+++ b/include/comphelper/accessiblekeybindinghelper.hxx
@@ -21,14 +21,11 @@
 #define INCLUDED_COMPHELPER_ACCESSIBLEKEYBINDINGHELPER_HXX
 
 #include <com/sun/star/accessibility/XAccessibleKeyBinding.hpp>
+#include <comphelper/comphelperdllapi.h>
 #include <cppuhelper/implbase.hxx>
-#include <osl/mutex.hxx>
-
+#include <mutex>
 #include <vector>
 
-#include <comphelper/comphelperdllapi.h>
-
-
 namespace comphelper
 {
 
@@ -46,7 +43,7 @@ namespace comphelper
     private:
         typedef ::std::vector< css::uno::Sequence< css::awt::KeyStroke > > KeyBindings;
         KeyBindings     m_aKeyBindings;
-        ::osl::Mutex    m_aMutex;
+        std::mutex      m_aMutex;
 
         virtual ~OAccessibleKeyBindingHelper() override;
 


More information about the Libreoffice-commits mailing list