summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/unotools/accessiblestatesethelper.hxx4
-rw-r--r--unotools/source/accessibility/accessiblestatesethelper.cxx12
2 files changed, 8 insertions, 8 deletions
diff --git a/include/unotools/accessiblestatesethelper.hxx b/include/unotools/accessiblestatesethelper.hxx
index 6fa66279f885..b1e5644f1eea 100644
--- a/include/unotools/accessiblestatesethelper.hxx
+++ b/include/unotools/accessiblestatesethelper.hxx
@@ -22,8 +22,8 @@
#include <unotools/unotoolsdllapi.h>
#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
-#include <osl/mutex.hxx>
#include <cppuhelper/implbase.hxx>
+#include <mutex>
//= XAccessibleStateSet helper classes
@@ -126,7 +126,7 @@ public:
private:
/// Mutex guarding this object.
- ::osl::Mutex maMutex;
+ std::mutex maMutex;
/// The implementation of this helper interface.
sal_uInt64 maStates;
};
diff --git a/unotools/source/accessibility/accessiblestatesethelper.cxx b/unotools/source/accessibility/accessiblestatesethelper.cxx
index cec1f6bcd615..db725d079a06 100644
--- a/unotools/source/accessibility/accessiblestatesethelper.cxx
+++ b/unotools/source/accessibility/accessiblestatesethelper.cxx
@@ -70,7 +70,7 @@ AccessibleStateSetHelper::~AccessibleStateSetHelper()
*/
sal_Bool SAL_CALL AccessibleStateSetHelper::isEmpty ()
{
- osl::MutexGuard aGuard (maMutex);
+ std::lock_guard aGuard (maMutex);
return maStates == 0;
}
@@ -87,7 +87,7 @@ sal_Bool SAL_CALL AccessibleStateSetHelper::isEmpty ()
*/
sal_Bool SAL_CALL AccessibleStateSetHelper::contains (sal_Int16 aState)
{
- osl::MutexGuard aGuard (maMutex);
+ std::lock_guard aGuard (maMutex);
return lcl_contains(maStates, aState);
}
@@ -110,14 +110,14 @@ sal_Bool SAL_CALL AccessibleStateSetHelper::contains (sal_Int16 aState)
sal_Bool SAL_CALL AccessibleStateSetHelper::containsAll
(const uno::Sequence<sal_Int16>& rStateSet)
{
- osl::MutexGuard aGuard (maMutex);
+ std::lock_guard aGuard (maMutex);
return std::all_of(rStateSet.begin(), rStateSet.end(),
[this](const sal_Int16 nState) { return lcl_contains(maStates, nState); });
}
uno::Sequence<sal_Int16> SAL_CALL AccessibleStateSetHelper::getStates()
{
- osl::MutexGuard aGuard(maMutex);
+ std::lock_guard aGuard(maMutex);
uno::Sequence<sal_Int16> aRet(BITFIELDSIZE);
sal_Int16* pSeq = aRet.getArray();
sal_Int16 nStateCount(0);
@@ -134,7 +134,7 @@ uno::Sequence<sal_Int16> SAL_CALL AccessibleStateSetHelper::getStates()
void AccessibleStateSetHelper::AddState(sal_Int16 aState)
{
- osl::MutexGuard aGuard (maMutex);
+ std::lock_guard aGuard (maMutex);
DBG_ASSERT(aState < BITFIELDSIZE, "the statesset is too small");
sal_uInt64 aTempBitSet(1);
aTempBitSet <<= aState;
@@ -143,7 +143,7 @@ void AccessibleStateSetHelper::AddState(sal_Int16 aState)
void AccessibleStateSetHelper::RemoveState(sal_Int16 aState)
{
- osl::MutexGuard aGuard (maMutex);
+ std::lock_guard aGuard (maMutex);
DBG_ASSERT(aState < BITFIELDSIZE, "the statesset is too small");
sal_uInt64 aTempBitSet(1);
aTempBitSet <<= aState;