diff options
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/inc/AccObjectWinManager.hxx | 1 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObjectWinManager.cxx | 79 |
2 files changed, 0 insertions, 80 deletions
diff --git a/winaccessibility/inc/AccObjectWinManager.hxx b/winaccessibility/inc/AccObjectWinManager.hxx index f1adfb0dc9d0..6ca9319f82a0 100644 --- a/winaccessibility/inc/AccObjectWinManager.hxx +++ b/winaccessibility/inc/AccObjectWinManager.hxx @@ -96,7 +96,6 @@ private: static void InsertAccChildNode(AccObject* pCurObj,AccObject* pParentObj,HWND pWnd); static void DeleteAccChildNode(AccObject* pChild); void DeleteFromHwndXAcc(css::accessibility::XAccessible const * pXAcc ); - int UpdateAccSelection(css::accessibility::XAccessible* pXAcc); ::rtl::Reference<AccEventListener> CreateAccEventListener( css::accessibility::XAccessible* pXAcc); 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 |