summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-29 19:42:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-30 11:03:04 +0200
commitf107e6893491bdf9e9bd1a8620218640ea76095a (patch)
tree82c9659c24c5f5398016eb1e77ecf304780af796
parentb595a93f3022badf4f8a1e0edd19475778b0fddc (diff)
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@collabora.co.uk>
-rw-r--r--comphelper/source/misc/accessiblekeybindinghelper.cxx8
-rw-r--r--include/comphelper/accessiblekeybindinghelper.hxx9
2 files changed, 7 insertions, 10 deletions
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;