winaccessibility/source/service/AccObject.cxx | 2 -- winaccessibility/source/service/AccTopWindowListener.cxx | 11 +++-------- 2 files changed, 3 insertions(+), 10 deletions(-)
New commits: commit 8370d441cd0719e8580937aca3c151d2eb1b3d70 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Aug 20 13:57:27 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Aug 21 07:47:29 2024 +0200 wina11y: Don't set a11y name that gets overwritten right away It's unclear to me why an a11y object of a TEXT_FRAME role with a SCROLL_PANE parent should be treated specially and use the a11y name of its parent. But the a11y name set this way is unconditionally overwritten right away in the lines below anyway. Therefore, just drop the special handling. Change-Id: I3cfe63e0882803524f51fe760d38880b30105317 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172122 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index c7003568324b..dd9144504ea7 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -368,8 +368,6 @@ void AccObject::UpdateName( ) return; } - if( ( TEXT_FRAME == m_accRole ) && ( m_pParentObj !=nullptr )&& ( SCROLL_PANE == m_pParentObj -> m_accRole ) ) - m_pIMAcc->Put_XAccName( o3tl::toW(m_pParentObj->m_xAccContextRef->getAccessibleName().getStr()) ); //IAccessibility2 Implementation 2009----- if (m_accRole == AccessibleRole::PARAGRAPH || m_accRole == AccessibleRole::BLOCK_QUOTE) { commit d02d8cf8957c08f479f612ffe3f731b8be46219c Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Aug 20 13:40:00 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Aug 21 07:47:20 2024 +0200 wina11y: Just use ref instead of having extra pointer var The extra null check for the pointer is also redundant, as there is a check for `xContext.is()` just above it. Change-Id: I9c0d0ab95c3031d8560506691e78e7994c5dce95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172121 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/winaccessibility/source/service/AccTopWindowListener.cxx b/winaccessibility/source/service/AccTopWindowListener.cxx index 0f403f3969d6..3d51db848ece 100644 --- a/winaccessibility/source/service/AccTopWindowListener.cxx +++ b/winaccessibility/source/service/AccTopWindowListener.cxx @@ -132,11 +132,6 @@ void AccTopWindowListener::AddAllListeners(css::accessibility::XAccessible* pAcc { return; } - css::accessibility::XAccessibleContext* pAccessibleContext = xContext.get(); - if(pAccessibleContext == nullptr) - { - return; - } m_aAccObjectManager.InsertAccObj(pAccessible, pParentXAcc, pWND); @@ -146,7 +141,7 @@ void AccTopWindowListener::AddAllListeners(css::accessibility::XAccessible* pAcc } - short role = pAccessibleContext->getAccessibleRole(); + short role = xContext->getAccessibleRole(); if(css::accessibility::AccessibleRole::DOCUMENT == role || css::accessibility::AccessibleRole::DOCUMENT_PRESENTATION == role || css::accessibility::AccessibleRole::DOCUMENT_SPREADSHEET == role || @@ -158,11 +153,11 @@ void AccTopWindowListener::AddAllListeners(css::accessibility::XAccessible* pAcc } } - sal_Int64 nCount = pAccessibleContext->getAccessibleChildCount(); + sal_Int64 nCount = xContext->getAccessibleChildCount(); for (sal_Int64 i = 0; i < nCount; i++) { Reference<css::accessibility::XAccessible> xAccessible - = pAccessibleContext->getAccessibleChild(i); + = xContext->getAccessibleChild(i); if (xAccessible.is()) AddAllListeners(xAccessible.get(), pAccessible, pWND);