summaryrefslogtreecommitdiff
path: root/winaccessibility/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-11-26 20:30:52 +0100
committerMichael Stahl <mstahl@redhat.com>2013-11-28 00:59:51 +0100
commit83ccdb028529e85fe4c06a47ca57a4a5eeeed159 (patch)
tree944cff9c7bd31fe18adff576039dbccf4d36908e /winaccessibility/source
parentef3f28d0ce641e9d51d91412b176a1ecbdc69773 (diff)
winaccessibility: use uno::Reference in AccEventListener
... and clear it in disposing(). Change-Id: I69cfe3cdcf6549a0471453960d1f935d9c3b7a0d
Diffstat (limited to 'winaccessibility/source')
-rw-r--r--winaccessibility/source/service/AccComponentEventListener.cxx92
-rw-r--r--winaccessibility/source/service/AccContainerEventListener.cxx102
-rw-r--r--winaccessibility/source/service/AccDescendantManagerEventListener.cxx15
-rw-r--r--winaccessibility/source/service/AccDialogEventListener.cxx6
-rw-r--r--winaccessibility/source/service/AccEventListener.cxx61
-rw-r--r--winaccessibility/source/service/AccFrameEventListener.cxx9
-rw-r--r--winaccessibility/source/service/AccListEventListener.cxx5
-rw-r--r--winaccessibility/source/service/AccMenuEventListener.cxx11
-rw-r--r--winaccessibility/source/service/AccObjectContainerEventListener.cxx5
-rw-r--r--winaccessibility/source/service/AccParagraphEventListener.cxx10
-rw-r--r--winaccessibility/source/service/AccTableEventListener.cxx22
-rw-r--r--winaccessibility/source/service/AccTreeEventListener.cxx2
-rw-r--r--winaccessibility/source/service/AccWindowEventListener.cxx10
13 files changed, 169 insertions, 181 deletions
diff --git a/winaccessibility/source/service/AccComponentEventListener.cxx b/winaccessibility/source/service/AccComponentEventListener.cxx
index 1672c2007298..4a60dd771191 100644
--- a/winaccessibility/source/service/AccComponentEventListener.cxx
+++ b/winaccessibility/source/service/AccComponentEventListener.cxx
@@ -93,8 +93,8 @@ throw (::com::sun::star::uno::RuntimeException)
*/
void AccComponentEventListener::HandleValueChangedEvent(Any oldValue, Any newValue)
{
- pAgent->UpdateValue(pAccessible);
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, pAccessible);
+ pAgent->UpdateValue(m_xAccessible.get());
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, m_xAccessible.get());
}
/**
@@ -102,8 +102,8 @@ void AccComponentEventListener::HandleValueChangedEvent(Any oldValue, Any newVal
*/
void AccComponentEventListener::HandleActionChangedEvent()
{
- pAgent->UpdateAction(pAccessible);
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_DEFACTIONCHANGE, pAccessible);
+ pAgent->UpdateAction(m_xAccessible.get());
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_DEFACTIONCHANGE, m_xAccessible.get());
}
/**
@@ -114,8 +114,8 @@ void AccComponentEventListener::HandleActionChangedEvent()
*/
void AccComponentEventListener::HandleTextChangedEvent(Any oldValue, Any newValue)
{
- pAgent->UpdateValue(pAccessible, newValue);
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, pAccessible);
+ pAgent->UpdateValue(m_xAccessible.get(), newValue);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, m_xAccessible.get());
}
/**
@@ -126,7 +126,7 @@ void AccComponentEventListener::HandleTextChangedEvent(Any oldValue, Any newValu
*/
void AccComponentEventListener::HandleCaretChangedEvent(Any oldValue, Any newValue)
{
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_CARETCHANGE, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_CARETCHANGE, m_xAccessible.get());
}
/**
@@ -153,13 +153,13 @@ void AccComponentEventListener::SetComponentState(short state, bool enable)
{
if(enable)
{
- pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE);
- pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE);
}
else
{
- pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE);
- pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE);
}
}
else
@@ -173,20 +173,20 @@ void AccComponentEventListener::SetComponentState(short state, bool enable)
case AccessibleStateType::ENABLED:
if(enable)
{
- pAgent->UpdateState(pAccessible);
- pAgent->DecreaseState( pAccessible, AccessibleStateType::DEFUNC);
+ pAgent->UpdateState(m_xAccessible.get());
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC);
// 8. label should have no FOCUSABLE state state, Firefox has READONLY state, we can also have.
if ( GetRole() != AccessibleRole::LABEL
&& GetRole() != AccessibleRole::SCROLL_BAR)
{
- pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE);
}
}
else
{
- pAgent->UpdateState(pAccessible);
- pAgent->IncreaseState( pAccessible, AccessibleStateType::DEFUNC);
- pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
+ pAgent->UpdateState(m_xAccessible.get());
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE);
}
break;
case AccessibleStateType::ACTIVE:
@@ -213,33 +213,33 @@ void AccComponentEventListener::FireStatePropertyChange(short state, bool set)
{
case AccessibleStateType::CHECKED:
case AccessibleStateType::INDETERMINATE:
- pAgent->IncreaseState( pAccessible, state);
- pAgent->UpdateAction( pAccessible );
+ pAgent->IncreaseState(m_xAccessible.get(), state);
+ pAgent->UpdateAction(m_xAccessible.get());
- if(!pAgent->IsSpecialToolboItem(pAccessible))
+ if(!pAgent->IsSpecialToolboItem(m_xAccessible.get()))
{
- pAgent->NotifyAccEvent(UM_EVENT_STATE_CHECKED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_CHECKED, m_xAccessible.get());
}
break;
case AccessibleStateType::PRESSED:
- pAgent->IncreaseState( pAccessible, state);
- pAgent->NotifyAccEvent(UM_EVENT_STATE_PRESSED, pAccessible);
+ pAgent->IncreaseState(m_xAccessible.get(), state);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_PRESSED, m_xAccessible.get());
break;
case AccessibleStateType::SELECTED:
- pAgent->IncreaseState( pAccessible, state);
+ pAgent->IncreaseState(m_xAccessible.get(), state);
break;
case AccessibleStateType::ARMED:
- pAgent->IncreaseState( pAccessible, state);
- pAgent->NotifyAccEvent(UM_EVENT_STATE_ARMED, pAccessible);
+ pAgent->IncreaseState(m_xAccessible.get(), state);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_ARMED, m_xAccessible.get());
break;
case AccessibleStateType::SHOWING:
- pAgent->DecreaseState( pAccessible, AccessibleStateType::DEFUNC);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC);
// UNO !SHOWING == MSAA OFFSCREEN
- pAgent->IncreaseState( pAccessible, AccessibleStateType::SHOWING );
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING );
break;
case AccessibleStateType::VISIBLE:
// UNO !VISIBLE == MSAA INVISIBLE
- pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE );
break;
default:
break;
@@ -252,38 +252,38 @@ void AccComponentEventListener::FireStatePropertyChange(short state, bool set)
{
case AccessibleStateType::CHECKED:
case AccessibleStateType::INDETERMINATE:
- pAgent->DecreaseState( pAccessible, state );
- pAgent->UpdateAction( pAccessible );
+ pAgent->DecreaseState(m_xAccessible.get(), state);
+ pAgent->UpdateAction(m_xAccessible.get());
- if(!pAgent->IsSpecialToolboItem(pAccessible))
+ if(!pAgent->IsSpecialToolboItem(m_xAccessible.get()))
{
- pAgent->NotifyAccEvent(UM_EVENT_STATE_CHECKED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_CHECKED, m_xAccessible.get());
}
break;
case AccessibleStateType::PRESSED:
- pAgent->DecreaseState( pAccessible, state );
- pAgent->NotifyAccEvent(UM_EVENT_STATE_PRESSED, pAccessible);
+ pAgent->DecreaseState(m_xAccessible.get(), state);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_PRESSED, m_xAccessible.get());
break;
case AccessibleStateType::SELECTED:
- pAgent->DecreaseState( pAccessible, state );
+ pAgent->DecreaseState(m_xAccessible.get(), state);
//if the state is unset, no need to send MSAA SELECTION event
- //pAgent->NotifyAccEvent(UM_EVENT_STATE_SELECTED, pAccessible);
+ //pAgent->NotifyAccEvent(UM_EVENT_STATE_SELECTED, m_xAccessible.get());
break;
case AccessibleStateType::ARMED:
{
- pAgent->DecreaseState( pAccessible, state);
+ pAgent->DecreaseState(m_xAccessible.get(), state);
//if the state is unset, no need to send MSAA MENU event
- //pAgent->NotifyAccEvent(UM_EVENT_STATE_ARMED, pAccessible);
+ //pAgent->NotifyAccEvent(UM_EVENT_STATE_ARMED, m_xAccessible.get());
}
break;
case AccessibleStateType::SHOWING:
- pAgent->DecreaseState( pAccessible, AccessibleStateType::DEFUNC);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC);
// UNO !SHOWING == MSAA OFFSCREEN
- pAgent->DecreaseState( pAccessible, AccessibleStateType::SHOWING );
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING);
break;
case AccessibleStateType::VISIBLE:
// UNO !VISIBLE == MSAA INVISIBLE
- pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
break;
default:
@@ -302,24 +302,24 @@ void AccComponentEventListener::FireStateFocusedChange(bool enable)
if(enable)
{
if (GetParentRole() != AccessibleRole::COMBO_BOX)
- pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, m_xAccessible.get());
}
else
{
//if lose focus, no need to send MSAA FOCUS event
- pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED);
}
}
void AccComponentEventListener::HandleSelectionChangedEventNoArgs()
{
- pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, m_xAccessible.get());
}
//add TEXT_SELECTION_CHANGED event
void AccComponentEventListener::HandleTextSelectionChangedEvent()
{
- pAgent->NotifyAccEvent(UM_EVENT_TEXT_SELECTION_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_TEXT_SELECTION_CHANGED, m_xAccessible.get());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/source/service/AccContainerEventListener.cxx b/winaccessibility/source/service/AccContainerEventListener.cxx
index 8cb93c446f18..affaca2613db 100644
--- a/winaccessibility/source/service/AccContainerEventListener.cxx
+++ b/winaccessibility/source/service/AccContainerEventListener.cxx
@@ -131,7 +131,7 @@ void AccContainerEventListener::HandleChildChangedEvent(Any oldValue, Any newVal
XAccessible* pAcc = xChild.get();
//add this child
- if(pAgent->InsertAccObj( pAcc,pAccessible))
+ if (pAgent->InsertAccObj(pAcc, m_xAccessible.get()))
{
//add all oldValue's existing children
pAgent->InsertChildrenAccObj(pAcc);
@@ -174,7 +174,7 @@ void AccContainerEventListener::HandleSelectionChangedEvent(const Any& /*oldValu
//menu bar does not process selection change event,just same as word behavior
if (GetRole()!=AccessibleRole::MENU_BAR)
- pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, m_xAccessible.get());
}
/**
@@ -183,13 +183,13 @@ void AccContainerEventListener::HandleSelectionChangedEvent(const Any& /*oldValu
void AccContainerEventListener::HandleAllChildrenChangedEvent()
{
//TODO: update all the children
- if( pAccessible )
+ if (m_xAccessible.is())
{
//delete all oldValue's existing children
- pAgent->DeleteChildrenAccObj( pAccessible );
+ pAgent->DeleteChildrenAccObj(m_xAccessible.get());
//add all oldValue's existing children
- pAgent->InsertChildrenAccObj( pAccessible );
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_REORDER , pAccessible);
+ pAgent->InsertChildrenAccObj(m_xAccessible.get());
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_REORDER , m_xAccessible.get());
}
}
@@ -198,8 +198,8 @@ void AccContainerEventListener::HandleAllChildrenChangedEvent()
*/
void AccContainerEventListener::HandleTextChangedEvent(Any oldValue, Any newValue)
{
- pAgent->UpdateValue(pAccessible, newValue);
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_TEXTCHANGE, pAccessible);
+ pAgent->UpdateValue(m_xAccessible.get(), newValue);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_TEXTCHANGE, m_xAccessible.get());
}
/**
@@ -228,19 +228,19 @@ void AccContainerEventListener::SetComponentState(short state, bool enable )
case AccessibleStateType::ENABLED:
if(enable)
{
- pAgent->DecreaseState( pAccessible, AccessibleStateType::DEFUNC);
- pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
- pAgent->UpdateState(pAccessible);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC);
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE);
+ pAgent->UpdateState(m_xAccessible.get());
- UpdateAllChildrenState(pAccessible);
+ UpdateAllChildrenState(m_xAccessible.get());
}
else
{
- pAgent->IncreaseState( pAccessible, AccessibleStateType::DEFUNC);
- pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSABLE);
- pAgent->UpdateState(pAccessible);
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE);
+ pAgent->UpdateState(m_xAccessible.get());
- UpdateAllChildrenState(pAccessible);
+ UpdateAllChildrenState(m_xAccessible.get());
}
break;
case AccessibleStateType::ACTIVE:
@@ -251,12 +251,12 @@ void AccContainerEventListener::SetComponentState(short state, bool enable )
{
if (!enable) /* get the active state */
{
- pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED);
}
else /* lose the active state */
{
- pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED);
}
}
break;
@@ -265,8 +265,8 @@ void AccContainerEventListener::SetComponentState(short state, bool enable )
case AccessibleStateType::COLLAPSE:
case AccessibleStateType::CHECKED:
{
- pAgent->UpdateState(pAccessible);
- pAgent->NotifyAccEvent(UM_EVENT_STATE_BUSY, pAccessible);
+ pAgent->UpdateState(m_xAccessible.get());
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_BUSY, m_xAccessible.get());
break;
}
@@ -288,22 +288,22 @@ void AccContainerEventListener::FireStatePropertyChange(short state, bool set)
switch(state)
{
case AccessibleStateType::SELECTED:
- pAgent->IncreaseState( pAccessible, state);
+ pAgent->IncreaseState(m_xAccessible.get(), state);
break;
case AccessibleStateType::INDETERMINATE:
case AccessibleStateType::BUSY:
case AccessibleStateType::FOCUSABLE:
case AccessibleStateType::OFFSCREEN:
- pAgent->IncreaseState( pAccessible, state);
- pAgent->NotifyAccEvent(UM_EVENT_STATE_BUSY, pAccessible);
+ pAgent->IncreaseState(m_xAccessible.get(), state);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_BUSY, m_xAccessible.get());
break;
case AccessibleStateType::SHOWING:
// UNO !SHOWING == MSAA OFFSCREEN
- pAgent->IncreaseState( pAccessible, AccessibleStateType::SHOWING );
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING);
break;
case AccessibleStateType::VISIBLE:
// UNO !VISIBLE == MSAA INVISIBLE
- pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
break;
default:
break;
@@ -315,22 +315,22 @@ void AccContainerEventListener::FireStatePropertyChange(short state, bool set)
switch(state)
{
case AccessibleStateType::SELECTED:
- pAgent->DecreaseState( pAccessible, state );
+ pAgent->DecreaseState(m_xAccessible.get(), state);
break;
case AccessibleStateType::BUSY:
case AccessibleStateType::INDETERMINATE:
case AccessibleStateType::FOCUSABLE:
case AccessibleStateType::OFFSCREEN:
- pAgent->DecreaseState( pAccessible, state);
- pAgent->NotifyAccEvent(UM_EVENT_STATE_BUSY, pAccessible);
+ pAgent->DecreaseState(m_xAccessible.get(), state);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_BUSY, m_xAccessible.get());
break;
case AccessibleStateType::SHOWING:
// UNO !SHOWING == MSAA OFFSCREEN
- pAgent->DecreaseState( pAccessible, AccessibleStateType::SHOWING );
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING);
break;
case AccessibleStateType::VISIBLE:
// UNO !VISIBLE == MSAA INVISIBLE
- pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
break;
default:
break;
@@ -346,16 +346,16 @@ void AccContainerEventListener::FireStateFocusedChange(bool enable)
{
if(enable)
{
- pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED);
//if the acc role is MENU_BAR, MSAA UM_EVENT_MENU_START event should be sent
//if the acc role is POPUP_MENU, MSAA UM_EVENT_MENUPOPUPSTART event should be sent
short role = GetRole();
if(role == AccessibleRole::MENU_BAR)
{
- pAgent->NotifyAccEvent(UM_EVENT_MENU_START, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_MENU_START, m_xAccessible.get());
}
else if (role == AccessibleRole::POPUP_MENU)
- pAgent->NotifyAccEvent(UM_EVENT_MENUPOPUPSTART, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_MENUPOPUPSTART, m_xAccessible.get());
//Disable the focused event on option_pane and Panel.
//only disable option_pane for toolbar has panel to get focus
else if (role == AccessibleRole::PANEL || role == AccessibleRole::OPTION_PANE )
@@ -365,16 +365,16 @@ void AccContainerEventListener::FireStateFocusedChange(bool enable)
if (parentRole == AccessibleRole::TOOL_BAR
|| parentRole == AccessibleRole::SCROLL_PANE // sidebar
|| parentRole == AccessibleRole::PANEL) // sidebar
- pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, m_xAccessible.get());
}
//to update ComboBox's description
else if (role == AccessibleRole::COMBO_BOX )
{
- pAgent->UpdateDescription(pAccessible);
+ pAgent->UpdateDescription(m_xAccessible.get());
//for editable combobox, send focus event on only edit control,
bool bSendFocusOnCombobox = true;
//send focused event to the first text child
- Reference<XAccessibleContext> mxContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ Reference<XAccessibleContext> mxContext(m_xAccessible.get()->getAccessibleContext(), UNO_QUERY);
if(mxContext.is())
{
Reference<XAccessible> mxChild = mxContext->getAccessibleChild(0);
@@ -386,7 +386,7 @@ void AccContainerEventListener::FireStateFocusedChange(bool enable)
{
if (IsEditable(mxChildContext))
{
- pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED);
pAgent->IncreaseState( mxChild.get(), AccessibleStateType::FOCUSED);
pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, mxChild.get());
bSendFocusOnCombobox = false;
@@ -395,23 +395,23 @@ void AccContainerEventListener::FireStateFocusedChange(bool enable)
}
}
if (bSendFocusOnCombobox)
- pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, m_xAccessible.get());
}
else
- pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, m_xAccessible.get());
}
else
{
- pAgent->DecreaseState( pAccessible, AccessibleStateType::FOCUSED);
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED);
//if the acc role is MENU_BAR, MSAA UM_EVENT_MENU_END event should be sent
//if the acc role is POPUP_MENU, MSAA UM_EVENT_MENUPOPUPEND event should be sent
if (GetRole() == AccessibleRole::MENU_BAR)
{
- pAgent->NotifyAccEvent(UM_EVENT_MENU_END, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_MENU_END, m_xAccessible.get());
}
else if (GetRole() == AccessibleRole::POPUP_MENU)
{
- pAgent->NotifyAccEvent(UM_EVENT_MENUPOPUPEND, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_MENUPOPUPEND, m_xAccessible.get());
}
}
}
@@ -424,8 +424,8 @@ void AccContainerEventListener::FireStateFocusedChange(bool enable)
*/
void AccContainerEventListener::HandleValueChangedEvent(Any oldValue, Any newValue)
{
- pAgent->UpdateValue(pAccessible);
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, pAccessible);
+ pAgent->UpdateValue(m_xAccessible.get());
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, m_xAccessible.get());
}
bool AccContainerEventListener::IsEditable(Reference<XAccessibleContext> xContext)
@@ -466,7 +466,7 @@ void AccContainerEventListener::HandleSelectionChangedAddEvent(const Any& /*oldV
{
return ;
}
- pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_ADD,pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_ADD, m_xAccessible.get());
}
void AccContainerEventListener::HandleSelectionChangedRemoveEvent(const Any& /*oldValue*/, const Any& newValue)
@@ -475,7 +475,7 @@ void AccContainerEventListener::HandleSelectionChangedRemoveEvent(const Any& /*o
{
return ;
}
- pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_REMOVE,pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_REMOVE, m_xAccessible.get());
}
void AccContainerEventListener::HandleSelectionChangedWithinEvent(const Any& /*oldValue*/, const Any& newValue)
@@ -484,7 +484,7 @@ void AccContainerEventListener::HandleSelectionChangedWithinEvent(const Any& /*o
{
return ;
}
- pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_WITHIN,pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_WITHIN, m_xAccessible.get());
}
void AccContainerEventListener::UpdateAllChildrenState(XAccessible* pXAccessible)
@@ -522,24 +522,24 @@ void AccContainerEventListener::UpdateAllChildrenState(XAccessible* pXAccessible
void AccContainerEventListener::HandlePageChangedEvent(const Any& /*oldValue*/, const Any& /*newValue*/)
{
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_PAGECHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_PAGECHANGED, m_xAccessible.get());
}
void AccContainerEventListener::HandleSectionChangedEvent(const Any& /*oldValue*/, const Any& /*newValue*/ )
{
- pAgent->NotifyAccEvent(UM_EVENT_SECTION_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SECTION_CHANGED, m_xAccessible.get());
}
void AccContainerEventListener::HandleColumnChangedEvent(const Any& /*oldValue*/, const Any& /*newValue*/)
{
- pAgent->NotifyAccEvent(UM_EVENT_COLUMN_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_COLUMN_CHANGED, m_xAccessible.get());
}
void AccContainerEventListener::HandleNameChangedEvent( Any name )
{
if (GetRole() == AccessibleRole::COMBO_BOX)
{
- Reference<XAccessibleContext> mxContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ Reference<XAccessibleContext> mxContext(m_xAccessible->getAccessibleContext());
if(mxContext.is())
{
Reference<XAccessible> mxChild = mxContext->getAccessibleChild(0);
diff --git a/winaccessibility/source/service/AccDescendantManagerEventListener.cxx b/winaccessibility/source/service/AccDescendantManagerEventListener.cxx
index e57295efbf0d..e292911b9093 100644
--- a/winaccessibility/source/service/AccDescendantManagerEventListener.cxx
+++ b/winaccessibility/source/service/AccDescendantManagerEventListener.cxx
@@ -91,7 +91,7 @@ void AccDescendantManagerEventListener::HandleChildChangedEvent(Any oldValue, An
if(xChild.is())
{
XAccessible* pAcc = xChild.get();
- pAgent->InsertAccObj( pAcc,pAccessible);
+ pAgent->InsertAccObj(pAcc, m_xAccessible.get());
pAgent->InsertChildrenAccObj(pAcc);
pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc);
@@ -149,7 +149,7 @@ void AccDescendantManagerEventListener::HandleSelectionChangedEvent(Any oldValue
}
if (!bSend)
{
- pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, m_xAccessible.get());
}
}
@@ -163,7 +163,7 @@ void AccDescendantManagerEventListener::HandleChildChangedNoFocusEvent(Any oldVa
{
XAccessible* pAcc = xChild.get();
- pAgent->InsertAccObj(pAcc,pAccessible);
+ pAgent->InsertAccObj(pAcc, m_xAccessible.get());
pAgent->InsertChildrenAccObj(pAcc);
}
}
@@ -188,7 +188,8 @@ bool AccDescendantManagerEventListener::NotifyChildEvent(short nWinEvent,const A
XAccessible* pAcc = xChild.get();
pAgent->NotifyAccEvent(nWinEvent, pAcc);
- if (pAgent && pAgent->IsStateManageDescendant(pAccessible) && ( nWinEvent == UM_EVENT_SELECTION_CHANGED_REMOVE) )
+ if (pAgent && pAgent->IsStateManageDescendant(m_xAccessible.get())
+ && (nWinEvent == UM_EVENT_SELECTION_CHANGED_REMOVE))
{
pAgent->DeleteAccObj( pAcc );
}
@@ -203,7 +204,7 @@ void AccDescendantManagerEventListener::HandleSelectionChangedAddEvent(const Any
{
return ;
}
- pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_ADD,pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_ADD, m_xAccessible.get());
}
void AccDescendantManagerEventListener::HandleSelectionChangedRemoveEvent(const Any& /*oldValue*/, const Any &newValue)
@@ -212,7 +213,7 @@ void AccDescendantManagerEventListener::HandleSelectionChangedRemoveEvent(const
{
return ;
}
- pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_REMOVE,pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_REMOVE, m_xAccessible.get());
}
void AccDescendantManagerEventListener::HandleSelectionChangedWithinEvent(const Any& /*oldValue*/, const Any &newValue)
@@ -221,7 +222,7 @@ void AccDescendantManagerEventListener::HandleSelectionChangedWithinEvent(const
{
return ;
}
- pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_WITHIN,pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED_WITHIN, m_xAccessible.get());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/source/service/AccDialogEventListener.cxx b/winaccessibility/source/service/AccDialogEventListener.cxx
index e0d9a5b3b087..474eddee325a 100644
--- a/winaccessibility/source/service/AccDialogEventListener.cxx
+++ b/winaccessibility/source/service/AccDialogEventListener.cxx
@@ -80,7 +80,7 @@ void AccDialogEventListener::HandleChildChangedEvent(Any oldValue, Any newValue)
{
XAccessible* pAcc = xChild.get();
//add this child
- pAgent->InsertAccObj( pAcc,pAccessible);
+ pAgent->InsertAccObj(pAcc, m_xAccessible.get());
//add all oldValue's existing children
pAgent->InsertChildrenAccObj(pAcc);
pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc);
@@ -122,9 +122,9 @@ void AccDialogEventListener::SetComponentState(short state, bool enable)
case AccessibleStateType::VISIBLE:
// UNO !VISIBLE == MSAA INVISIBLE
if( enable )
- pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
else
- pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
break;
case AccessibleStateType::ACTIVE:
// Only frames should be active
diff --git a/winaccessibility/source/service/AccEventListener.cxx b/winaccessibility/source/service/AccEventListener.cxx
index 151aa7f40217..d52b1142882d 100644
--- a/winaccessibility/source/service/AccEventListener.cxx
+++ b/winaccessibility/source/service/AccEventListener.cxx
@@ -45,7 +45,7 @@ using namespace cppu;
AccEventListener::AccEventListener(com::sun::star::accessibility::XAccessible* pAcc,
AccObjectManagerAgent* Agent)
- : pAccessible(pAcc)
+ : m_xAccessible(pAcc)
, pAgent(Agent)
, m_isDisposed(false)
{}
@@ -85,9 +85,9 @@ throw (::com::sun::star::uno::RuntimeException)
*/
void AccEventListener::HandleNameChangedEvent(Any name)
{
- if ( pAgent->IsTopWinAcc( pAccessible ) )
+ if (pAgent->IsTopWinAcc(m_xAccessible.get()))
{
- XAccessible* pAccDoc = pAgent->GetAccDocByAccTopWin( pAccessible );
+ XAccessible* pAccDoc = pAgent->GetAccDocByAccTopWin(m_xAccessible.get());
if ( pAccDoc )
{
pAgent->UpdateAccName(pAccDoc);
@@ -95,8 +95,8 @@ void AccEventListener::HandleNameChangedEvent(Any name)
}
}
- pAgent->UpdateAccName(pAccessible, name);
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_NAMECHANGE, pAccessible);
+ pAgent->UpdateAccName(m_xAccessible.get(), name);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_NAMECHANGE, m_xAccessible.get());
}
/**
@@ -105,8 +105,8 @@ void AccEventListener::HandleNameChangedEvent(Any name)
*/
void AccEventListener::HandleDescriptionChangedEvent(Any desc)
{
- pAgent->UpdateDescription(pAccessible, desc);
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_DESCRIPTIONCHANGE, pAccessible);
+ pAgent->UpdateDescription(m_xAccessible.get(), desc);
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_DESCRIPTIONCHANGE, m_xAccessible.get());
}
/**
@@ -114,8 +114,8 @@ void AccEventListener::HandleDescriptionChangedEvent(Any desc)
*/
void AccEventListener::HandleBoundrectChangedEvent()
{
- pAgent->UpdateLocation(pAccessible);
- pAgent->NotifyAccEvent(UM_EVENT_BOUNDRECT_CHANGED, pAccessible);
+ pAgent->UpdateLocation(m_xAccessible.get());
+ pAgent->NotifyAccEvent(UM_EVENT_BOUNDRECT_CHANGED, m_xAccessible.get());
}
/**
@@ -123,8 +123,8 @@ void AccEventListener::HandleBoundrectChangedEvent()
*/
void AccEventListener::HandleVisibleDataChangedEvent()
{
- pAgent->UpdateValue(pAccessible);
- pAgent->NotifyAccEvent(UM_EVENT_VISIBLE_DATA_CHANGED, pAccessible);
+ pAgent->UpdateValue(m_xAccessible.get());
+ pAgent->NotifyAccEvent(UM_EVENT_VISIBLE_DATA_CHANGED, m_xAccessible.get());
}
/**
@@ -171,8 +171,8 @@ void AccEventListener::FireStateFocusedChange(bool enable)
{
if(enable)
{
- pAgent->IncreaseState( pAccessible, AccessibleStateType::FOCUSED);
- pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, pAccessible);
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED);
+ pAgent->NotifyAccEvent(UM_EVENT_STATE_FOCUSED, m_xAccessible.get());
}
else
{
@@ -203,7 +203,8 @@ void AccEventListener::FireStatePropertyChange(short /*state*/, bool set )
*/
short AccEventListener::GetRole()
{
- Reference<com::sun::star::accessibility::XAccessibleContext> xContext(pAccessible->getAccessibleContext(),UNO_QUERY);
+ Reference<com::sun::star::accessibility::XAccessibleContext> const
+ xContext(m_xAccessible->getAccessibleContext());
if(xContext.is())
{
return xContext->getAccessibleRole();
@@ -216,9 +217,9 @@ short AccEventListener::GetRole()
*/
short AccEventListener::GetParentRole()
{
- if(pAccessible)
+ if (m_xAccessible.is())
{
- return pAgent->GetParentRole(pAccessible);
+ return pAgent->GetParentRole(m_xAccessible.get());
}
return -1;
}
@@ -231,35 +232,21 @@ void AccEventListener::RemoveMeFromBroadcaster()
{
if(m_isDisposed)
return;
- //get accessible context
- Reference< XAccessibleContext > pRContext;
- XAccessibleContext* pContext =NULL;
- if( pAccessible == NULL)
+ if (!m_xAccessible.is())
{
return;
}
- pRContext = pAccessible->getAccessibleContext();
- if( !pRContext.is() )
- {
- return;
- }
-
- //get broadcaster from accessible component
- Reference<XAccessibleComponent> xComponent(pRContext,UNO_QUERY);
- if(!xComponent.is())
- {
- return;
- }
- Reference<XAccessibleEventBroadcaster> broadcaster(xComponent,UNO_QUERY);
- XAccessibleEventBroadcaster* pBroadcaster = broadcaster.get();
- if (pBroadcaster != NULL)
+ Reference<XAccessibleEventBroadcaster> const xBroadcaster(
+ m_xAccessible->getAccessibleContext(), UNO_QUERY);
+ if (xBroadcaster.is())
{
//remove the lister from accessible object
- pBroadcaster->removeAccessibleEventListener(this);
+ xBroadcaster->removeAccessibleEventListener(this);
m_isDisposed = true;
- pAgent->NotifyDestroy(pAccessible);
+ pAgent->NotifyDestroy(m_xAccessible.get());
}
+ m_xAccessible.clear(); // release cyclic reference
}
catch(...)
{
diff --git a/winaccessibility/source/service/AccFrameEventListener.cxx b/winaccessibility/source/service/AccFrameEventListener.cxx
index 98d7b41248c6..c509caea6b50 100644
--- a/winaccessibility/source/service/AccFrameEventListener.cxx
+++ b/winaccessibility/source/service/AccFrameEventListener.cxx
@@ -86,12 +86,13 @@ void AccFrameEventListener::HandleChildChangedEvent(Any oldValue, Any newValue)
{
XAccessible* pAcc = xChild.get();
- VCLXWindow* pvclwindow = (VCLXWindow*)pAccessible;
+ VCLXWindow* pvclwindow =
+ dynamic_cast<VCLXWindow*>(m_xAccessible.get());
Window* window = pvclwindow->GetWindow();
const SystemEnvData* systemdata=window->GetSystemData();
//add this child
- pAgent->InsertAccObj(pAcc, pAccessible,
+ pAgent->InsertAccObj(pAcc, m_xAccessible.get(),
reinterpret_cast<sal_Int64>(systemdata->hWnd));
//add all oldValue's existing children
pAgent->InsertChildrenAccObj(pAcc);
@@ -134,9 +135,9 @@ void AccFrameEventListener::SetComponentState(short state, bool enable )
case AccessibleStateType::VISIBLE:
// UNO !VISIBLE == MSAA INVISIBLE
if( enable )
- pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
else
- pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
break;
case AccessibleStateType::ACTIVE:
// Only frames should be active
diff --git a/winaccessibility/source/service/AccListEventListener.cxx b/winaccessibility/source/service/AccListEventListener.cxx
index de7859a24b15..9d809e9d4544 100644
--- a/winaccessibility/source/service/AccListEventListener.cxx
+++ b/winaccessibility/source/service/AccListEventListener.cxx
@@ -85,7 +85,7 @@ void AccListEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any
XAccessible* pAcc = xChild.get();
// Valueset has cache the child item xacc,Update state if no insert obj
- sal_Bool bHasCache = pAgent->InsertAccObj(pAcc,pAccessible);
+ bool bHasCache = pAgent->InsertAccObj(pAcc, m_xAccessible.get());
if (!bHasCache)
{
pAgent->UpdateState(pAcc);
@@ -117,7 +117,8 @@ void AccListEventListener::HandleValueChangedEvent(Any oldValue, Any newValue)
//to enable value changed event
if (GetParentRole() == AccessibleRole::COMBO_BOX)
{
- XAccessible* pParentAcc = pAgent->GetParentXAccessible(pAccessible);
+ XAccessible* pParentAcc =
+ pAgent->GetParentXAccessible(m_xAccessible.get());
pAgent->UpdateValue(pParentAcc);
pAgent->NotifyAccEvent(UM_EVENT_OBJECT_VALUECHANGE, pParentAcc);
}
diff --git a/winaccessibility/source/service/AccMenuEventListener.cxx b/winaccessibility/source/service/AccMenuEventListener.cxx
index 36a96e5a687b..7be29cd860a1 100644
--- a/winaccessibility/source/service/AccMenuEventListener.cxx
+++ b/winaccessibility/source/service/AccMenuEventListener.cxx
@@ -79,7 +79,7 @@ void AccMenuEventListener::HandleChildChangedEvent(Any oldValue, Any newValue)
{
XAccessible* pAcc = xChild.get();
//add this child
- pAgent->InsertAccObj( pAcc,pAccessible);
+ pAgent->InsertAccObj(pAcc, m_xAccessible.get());
//add all oldValue's existing children
pAgent->InsertChildrenAccObj(pAcc);
pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc);
@@ -110,7 +110,7 @@ void AccMenuEventListener::HandleChildChangedEvent(Any oldValue, Any newValue)
*/
void AccMenuEventListener::HandleSelectionChangedEventNoArgs()
{
- pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_SELECTION_CHANGED, m_xAccessible.get());
}
/**
@@ -125,9 +125,8 @@ void AccMenuEventListener::FireStatePropertyChange(short state, bool set)
{
//for sub menu is popup, there is a menu selected event.
case AccessibleStateType::SELECTED:
- pAgent->IncreaseState( pAccessible, state);
-
- pAgent->UpdateChildState(pAccessible);
+ pAgent->IncreaseState(m_xAccessible.get(), state);
+ pAgent->UpdateChildState(m_xAccessible.get());
break;
default:
AccComponentEventListener::FireStatePropertyChange(state, set);
@@ -140,7 +139,7 @@ void AccMenuEventListener::FireStatePropertyChange(short state, bool set)
{
//for sub menu is popup, there is a menu selected event.
case AccessibleStateType::SELECTED:
- pAgent->DecreaseState( pAccessible, state );
+ pAgent->DecreaseState(m_xAccessible.get(), state);
break;
default:
diff --git a/winaccessibility/source/service/AccObjectContainerEventListener.cxx b/winaccessibility/source/service/AccObjectContainerEventListener.cxx
index 40f772752a49..90f9d7460bc3 100644
--- a/winaccessibility/source/service/AccObjectContainerEventListener.cxx
+++ b/winaccessibility/source/service/AccObjectContainerEventListener.cxx
@@ -53,9 +53,8 @@ void AccObjectContainerEventListener::HandleStateChangedEvent(Any oldValue, Any
{
if (newV == AccessibleStateType::FOCUSED)
{
- pAgent->UpdateAccName(pAccessible);
-
- pAgent->UpdateDescription(pAccessible);
+ pAgent->UpdateAccName(m_xAccessible.get());
+ pAgent->UpdateDescription(m_xAccessible.get());
}
}
AccContainerEventListener::HandleStateChangedEvent(oldValue, newValue);
diff --git a/winaccessibility/source/service/AccParagraphEventListener.cxx b/winaccessibility/source/service/AccParagraphEventListener.cxx
index d3b0b39e503b..a8db40debccf 100644
--- a/winaccessibility/source/service/AccParagraphEventListener.cxx
+++ b/winaccessibility/source/service/AccParagraphEventListener.cxx
@@ -65,12 +65,12 @@ throw (::com::sun::star::uno::RuntimeException)
short State;
if( (aEvent.NewValue >>= State) && (State == AccessibleStateType::SELECTED) )
{
- pAgent->IncreaseState( pAccessible, State);
+ pAgent->IncreaseState(m_xAccessible.get(), State);
break;
}
else if( (aEvent.OldValue >>= State) && (State == AccessibleStateType::SELECTED) )
{
- pAgent->DecreaseState( pAccessible, State);
+ pAgent->DecreaseState(m_xAccessible.get(), State);
break;
}
@@ -95,8 +95,8 @@ throw (::com::sun::star::uno::RuntimeException)
*/
void AccParagraphEventListener::HandleCaretChangedEvent(Any oldValue, Any newValue)
{
- pAgent->UpdateLocation(pAccessible);
- pAgent->NotifyAccEvent(UM_EVENT_OBJECT_CARETCHANGE, pAccessible);
+ pAgent->UpdateLocation(m_xAccessible.get());
+ pAgent->NotifyAccEvent(UM_EVENT_OBJECT_CARETCHANGE, m_xAccessible.get());
}
/**
@@ -126,7 +126,7 @@ void AccParagraphEventListener::SetComponentState(short state, bool enable )
void AccParagraphEventListener::HandleTextSelectionChangedEvent()
{
- pAgent->NotifyAccEvent(UM_EVENT_TEXT_SELECTION_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_TEXT_SELECTION_CHANGED, m_xAccessible.get());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/source/service/AccTableEventListener.cxx b/winaccessibility/source/service/AccTableEventListener.cxx
index 64ba8ca83e81..2b477f7153de 100644
--- a/winaccessibility/source/service/AccTableEventListener.cxx
+++ b/winaccessibility/source/service/AccTableEventListener.cxx
@@ -58,25 +58,25 @@ throw (::com::sun::star::uno::RuntimeException)
case AccessibleEventId::TABLE_CAPTION_CHANGED:
{
- pAgent->NotifyAccEvent(UM_EVENT_TABLE_CAPTION_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_CAPTION_CHANGED, m_xAccessible.get());
break;
}
case AccessibleEventId::TABLE_COLUMN_DESCRIPTION_CHANGED:
{
- pAgent->NotifyAccEvent(UM_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED, m_xAccessible.get());
break;
}
case AccessibleEventId::TABLE_COLUMN_HEADER_CHANGED:
{
- pAgent->NotifyAccEvent(UM_EVENT_TABLE_COLUMN_HEADER_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_COLUMN_HEADER_CHANGED, m_xAccessible.get());
break;
}
case AccessibleEventId::TABLE_ROW_HEADER_CHANGED:
{
- pAgent->NotifyAccEvent(UM_EVENT_TABLE_ROW_HEADER_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_ROW_HEADER_CHANGED, m_xAccessible.get());
break;
}
case AccessibleEventId::TABLE_MODEL_CHANGED:
@@ -88,13 +88,13 @@ throw (::com::sun::star::uno::RuntimeException)
case AccessibleEventId::TABLE_SUMMARY_CHANGED:
{
- pAgent->NotifyAccEvent(UM_EVENT_TABLE_SUMMARY_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_SUMMARY_CHANGED, m_xAccessible.get());
break;
}
case AccessibleEventId::TABLE_ROW_DESCRIPTION_CHANGED:
{
- pAgent->NotifyAccEvent(UM_EVENT_TABLE_ROW_DESCRIPTION_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_ROW_DESCRIPTION_CHANGED, m_xAccessible.get());
break;
}
default:
@@ -116,7 +116,7 @@ void AccTableEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any
if(xChild.is())
{
XAccessible* pAcc = xChild.get();
- pAgent->InsertAccObj(pAcc,pAccessible);
+ pAgent->InsertAccObj(pAcc, m_xAccessible.get());
pAgent->NotifyAccEvent(UM_EVENT_ACTIVE_DESCENDANT_CHANGED, pAcc);
}
}
@@ -136,14 +136,14 @@ void AccTableEventListener::HandleTableModelChangeEvent(Any newValue)
AccessibleTableModelChange aModelChange;
if (newValue >>= aModelChange)
{
- if( pAccessible )
+ if (m_xAccessible.is())
{
//delete all oldValue's existing children
- pAgent->DeleteChildrenAccObj( pAccessible );
+ pAgent->DeleteChildrenAccObj(m_xAccessible.get());
//add all oldValue's existing children
- pAgent->InsertChildrenAccObj( pAccessible );
+ pAgent->InsertChildrenAccObj(m_xAccessible.get());
}
- pAgent->NotifyAccEvent(UM_EVENT_TABLE_MODEL_CHANGED, pAccessible);
+ pAgent->NotifyAccEvent(UM_EVENT_TABLE_MODEL_CHANGED, m_xAccessible.get());
}
}
diff --git a/winaccessibility/source/service/AccTreeEventListener.cxx b/winaccessibility/source/service/AccTreeEventListener.cxx
index 3c0bb3bb230d..fba5eb6fd5e4 100644
--- a/winaccessibility/source/service/AccTreeEventListener.cxx
+++ b/winaccessibility/source/service/AccTreeEventListener.cxx
@@ -71,7 +71,7 @@ void AccTreeEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any
if(xChild.is())
{
XAccessible* pAcc = xChild.get();
- pAgent->InsertAccObj(pAcc,pAccessible);
+ pAgent->InsertAccObj(pAcc, m_xAccessible.get());
pAgent->NotifyAccEvent(UM_EVENT_ACTIVE_DESCENDANT_CHANGED, pAcc);
}
}
diff --git a/winaccessibility/source/service/AccWindowEventListener.cxx b/winaccessibility/source/service/AccWindowEventListener.cxx
index 51919903c9d7..8e1831375581 100644
--- a/winaccessibility/source/service/AccWindowEventListener.cxx
+++ b/winaccessibility/source/service/AccWindowEventListener.cxx
@@ -79,7 +79,7 @@ void AccWindowEventListener::HandleChildChangedEvent(Any oldValue, Any newValue)
{
XAccessible* pAcc = xChild.get();
//add this child
- pAgent->InsertAccObj( pAcc,pAccessible);
+ pAgent->InsertAccObj(pAcc, m_xAccessible.get());
//add all oldValue's existing children
pAgent->InsertChildrenAccObj(pAcc);
pAgent->NotifyAccEvent(UM_EVENT_CHILD_ADDED, pAcc);
@@ -119,18 +119,18 @@ void AccWindowEventListener::SetComponentState(short state, bool enable )
case AccessibleStateType::VISIBLE:
// UNO !VISIBLE == MSAA INVISIBLE
if( enable )
- pAgent->IncreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
else
- pAgent->DecreaseState( pAccessible, AccessibleStateType::VISIBLE );
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE);
break;
case AccessibleStateType::SHOWING:
// UNO !SHOWING == MSAA OFFSCREEN
if( enable )
{
- pAgent->IncreaseState( pAccessible, AccessibleStateType::SHOWING );
+ pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING);
}
else
- pAgent->DecreaseState( pAccessible, AccessibleStateType::SHOWING );
+ pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING);
break;
default:
break;