summaryrefslogtreecommitdiff
path: root/winaccessibility
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-11-26 15:48:30 +0100
committerMichael Stahl <mstahl@redhat.com>2013-11-28 00:59:49 +0100
commit887cf7ccc6c2cfc8652d646e15678c1c10155987 (patch)
tree0fcfc8e570b526612e43e956640bce6919dc805b /winaccessibility
parentb24957e81237a77b69e023e66324f13189307310 (diff)
winaccessibility: don't store XAccessible* in AccDescendant...Listener
Seems safer to store a Reference Change-Id: I86ef9d18c03b2a58058d38e2ae43553ecd2c7be6
Diffstat (limited to 'winaccessibility')
-rw-r--r--winaccessibility/inc/AccDescendantManagerEventListener.hxx4
-rw-r--r--winaccessibility/source/service/AccDescendantManagerEventListener.cxx5
-rw-r--r--winaccessibility/source/service/AccListEventListener.cxx3
-rw-r--r--winaccessibility/source/service/AccTreeEventListener.cxx2
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)