sw/source/core/access/acccontext.hxx | 3 +-- sw/source/core/access/accmap.cxx | 12 +++++------- 2 files changed, 6 insertions(+), 9 deletions(-)
New commits: commit 77f178ff039aab0ba1fbb3e6732f0c9637bda05c Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Apr 14 15:53:14 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Apr 15 08:08:00 2025 +0200 sw a11y: Drop superfluous comment Explicitly saying that this is always an SwAccessibleContext is unnecessary since the type makes that clear since commit b34c7530a178a61f2f21150f59e7ed01571233c2 Date: Mon Sep 16 11:34:40 2024 +0200 use more concrete UNO types in SwAccessibleContext Change-Id: Ideda7b8cf11855c120afd99f003e94ad34fc4f0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184167 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index ef2b781e5f5e..7eda05bd1e8a 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -66,8 +66,7 @@ protected: private: OUString m_sName; // immutable outside constructor - // The parent if it has been retrieved. This is always an - // SwAccessibleContext. (protected by Mutex) + // The parent if it has been retrieved. (protected by Mutex) unotools::WeakReference< SwAccessibleContext > m_xWeakParent; SwAccessibleMap *m_pMap; // must be protected by solar mutex commit 105b7d4201fc3c6cfac7d2146710c0703aea72f5 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Apr 14 15:32:58 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Apr 15 08:07:50 2025 +0200 sw a11y: Get rid of static_cast Call SwAccessibleMap::GetContextImpl instead of SwAccessibleMap::GetContext, which already returns a SwAccessibleContext, so there's no need to static_cast to that from XAccessible. Change-Id: Idbc89bfdc454cf3448c891c9e46936e31274f64a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184164 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 8b8e5180a17c..75e11394f5a5 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -2654,20 +2654,18 @@ void SwAccessibleMap::InvalidateEditableStates( const SwFrame* _pFrame ) if( !aFrameOrObj.GetSwFrame() ) aFrameOrObj = GetShell()->GetLayout(); - uno::Reference< XAccessible > xAcc( GetContext( aFrameOrObj.GetSwFrame() ) ); - SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() ); + rtl::Reference<SwAccessibleContext> xAccImpl = GetContextImpl(aFrameOrObj.GetSwFrame()); if( GetShell()->ActionPend() ) { - SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::CARET_OR_STATES, - pAccImpl, - SwAccessibleChild(pAccImpl->GetFrame()), - AccessibleStates::EDITABLE ); + SwAccessibleEvent_Impl aEvent(SwAccessibleEvent_Impl::CARET_OR_STATES, xAccImpl.get(), + SwAccessibleChild(xAccImpl->GetFrame()), + AccessibleStates::EDITABLE); AppendEvent( aEvent ); } else { FireEvents(); - pAccImpl->InvalidateStates( AccessibleStates::EDITABLE ); + xAccImpl->InvalidateStates(AccessibleStates::EDITABLE); } }