summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-08-21 09:26:10 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-08-21 18:49:20 +0200
commit0c7a5e6f419a679afef35cb8b3f203eae9e6231c (patch)
tree1a86e41388452de2f386994a35f99560760ba08d
parent2eb96649c9430256e37fc64fd731831d556894ea (diff)
wina11y: Drop AccObjectWinManager::GetRole
For the only in `AccObjectWinManager::InsertAccObj`, there's already a reference to the `XAccessibleContext`, so just call `XAccessibleContext::getAccessibleRole` directly. Change-Id: I9e0a96d67ac8550b4988de6c3cefc8d6e0b319ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172181 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r--winaccessibility/inc/AccObjectWinManager.hxx2
-rw-r--r--winaccessibility/source/service/AccObjectWinManager.cxx13
2 files changed, 1 insertions, 14 deletions
diff --git a/winaccessibility/inc/AccObjectWinManager.hxx b/winaccessibility/inc/AccObjectWinManager.hxx
index a910fc71341b..9a6b9f0fe243 100644
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -129,8 +129,6 @@ public:
void UpdateChildState(css::accessibility::XAccessible* pXAcc);
- static short GetRole(css::accessibility::XAccessible* pXAcc);
-
css::accessibility::XAccessible* GetAccDocByAccTopWin( css::accessibility::XAccessible* pXAcc );
bool IsTopWinAcc( css::accessibility::XAccessible* pXAcc );
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
index f3a8ba9d2068..bf3c63825903 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -589,7 +589,7 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX
return false;
{
- short nCurRole = GetRole(pXAcc);
+ short nCurRole = pRContext->getAccessibleRole();
std::scoped_lock l(m_Mutex);
@@ -1034,17 +1034,6 @@ void AccObjectWinManager::UpdateChildState(css::accessibility::XAccessible* pAcc
}
}
-short AccObjectWinManager::GetRole(css::accessibility::XAccessible* pXAcc)
-{
- assert(pXAcc != nullptr);
- Reference<css::accessibility::XAccessibleContext> xContext = pXAcc->getAccessibleContext();
- if(xContext.is())
- {
- return xContext->getAccessibleRole();
- }
- return -1;
-}
-
XAccessible* AccObjectWinManager::GetAccDocByHWND(HWND pWnd)
{
XHWNDToDocumentHash::iterator aIter;