summaryrefslogtreecommitdiff
path: root/winaccessibility/source/service/AccObjectWinManager.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-08-31 15:50:36 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2022-08-31 23:37:56 +0200
commit58649c1db48b888f7ce4946ca92895fa0bc63349 (patch)
treef1e5747768d93d466f942c4656477c8f72d8b567 /winaccessibility/source/service/AccObjectWinManager.cxx
parent0fa5b4e03ed981cd79ac9af57e616714fc41b685 (diff)
wina11y: Drop unused AccObjectWinManager::UpdateAccSelection
It was already unused when it was added in commit a18bdb3bc05e761704cc345a66a9d642bc4f4a0a Date: Thu Nov 14 08:18:05 2013 +0000 Integrate branch of IAccessible2 `CMAccessible::get_accSelection` already queries information on demand. The dropped method looks like another one of the methods that could be used for manual bookkeeping of information instead of querying them from the underlying UNO interfaces on demand. But retrieving them on demand seems preferable, s.a. the commit message in commit fcf4a26275d7503835f9aa23cb94938809840300 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Jan 5 13:41:53 2022 +0000 tdf#146306 wina11y: Retrieve accessible desc on demand > Querying up-to-date values from the underlying > UNO interfaces on demand instead of doing extra > manual bookkeeping in the winaccessibility code > may be possible for more a11y attributes in addition > to the accessible description handled in this commit, > but each one will have to be looked at separately. Change-Id: I49bfddb636721d9142a88b7ce1eb3ee3a2f9c695 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139123 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility/source/service/AccObjectWinManager.cxx')
-rw-r--r--winaccessibility/source/service/AccObjectWinManager.cxx79
1 files changed, 0 insertions, 79 deletions
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
index 8349d5c863cd..c404223fb73a 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -368,85 +368,6 @@ void AccObjectWinManager::UpdateAccFocus(XAccessible* newFocus)
}
/**
- * Update selected object by new focused XAccessible interface.
- * @param pXAcc XAccessible interface that has selected child changed.
- * @return Selected children count.
- */
-int AccObjectWinManager::UpdateAccSelection(XAccessible* pXAcc)
-{
- Reference< XAccessibleContext > pRContext;
-
- if( pXAcc == nullptr)
- return 0;
-
- pRContext = pXAcc->getAccessibleContext();
- if( !pRContext.is() )
- return 0;
-
- Reference< XAccessibleSelection > pRSelection(pRContext,UNO_QUERY);
- if( !pRSelection.is() )
- return 0;
-
- AccObject* pAccObj = GetAccObjByXAcc(pXAcc);
- if(pAccObj==nullptr)
- return 0;
-
- Reference<XAccessible> pRChild;
- AccObject* pAccChildObj = nullptr;
- int selectNum= pRSelection->getSelectedAccessibleChildCount();
-
- IAccSelectionList oldSelection = pAccObj->GetSelection();
-
- if(selectNum > 4)//for selected.
- return selectNum;
- if(selectNum == 1 && oldSelection.size() == 0)
- return 1;
-
- for (int i=0;i<selectNum;i++)
- {
- pRChild = pRSelection->getSelectedAccessibleChild(i);
- if(!pRChild.is())
- {
- continue;
- }
- Reference<XAccessibleContext> pRChildContext = pRChild->getAccessibleContext();
- if(!pRChildContext.is())
- {
- continue;
- }
- long index = pRChildContext->getAccessibleIndexInParent();
- IAccSelectionList::iterator temp = oldSelection.find(index);
- if ( temp != oldSelection.end() )
- {
- oldSelection.erase(index);
- continue;
- }
-
- pAccChildObj = GetAccObjByXAcc(pRChild.get());
- if(!pAccChildObj)
- {
- InsertAccObj(pRChild.get(), pXAcc,pAccObj->GetParentHWND());
- pAccChildObj = GetAccObjByXAcc(pRChild.get());
- }
-
- pAccObj->AddSelect(index, pAccChildObj);
-
- if(pAccChildObj != nullptr)
- NotifyWinEvent(EVENT_OBJECT_SELECTIONADD,pAccObj->GetParentHWND(), OBJID_CLIENT,pAccChildObj->GetResID());
- }
-
- for (const auto& rEntry : oldSelection)
- {
- pAccObj->GetSelection().erase(rEntry.first);
- pAccChildObj = rEntry.second;
- if(pAccChildObj != nullptr)
- NotifyWinEvent(EVENT_OBJECT_SELECTIONREMOVE,pAccObj->GetParentHWND(), OBJID_CLIENT,pAccChildObj->GetResID());
- }
- return 0;
-
-}
-
-/**
* Delete child element from children list.
* @param pObj Child element that should be removed from parent child list.
* @return