winaccessibility: remove GetXAccByAccObj()
It is pointlessly slow and the AccObject has a method for that. Change-Id: I7ba1cc853255ac3b3b5008657d1cc79efc3a3f4b
This commit is contained in:
@@ -79,7 +79,8 @@ public:
|
||||
void UpdateDefaultAction();
|
||||
|
||||
IMAccessible* GetIMAccessible(); //return COM interface in acc object
|
||||
::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > GetXAccessible();
|
||||
::com::sun::star::uno::Reference<
|
||||
::com::sun::star::accessibility::XAccessible> const& GetXAccessible();
|
||||
|
||||
void SetResID(long id);//ResID means ChildID in MSAA
|
||||
long GetResID();
|
||||
|
@@ -78,8 +78,6 @@ private:
|
||||
long ImpleGenerateResID();
|
||||
AccObject* GetAccObjByXAcc( com::sun::star::accessibility::XAccessible* pXAcc);
|
||||
|
||||
com::sun::star::accessibility::XAccessible* GetXAccByAccObj(AccObject* pAccObj);
|
||||
|
||||
AccObject* GetTopWindowAccObj(HWND hWnd);
|
||||
|
||||
com::sun::star::accessibility::XAccessible* GetAccDocByHWND(HWND hWnd);
|
||||
|
@@ -1152,7 +1152,7 @@ IMAccessible* AccObject::GetIMAccessible()
|
||||
return m_pIMAcc;
|
||||
}
|
||||
|
||||
Reference < XAccessible > AccObject::GetXAccessible()
|
||||
Reference<XAccessible> const& AccObject::GetXAccessible()
|
||||
{
|
||||
return m_xAccRef;
|
||||
}
|
||||
|
@@ -172,24 +172,6 @@ AccObject* AccObjectWinManager::GetAccObjByXAcc( XAccessible* pXAcc)
|
||||
return &(pIndTemp->second);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search XAccessible by AccObject pointer from our container.
|
||||
* @param pAccObj AccObject pointer.
|
||||
* @return Pointer of XAccessible Interface.
|
||||
*/
|
||||
XAccessible* AccObjectWinManager::GetXAccByAccObj(AccObject* pAccObj)
|
||||
{
|
||||
XIdToAccObjHash::iterator iter = XIdAccList.begin();
|
||||
while(iter!=XIdAccList.end())
|
||||
{
|
||||
AccObject* tmp = &(iter->second);
|
||||
if(tmp== pAccObj)
|
||||
return (XAccessible*)(iter->first);
|
||||
++iter;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* get acc object of top window by its handle
|
||||
* @param hWnd, top window handle
|
||||
@@ -563,7 +545,6 @@ void AccObjectWinManager::DeleteChildrenAccObj(XAccessible* pXAcc)
|
||||
{
|
||||
AccObject* currentObj=NULL;
|
||||
AccObject* childObj=NULL;
|
||||
XAccessible* pTmpXAcc=NULL;
|
||||
|
||||
currentObj = GetAccObjByXAcc( pXAcc);
|
||||
if(currentObj)
|
||||
@@ -571,7 +552,7 @@ void AccObjectWinManager::DeleteChildrenAccObj(XAccessible* pXAcc)
|
||||
childObj = currentObj->NextChild();
|
||||
while(childObj)
|
||||
{
|
||||
pTmpXAcc = GetXAccByAccObj(childObj);
|
||||
XAccessible *const pTmpXAcc = childObj->GetXAccessible().get();
|
||||
if(pTmpXAcc)
|
||||
{
|
||||
DeleteChildrenAccObj(pTmpXAcc);
|
||||
|
Reference in New Issue
Block a user