diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-11-26 23:29:50 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-11-28 14:37:06 +0100 |
commit | c064e7f3b46d2e579ca4402f9cb5b7aba824fd0c (patch) | |
tree | f1b27e5bb469f3cf785fb36b618b2e4449fa3325 /winaccessibility | |
parent | d0b5b9ca886fe4a518ae86f5799fd5b1f17e4c38 (diff) |
winaccessibility: remove GetXAccByAccObj()
It is pointlessly slow and the AccObject has a method for that.
(cherry picked from commit e094d6fab61de95adb53759d69aad2447560581c)
Conflicts:
winaccessibility/source/service/AccObjectWinManager.cxx
Change-Id: I7ba1cc853255ac3b3b5008657d1cc79efc3a3f4b
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/inc/AccObject.hxx | 3 | ||||
-rw-r--r-- | winaccessibility/inc/AccObjectWinManager.hxx | 2 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObject.cxx | 2 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObjectWinManager.cxx | 21 |
4 files changed, 4 insertions, 24 deletions
diff --git a/winaccessibility/inc/AccObject.hxx b/winaccessibility/inc/AccObject.hxx index 934b95db1297..d7ea3d42c9c1 100644 --- a/winaccessibility/inc/AccObject.hxx +++ b/winaccessibility/inc/AccObject.hxx @@ -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(); diff --git a/winaccessibility/inc/AccObjectWinManager.hxx b/winaccessibility/inc/AccObjectWinManager.hxx index afe4fe0adbc8..f58a858d7c2d 100644 --- a/winaccessibility/inc/AccObjectWinManager.hxx +++ b/winaccessibility/inc/AccObjectWinManager.hxx @@ -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); diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 3b8fedd4ed25..8c8649848cdf 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -1160,7 +1160,7 @@ IMAccessible* AccObject::GetIMAccessible() return m_pIMAcc; } -Reference < XAccessible > AccObject::GetXAccessible() +Reference<XAccessible> const& AccObject::GetXAccessible() { return m_xAccRef; } diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index 7bd1856592a9..4bcc8dfec140 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -173,24 +173,6 @@ AccObject* AccObjectWinManager::GetAccObjByXAcc( XAccessible* pXAcc) } /** - * 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 * @return pointer to AccObject @@ -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); |