diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-02 20:27:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-03 09:53:05 +0200 |
commit | 9c7e8b416d5555718f9d12fb89668a1fe7234c01 (patch) | |
tree | 5523a3bd9a20af7ab3deac68c94234be2c347ed2 | |
parent | d596bedd1c4aa27549fe9dda5112c67bdfc8c7fb (diff) |
osl::Mutex->std::mutex in SwAccessibleContext
Change-Id: Ieba232c5b4a337c126a760760c9eaa153a9c8607
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119914
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/access/acccell.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/access/acccontext.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/access/acccontext.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/access/accframebase.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/access/accpage.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/access/accpara.cxx | 14 |
6 files changed, 26 insertions, 25 deletions
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index fc5ca1e71a3f..b59c8036f621 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -127,7 +127,7 @@ bool SwAccessibleCell::InvalidateMyCursorPos() bool bNew = IsSelected(); bool bOld; { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); bOld = m_bIsSelected; m_bIsSelected = bNew; } @@ -227,7 +227,7 @@ void SwAccessibleCell::InvalidateCursorPos_() bool SwAccessibleCell::HasCursor() { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); return m_bIsSelected; } diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index 82859195b12a..0f46a494f844 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -66,7 +66,7 @@ void SwAccessibleContext::InitStates() void SwAccessibleContext::SetParent( SwAccessibleContext *pParent ) { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); uno::Reference < XAccessible > xParent( pParent ); m_xWeakParent = xParent; @@ -74,7 +74,7 @@ void SwAccessibleContext::SetParent( SwAccessibleContext *pParent ) uno::Reference< XAccessible > SwAccessibleContext::GetWeakParent() const { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); uno::Reference< XAccessible > xParent( m_xWeakParent ); return xParent; @@ -270,7 +270,7 @@ void SwAccessibleContext::Scrolled( const SwRect& rOldVisArea ) bool bIsOldShowingState; bool bIsNewShowingState = IsShowing( *(GetMap()) ); { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); bIsOldShowingState = m_isShowingState; m_isShowingState = bIsNewShowingState; } @@ -513,7 +513,7 @@ bool SwAccessibleContext::IsEditableState() { bool bRet; { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); bRet = m_isEditableState; } @@ -676,7 +676,7 @@ uno::Reference< XAccessible> SwAccessibleContext::getAccessibleParentImpl() // Remember the parent as weak ref. { - osl::MutexGuard aWeakParentGuard( m_Mutex ); + std::lock_guard aWeakParentGuard( m_Mutex ); m_xWeakParent = xAcc; } @@ -1089,7 +1089,7 @@ void SwAccessibleContext::Dispose(bool bRecursive, bool bCanSkipInvisible) // set defunc state (it's not required to broadcast a state changed // event if the object is disposed afterwards) { - osl::MutexGuard aDefuncStateGuard( m_Mutex ); + std::lock_guard aDefuncStateGuard( m_Mutex ); m_isDefuncState = true; } @@ -1160,7 +1160,7 @@ void SwAccessibleContext::InvalidatePosOrSize( const SwRect& ) bool bIsOldShowingState; bool bIsNewShowingState = IsShowing( *(GetMap()) ); { - osl::MutexGuard aShowingStateGuard( m_Mutex ); + std::lock_guard aShowingStateGuard( m_Mutex ); bIsOldShowingState = m_isShowingState; m_isShowingState = bIsNewShowingState; } @@ -1319,7 +1319,7 @@ void SwAccessibleContext::InvalidateStates( AccessibleStates _nStates ) bool bIsOldEditableState; bool bIsNewEditableState = IsEditable( pVSh ); { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); bIsOldEditableState = m_isEditableState; m_isEditableState = bIsNewEditableState; } @@ -1333,7 +1333,7 @@ void SwAccessibleContext::InvalidateStates( AccessibleStates _nStates ) bool bIsOldOpaqueState; bool bIsNewOpaqueState = IsOpaque( pVSh ); { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); bIsOldOpaqueState = m_isOpaqueState; m_isOpaqueState = bIsNewOpaqueState; } diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index 137726a43ed0..a77cf6cb74b6 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -28,6 +28,7 @@ #include <cppuhelper/implbase.hxx> #include <memory> +#include <mutex> namespace vcl { class Window; } class SwCursorShell; @@ -62,7 +63,7 @@ class SwAccessibleContext : #endif protected: - mutable ::osl::Mutex m_Mutex; + mutable std::mutex m_Mutex; private: OUString m_sName; // immutable outside constructor diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx index 505cb5c37e1b..a18364693f74 100644 --- a/sw/source/core/access/accframebase.cxx +++ b/sw/source/core/access/accframebase.cxx @@ -141,7 +141,7 @@ void SwAccessibleFrameBase::InvalidateCursorPos_() bool bOldSelected; { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); bOldSelected = m_bIsSelected; m_bIsSelected = bNewSelected; } @@ -188,7 +188,7 @@ void SwAccessibleFrameBase::InvalidateFocus_() bool bSelected; { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); bSelected = m_bIsSelected; } assert(bSelected && "focus object should be selected"); @@ -199,7 +199,7 @@ void SwAccessibleFrameBase::InvalidateFocus_() bool SwAccessibleFrameBase::HasCursor() { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); return m_bIsSelected; } diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx index 2c5d1513a05d..c9228ea137cf 100644 --- a/sw/source/core/access/accpage.cxx +++ b/sw/source/core/access/accpage.cxx @@ -66,7 +66,7 @@ void SwAccessiblePage::InvalidateCursorPos_() bool bOldSelected; { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); bOldSelected = m_bIsSelected; m_bIsSelected = bNewSelected; } @@ -96,7 +96,7 @@ void SwAccessiblePage::InvalidateFocus_() bool bSelected; { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); bSelected = m_bIsSelected; } OSL_ENSURE( bSelected, "focus object should be selected" ); @@ -125,7 +125,7 @@ SwAccessiblePage::~SwAccessiblePage() bool SwAccessiblePage::HasCursor() { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); return m_bIsSelected; } diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index d079c994dd5e..36a721eb1c64 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -287,7 +287,7 @@ void SwAccessibleParagraph::InvalidateContent_( bool bVisibleDataFired ) m_nHeadingLevel = GetRealHeadingLevel(); bool bOldIsHeading; { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); bOldIsHeading = m_bIsHeading; if( m_bIsHeading != bNewIsHeading ) m_bIsHeading = bNewIsHeading; @@ -308,7 +308,7 @@ void SwAccessibleParagraph::InvalidateContent_( bool bVisibleDataFired ) OUString sNewDesc( GetDescription() ); OUString sOldDesc; { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); sOldDesc = m_sDesc; if( m_sDesc != sNewDesc ) m_sDesc = sNewDesc; @@ -332,7 +332,7 @@ void SwAccessibleParagraph::InvalidateCursorPos_() sal_Int32 nNew = GetCaretPos(); sal_Int32 nOld; { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); nOld = m_nOldCaretPos; m_nOldCaretPos = nNew; } @@ -383,7 +383,7 @@ void SwAccessibleParagraph::InvalidateFocus_() { sal_Int32 nPos; { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); nPos = m_nOldCaretPos; } OSL_ENSURE( nPos != -1, "focus object should be selected" ); @@ -428,7 +428,7 @@ SwAccessibleParagraph::~SwAccessibleParagraph() bool SwAccessibleParagraph::HasCursor() { - osl::MutexGuard aGuard( m_Mutex ); + std::lock_guard aGuard( m_Mutex ); return m_nOldCaretPos != -1; } @@ -707,7 +707,7 @@ OUString SAL_CALL SwAccessibleParagraph::getAccessibleDescription() ThrowIfDisposed(); - osl::MutexGuard aGuard2( m_Mutex ); + std::lock_guard aGuard2( m_Mutex ); if( m_sDesc.isEmpty() ) m_sDesc = GetDescription(); @@ -1016,7 +1016,7 @@ sal_Int32 SwAccessibleParagraph::getCaretPosition() sal_Int32 nRet = GetCaretPos(); { - osl::MutexGuard aOldCaretPosGuard( m_Mutex ); + std::lock_guard aOldCaretPosGuard( m_Mutex ); OSL_ENSURE( nRet == m_nOldCaretPos, "caret pos out of sync" ); m_nOldCaretPos = nRet; } |