diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-11-26 15:48:30 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-11-28 00:59:49 +0100 |
commit | 887cf7ccc6c2cfc8652d646e15678c1c10155987 (patch) | |
tree | 0fcfc8e570b526612e43e956640bce6919dc805b /winaccessibility | |
parent | b24957e81237a77b69e023e66324f13189307310 (diff) |
winaccessibility: don't store XAccessible* in AccDescendant...Listener
Seems safer to store a Reference
Change-Id: I86ef9d18c03b2a58058d38e2ae43553ecd2c7be6
Diffstat (limited to 'winaccessibility')
4 files changed, 8 insertions, 6 deletions
diff --git a/winaccessibility/inc/AccDescendantManagerEventListener.hxx b/winaccessibility/inc/AccDescendantManagerEventListener.hxx index bb5add64689f..3e7bedf353cc 100644 --- a/winaccessibility/inc/AccDescendantManagerEventListener.hxx +++ b/winaccessibility/inc/AccDescendantManagerEventListener.hxx @@ -34,7 +34,9 @@ class AccDescendantManagerEventListener: public AccComponentEventListener { protected: - ::com::sun::star::accessibility::XAccessible* pActiveDescendant; + ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible > m_xActiveDescendant; + public: AccDescendantManagerEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent); virtual ~AccDescendantManagerEventListener(); diff --git a/winaccessibility/source/service/AccDescendantManagerEventListener.cxx b/winaccessibility/source/service/AccDescendantManagerEventListener.cxx index 6db2bc04bd54..0c00da3a471a 100644 --- a/winaccessibility/source/service/AccDescendantManagerEventListener.cxx +++ b/winaccessibility/source/service/AccDescendantManagerEventListener.cxx @@ -33,8 +33,7 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; AccDescendantManagerEventListener::AccDescendantManagerEventListener(com::sun::star::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent) - :AccComponentEventListener(pAcc, Agent), - pActiveDescendant(NULL) + : AccComponentEventListener(pAcc, Agent) { } @@ -167,7 +166,7 @@ void AccDescendantManagerEventListener::HandleChildChangedNoFocusEvent(Any oldVa pAgent->InsertAccObj(pAcc,pAccessible); pAgent->InsertChildrenAccObj(pAcc); - pActiveDescendant= pAcc; + m_xActiveDescendant = xChild; } } if (oldValue >>= xChild) diff --git a/winaccessibility/source/service/AccListEventListener.cxx b/winaccessibility/source/service/AccListEventListener.cxx index aa3a0a1c9772..99b5be928fac 100644 --- a/winaccessibility/source/service/AccListEventListener.cxx +++ b/winaccessibility/source/service/AccListEventListener.cxx @@ -94,7 +94,8 @@ void AccListEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any pAgent->IncreaseState( pAcc, AccessibleStateType::FOCUSED); pAgent->NotifyAccEvent(UM_EVENT_ACTIVE_DESCENDANT_CHANGED, pAcc); - pActiveDescendant= pAcc; + + m_xActiveDescendant = xChild; } } if (oldValue >>= xChild) diff --git a/winaccessibility/source/service/AccTreeEventListener.cxx b/winaccessibility/source/service/AccTreeEventListener.cxx index 6a66356b61d6..374ca155128c 100644 --- a/winaccessibility/source/service/AccTreeEventListener.cxx +++ b/winaccessibility/source/service/AccTreeEventListener.cxx @@ -73,7 +73,7 @@ void AccTreeEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any XAccessible* pAcc = xChild.get(); pAgent->InsertAccObj(pAcc,pAccessible); pAgent->NotifyAccEvent(UM_EVENT_ACTIVE_DESCENDANT_CHANGED, pAcc); - pActiveDescendant = pAcc; + m_xActiveDescendant = xChild; } } if (oldValue >>= xChild) |