winaccessibility/inc/AccComponentEventListener.hxx | 2 winaccessibility/inc/AccContainerEventListener.hxx | 2 winaccessibility/inc/AccDescendantManagerEventListener.hxx | 2 winaccessibility/inc/AccDialogEventListener.hxx | 2 winaccessibility/inc/AccEventListener.hxx | 6 winaccessibility/inc/AccFrameEventListener.hxx | 2 winaccessibility/inc/AccListEventListener.hxx | 2 winaccessibility/inc/AccMenuEventListener.hxx | 2 winaccessibility/inc/AccObjectContainerEventListener.hxx | 2 winaccessibility/inc/AccParagraphEventListener.hxx | 2 winaccessibility/inc/AccTableEventListener.hxx | 2 winaccessibility/inc/AccTextComponentEventListener.hxx | 2 winaccessibility/inc/AccTreeEventListener.hxx | 2 winaccessibility/inc/AccWindowEventListener.hxx | 2 winaccessibility/source/service/AccComponentEventListener.cxx | 98 ++++----- winaccessibility/source/service/AccContainerEventListener.cxx | 102 +++++----- winaccessibility/source/service/AccDescendantManagerEventListener.cxx | 30 +- winaccessibility/source/service/AccDialogEventListener.cxx | 8 winaccessibility/source/service/AccEventListener.cxx | 44 ++-- winaccessibility/source/service/AccFrameEventListener.cxx | 14 - winaccessibility/source/service/AccListEventListener.cxx | 21 -- winaccessibility/source/service/AccMenuEventListener.cxx | 12 - winaccessibility/source/service/AccObjectContainerEventListener.cxx | 6 winaccessibility/source/service/AccObjectWinManager.cxx | 28 +- winaccessibility/source/service/AccParagraphEventListener.cxx | 12 - winaccessibility/source/service/AccTableEventListener.cxx | 28 +- winaccessibility/source/service/AccTextComponentEventListener.cxx | 4 winaccessibility/source/service/AccTreeEventListener.cxx | 10 winaccessibility/source/service/AccWindowEventListener.cxx | 12 - 29 files changed, 230 insertions(+), 231 deletions(-)
New commits: commit 5100fb1c0ebadf936bc86b60cb8870095003e8ce Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Dec 8 13:05:23 2023 +0000 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Dec 8 17:26:39 2023 +0100 wina11y: Hold AccObjectWinManager by ref, not ptr Inspired by commit 0a2622760a967e9d64cfdc632548dd42c1836324 Date: Wed Nov 8 13:54:14 2023 +0100 Drop presumably redundant null check Change-Id: Icb2bfb83ebf4146eb3091a6021ecac75aa6626b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160464 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/winaccessibility/inc/AccComponentEventListener.hxx b/winaccessibility/inc/AccComponentEventListener.hxx index 72666b2a5690..ae99438336a6 100644 --- a/winaccessibility/inc/AccComponentEventListener.hxx +++ b/winaccessibility/inc/AccComponentEventListener.hxx @@ -36,7 +36,7 @@ class AccComponentEventListener : public AccEventListener private: static FILE *output, *output2, *output3, *outacc; //used for debugging public: - AccComponentEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccComponentEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccComponentEventListener() override; // XAccessibleEventListener diff --git a/winaccessibility/inc/AccContainerEventListener.hxx b/winaccessibility/inc/AccContainerEventListener.hxx index e6d284e75ad2..f15379db3462 100644 --- a/winaccessibility/inc/AccContainerEventListener.hxx +++ b/winaccessibility/inc/AccContainerEventListener.hxx @@ -39,7 +39,7 @@ enum class UnoMSAAEvent; class AccContainerEventListener: public AccEventListener { public: - AccContainerEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccContainerEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccContainerEventListener() override; //AccessibleEventListener diff --git a/winaccessibility/inc/AccDescendantManagerEventListener.hxx b/winaccessibility/inc/AccDescendantManagerEventListener.hxx index f910c2e6447b..1c7bc16252aa 100644 --- a/winaccessibility/inc/AccDescendantManagerEventListener.hxx +++ b/winaccessibility/inc/AccDescendantManagerEventListener.hxx @@ -39,7 +39,7 @@ private: std::vector<com::sun::star::accessibility::XAccessible*> m_aUnselectedChildrenForDeletion; public: - AccDescendantManagerEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccDescendantManagerEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccDescendantManagerEventListener() override; // XAccessibleEventListener diff --git a/winaccessibility/inc/AccDialogEventListener.hxx b/winaccessibility/inc/AccDialogEventListener.hxx index 8f47fa94ab4e..931504a9bb2a 100644 --- a/winaccessibility/inc/AccDialogEventListener.hxx +++ b/winaccessibility/inc/AccDialogEventListener.hxx @@ -33,7 +33,7 @@ class AccDialogEventListener : public AccEventListener { public: - AccDialogEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccDialogEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccDialogEventListener() override; //AccessibleEventListener diff --git a/winaccessibility/inc/AccEventListener.hxx b/winaccessibility/inc/AccEventListener.hxx index e9dd0e64be2f..bf8841125d95 100644 --- a/winaccessibility/inc/AccEventListener.hxx +++ b/winaccessibility/inc/AccEventListener.hxx @@ -36,11 +36,11 @@ class AccEventListener : public ::cppu::WeakImplHelper<css::accessibility::XAcce protected: //accessible owner's pointer css::uno::Reference<css::accessibility::XAccessible> m_xAccessible; - // pointer for object's manager - AccObjectWinManager* m_pObjManager; + // reference to object's manager + AccObjectWinManager& m_rObjManager; public: - AccEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccEventListener() override; // XEventListener diff --git a/winaccessibility/inc/AccFrameEventListener.hxx b/winaccessibility/inc/AccFrameEventListener.hxx index b575b57f50bd..721588c428eb 100644 --- a/winaccessibility/inc/AccFrameEventListener.hxx +++ b/winaccessibility/inc/AccFrameEventListener.hxx @@ -33,7 +33,7 @@ class AccFrameEventListener : public AccEventListener { public: - AccFrameEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccFrameEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccFrameEventListener() override; // XAccessibleEventListener diff --git a/winaccessibility/inc/AccListEventListener.hxx b/winaccessibility/inc/AccListEventListener.hxx index eb9911308d81..d7dec49e54df 100644 --- a/winaccessibility/inc/AccListEventListener.hxx +++ b/winaccessibility/inc/AccListEventListener.hxx @@ -33,7 +33,7 @@ class AccListEventListener : public AccDescendantManagerEventListener { public: - AccListEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccListEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccListEventListener() override; // XAccessibleEventListener diff --git a/winaccessibility/inc/AccMenuEventListener.hxx b/winaccessibility/inc/AccMenuEventListener.hxx index fbe4eb2900c2..20bd70335752 100644 --- a/winaccessibility/inc/AccMenuEventListener.hxx +++ b/winaccessibility/inc/AccMenuEventListener.hxx @@ -33,7 +33,7 @@ class AccMenuEventListener : public AccComponentEventListener { public: - AccMenuEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccMenuEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccMenuEventListener() override; //AccessibleEventListener diff --git a/winaccessibility/inc/AccObjectContainerEventListener.hxx b/winaccessibility/inc/AccObjectContainerEventListener.hxx index 37ab738068da..10e246f2cd2f 100644 --- a/winaccessibility/inc/AccObjectContainerEventListener.hxx +++ b/winaccessibility/inc/AccObjectContainerEventListener.hxx @@ -34,7 +34,7 @@ class AccObjectContainerEventListener: public AccContainerEventListener { public: - AccObjectContainerEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccObjectContainerEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccObjectContainerEventListener() override; virtual void HandleStateChangedEvent( diff --git a/winaccessibility/inc/AccParagraphEventListener.hxx b/winaccessibility/inc/AccParagraphEventListener.hxx index d2f5457e1b0c..ae13bdc6bb3a 100644 --- a/winaccessibility/inc/AccParagraphEventListener.hxx +++ b/winaccessibility/inc/AccParagraphEventListener.hxx @@ -33,7 +33,7 @@ class AccParagraphEventListener : public AccContainerEventListener { public: - AccParagraphEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccParagraphEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccParagraphEventListener() override; //AccessibleEventListener diff --git a/winaccessibility/inc/AccTableEventListener.hxx b/winaccessibility/inc/AccTableEventListener.hxx index ee0738f21a35..16179feff371 100644 --- a/winaccessibility/inc/AccTableEventListener.hxx +++ b/winaccessibility/inc/AccTableEventListener.hxx @@ -33,7 +33,7 @@ class AccTableEventListener : public AccDescendantManagerEventListener { public: - AccTableEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccTableEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccTableEventListener() override; // XAccessibleEventListener diff --git a/winaccessibility/inc/AccTextComponentEventListener.hxx b/winaccessibility/inc/AccTextComponentEventListener.hxx index d4b78bcd300f..2b7eb811d7b8 100644 --- a/winaccessibility/inc/AccTextComponentEventListener.hxx +++ b/winaccessibility/inc/AccTextComponentEventListener.hxx @@ -34,7 +34,7 @@ class AccTextComponentEventListener : public AccComponentEventListener { public: AccTextComponentEventListener(css::accessibility::XAccessible* pAcc, - AccObjectWinManager* pManager); + AccObjectWinManager& rManager); virtual ~AccTextComponentEventListener() override; virtual void SetComponentState(sal_Int64 state, bool enable) override; diff --git a/winaccessibility/inc/AccTreeEventListener.hxx b/winaccessibility/inc/AccTreeEventListener.hxx index cb6551db448e..f5dd471625aa 100644 --- a/winaccessibility/inc/AccTreeEventListener.hxx +++ b/winaccessibility/inc/AccTreeEventListener.hxx @@ -33,7 +33,7 @@ class AccTreeEventListener : public AccDescendantManagerEventListener { public: - AccTreeEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccTreeEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccTreeEventListener() override; // XAccessibleEventListener diff --git a/winaccessibility/inc/AccWindowEventListener.hxx b/winaccessibility/inc/AccWindowEventListener.hxx index 595f34099090..7f3c57a8870c 100644 --- a/winaccessibility/inc/AccWindowEventListener.hxx +++ b/winaccessibility/inc/AccWindowEventListener.hxx @@ -33,7 +33,7 @@ class AccWindowEventListener : public AccEventListener { public: - AccWindowEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager); + AccWindowEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager); virtual ~AccWindowEventListener() override; // XAccessibleEventListener diff --git a/winaccessibility/source/service/AccComponentEventListener.cxx b/winaccessibility/source/service/AccComponentEventListener.cxx index e63317b59e82..bc6475754097 100644 --- a/winaccessibility/source/service/AccComponentEventListener.cxx +++ b/winaccessibility/source/service/AccComponentEventListener.cxx @@ -32,8 +32,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccComponentEventListener::AccComponentEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccEventListener(pAcc, pManager) +AccComponentEventListener::AccComponentEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccEventListener(pAcc, rManager) { } @@ -92,8 +92,8 @@ void AccComponentEventListener::notifyEvent( const css::accessibility::Accessib */ void AccComponentEventListener::HandleValueChangedEvent(Any, Any) { - m_pObjManager->UpdateValue(m_xAccessible.get()); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_VALUECHANGE); + m_rObjManager.UpdateValue(m_xAccessible.get()); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_VALUECHANGE); } /** @@ -101,8 +101,8 @@ void AccComponentEventListener::HandleValueChangedEvent(Any, Any) */ void AccComponentEventListener::HandleActionChangedEvent() { - m_pObjManager->UpdateAction(m_xAccessible.get()); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_DEFACTIONCHANGE); + m_rObjManager.UpdateAction(m_xAccessible.get()); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_DEFACTIONCHANGE); } /** @@ -113,8 +113,8 @@ void AccComponentEventListener::HandleActionChangedEvent() */ void AccComponentEventListener::HandleTextChangedEvent(Any, Any newValue) { - m_pObjManager->SetValue(m_xAccessible.get(), newValue); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_VALUECHANGE); + m_rObjManager.SetValue(m_xAccessible.get(), newValue); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_VALUECHANGE); } /** @@ -125,7 +125,7 @@ void AccComponentEventListener::HandleTextChangedEvent(Any, Any newValue) */ void AccComponentEventListener::HandleCaretChangedEvent(Any, Any) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_CARETCHANGE); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_CARETCHANGE); } /** @@ -152,13 +152,13 @@ void AccComponentEventListener::SetComponentState(sal_Int64 state, bool enable) { if(enable) { - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); } else { - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); } } else @@ -172,22 +172,22 @@ void AccComponentEventListener::SetComponentState(sal_Int64 state, bool enable) case AccessibleStateType::ENABLED: if(enable) { - m_pObjManager->UpdateState(m_xAccessible.get()); - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); + m_rObjManager.UpdateState(m_xAccessible.get()); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); // 8. label should have no FOCUSABLE state, Firefox has READONLY state, we can also have. if ( GetRole() != AccessibleRole::LABEL && GetRole() != AccessibleRole::STATIC && GetRole() != AccessibleRole::NOTIFICATION && GetRole() != AccessibleRole::SCROLL_BAR) { - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); } } else { - m_pObjManager->UpdateState(m_xAccessible.get()); - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); + m_rObjManager.UpdateState(m_xAccessible.get()); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); } break; case AccessibleStateType::ACTIVE: @@ -214,34 +214,34 @@ void AccComponentEventListener::FireStatePropertyChange(sal_Int64 state, bool se { case AccessibleStateType::CHECKED: case AccessibleStateType::INDETERMINATE: - m_pObjManager->IncreaseState(m_xAccessible.get(), state); - m_pObjManager->UpdateAction(m_xAccessible.get()); + m_rObjManager.IncreaseState(m_xAccessible.get(), state); + m_rObjManager.UpdateAction(m_xAccessible.get()); - if (!m_pObjManager->IsSpecialToolbarItem(m_xAccessible.get())) + if (!m_rObjManager.IsSpecialToolbarItem(m_xAccessible.get())) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_CHECKED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_CHECKED); } break; case AccessibleStateType::PRESSED: - m_pObjManager->IncreaseState(m_xAccessible.get(), state); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_PRESSED); + m_rObjManager.IncreaseState(m_xAccessible.get(), state); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_PRESSED); break; case AccessibleStateType::SELECTED: - m_pObjManager->IncreaseState(m_xAccessible.get(), state); + m_rObjManager.IncreaseState(m_xAccessible.get(), state); break; case AccessibleStateType::ARMED: - m_pObjManager->IncreaseState(m_xAccessible.get(), state); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_ARMED); + m_rObjManager.IncreaseState(m_xAccessible.get(), state); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_ARMED); break; case AccessibleStateType::SHOWING: - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); // UNO !SHOWING == MSAA OFFSCREEN - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING ); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_SHOWING); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_SHOWING); break; case AccessibleStateType::VISIBLE: // UNO !VISIBLE == MSAA INVISIBLE - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE ); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); break; default: break; @@ -254,38 +254,38 @@ void AccComponentEventListener::FireStatePropertyChange(sal_Int64 state, bool se { case AccessibleStateType::CHECKED: case AccessibleStateType::INDETERMINATE: - m_pObjManager->DecreaseState(m_xAccessible.get(), state); - m_pObjManager->UpdateAction(m_xAccessible.get()); + m_rObjManager.DecreaseState(m_xAccessible.get(), state); + m_rObjManager.UpdateAction(m_xAccessible.get()); - if (!m_pObjManager->IsSpecialToolbarItem(m_xAccessible.get())) + if (!m_rObjManager.IsSpecialToolbarItem(m_xAccessible.get())) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_CHECKED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_CHECKED); } break; case AccessibleStateType::PRESSED: - m_pObjManager->DecreaseState(m_xAccessible.get(), state); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_PRESSED); + m_rObjManager.DecreaseState(m_xAccessible.get(), state); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_PRESSED); break; case AccessibleStateType::SELECTED: - m_pObjManager->DecreaseState(m_xAccessible.get(), state); + m_rObjManager.DecreaseState(m_xAccessible.get(), state); //if the state is unset, no need to send MSAA SELECTION event - //m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_SELECTED); + //m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_SELECTED); break; case AccessibleStateType::ARMED: { - m_pObjManager->DecreaseState(m_xAccessible.get(), state); + m_rObjManager.DecreaseState(m_xAccessible.get(), state); //if the state is unset, no need to send MSAA MENU event - //m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_ARMED); + //m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_ARMED); } break; case AccessibleStateType::SHOWING: - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); // UNO !SHOWING == MSAA OFFSCREEN - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); break; case AccessibleStateType::VISIBLE: // UNO !VISIBLE == MSAA INVISIBLE - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); break; default: @@ -304,24 +304,24 @@ void AccComponentEventListener::FireStateFocusedChange(bool enable) if(enable) { if (GetParentRole() != AccessibleRole::COMBO_BOX) - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_FOCUSED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_FOCUSED); } else { //if lose focus, no need to send MSAA FOCUS event - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); } } void AccComponentEventListener::HandleSelectionChangedEventNoArgs() { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED); } //add TEXT_SELECTION_CHANGED event void AccComponentEventListener::HandleTextSelectionChangedEvent() { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TEXT_SELECTION_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TEXT_SELECTION_CHANGED); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/winaccessibility/source/service/AccContainerEventListener.cxx b/winaccessibility/source/service/AccContainerEventListener.cxx index d05b9f5a27e1..f167cf6de766 100644 --- a/winaccessibility/source/service/AccContainerEventListener.cxx +++ b/winaccessibility/source/service/AccContainerEventListener.cxx @@ -32,8 +32,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccContainerEventListener::AccContainerEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccEventListener(pAcc, pManager) +AccContainerEventListener::AccContainerEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccEventListener(pAcc, rManager) { } @@ -125,7 +125,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) - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED); } /** @@ -137,10 +137,10 @@ void AccContainerEventListener::HandleAllChildrenChangedEvent() if (m_xAccessible.is()) { //delete all oldValue's existing children - m_pObjManager->DeleteChildrenAccObj(m_xAccessible.get()); + m_rObjManager.DeleteChildrenAccObj(m_xAccessible.get()); //add all oldValue's existing children - m_pObjManager->InsertChildrenAccObj(m_xAccessible.get()); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_REORDER); + m_rObjManager.InsertChildrenAccObj(m_xAccessible.get()); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_REORDER); } } @@ -149,8 +149,8 @@ void AccContainerEventListener::HandleAllChildrenChangedEvent() */ void AccContainerEventListener::HandleTextChangedEvent(Any, Any newValue) { - m_pObjManager->SetValue(m_xAccessible.get(), newValue); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_TEXTCHANGE); + m_rObjManager.SetValue(m_xAccessible.get(), newValue); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_TEXTCHANGE); } /** @@ -179,17 +179,17 @@ void AccContainerEventListener::SetComponentState(sal_Int64 state, bool enable ) case AccessibleStateType::ENABLED: if(enable) { - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); - m_pObjManager->UpdateState(m_xAccessible.get()); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); + m_rObjManager.UpdateState(m_xAccessible.get()); UpdateAllChildrenState(m_xAccessible.get()); } else { - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); - m_pObjManager->UpdateState(m_xAccessible.get()); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); + m_rObjManager.UpdateState(m_xAccessible.get()); UpdateAllChildrenState(m_xAccessible.get()); } @@ -202,12 +202,12 @@ void AccContainerEventListener::SetComponentState(sal_Int64 state, bool enable ) { if (!enable) /* get the active state */ { - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); } else /* lose the active state */ { - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); } } break; @@ -216,8 +216,8 @@ void AccContainerEventListener::SetComponentState(sal_Int64 state, bool enable ) case AccessibleStateType::COLLAPSE: case AccessibleStateType::CHECKED: { - m_pObjManager->UpdateState(m_xAccessible.get()); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_BUSY); + m_rObjManager.UpdateState(m_xAccessible.get()); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_BUSY); break; } @@ -239,22 +239,22 @@ void AccContainerEventListener::FireStatePropertyChange(sal_Int64 state, bool se switch(state) { case AccessibleStateType::SELECTED: - m_pObjManager->IncreaseState(m_xAccessible.get(), state); + m_rObjManager.IncreaseState(m_xAccessible.get(), state); break; case AccessibleStateType::INDETERMINATE: case AccessibleStateType::BUSY: case AccessibleStateType::FOCUSABLE: case AccessibleStateType::OFFSCREEN: - m_pObjManager->IncreaseState(m_xAccessible.get(), state); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_BUSY); + m_rObjManager.IncreaseState(m_xAccessible.get(), state); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_BUSY); break; case AccessibleStateType::SHOWING: // UNO !SHOWING == MSAA OFFSCREEN - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); break; case AccessibleStateType::VISIBLE: // UNO !VISIBLE == MSAA INVISIBLE - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); break; default: break; @@ -266,22 +266,22 @@ void AccContainerEventListener::FireStatePropertyChange(sal_Int64 state, bool se switch(state) { case AccessibleStateType::SELECTED: - m_pObjManager->DecreaseState(m_xAccessible.get(), state); + m_rObjManager.DecreaseState(m_xAccessible.get(), state); break; case AccessibleStateType::BUSY: case AccessibleStateType::INDETERMINATE: case AccessibleStateType::FOCUSABLE: case AccessibleStateType::OFFSCREEN: - m_pObjManager->DecreaseState(m_xAccessible.get(), state); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_BUSY); + m_rObjManager.DecreaseState(m_xAccessible.get(), state); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_BUSY); break; case AccessibleStateType::SHOWING: // UNO !SHOWING == MSAA OFFSCREEN - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); break; case AccessibleStateType::VISIBLE: // UNO !VISIBLE == MSAA INVISIBLE - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); break; default: break; @@ -297,16 +297,16 @@ void AccContainerEventListener::FireStateFocusedChange(bool enable) { if(enable) { - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); // if the acc role is MENU_BAR, UnoMSAAEvent::MENU_START event should be sent // if the acc role is POPUP_MENU, UnoMSAAEvent::MENUPOPUPSTART event should be sent short role = GetRole(); if(role == AccessibleRole::MENU_BAR) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::MENU_START); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::MENU_START); } else if (role == AccessibleRole::POPUP_MENU) - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::MENUPOPUPSTART); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::MENUPOPUPSTART); //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 ) @@ -316,7 +316,7 @@ void AccContainerEventListener::FireStateFocusedChange(bool enable) if (parentRole == AccessibleRole::TOOL_BAR || parentRole == AccessibleRole::SCROLL_PANE // sidebar || parentRole == AccessibleRole::PANEL) // sidebar - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_FOCUSED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_FOCUSED); } else if (role == AccessibleRole::COMBO_BOX ) { @@ -335,32 +335,32 @@ void AccContainerEventListener::FireStateFocusedChange(bool enable) { if (IsEditable(mxChildContext)) { - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); - m_pObjManager->IncreaseState( mxChild.get(), AccessibleStateType::FOCUSED); - m_pObjManager->NotifyAccEvent(mxChild.get(), UnoMSAAEvent::STATE_FOCUSED); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); + m_rObjManager.IncreaseState( mxChild.get(), AccessibleStateType::FOCUSED); + m_rObjManager.NotifyAccEvent(mxChild.get(), UnoMSAAEvent::STATE_FOCUSED); bSendFocusOnCombobox = false; } } } } if (bSendFocusOnCombobox) - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_FOCUSED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_FOCUSED); } else - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_FOCUSED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_FOCUSED); } else { - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); // if the acc role is MENU_BAR, UnoMSAAEvent::MENU_END event should be sent // if the acc role is POPUP_MENU, UnoMSAAEvent::MENUPOPUPEND event should be sent if (GetRole() == AccessibleRole::MENU_BAR) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::MENU_END); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::MENU_END); } else if (GetRole() == AccessibleRole::POPUP_MENU) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::MENUPOPUPEND); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::MENUPOPUPEND); } } } @@ -373,8 +373,8 @@ void AccContainerEventListener::FireStateFocusedChange(bool enable) */ void AccContainerEventListener::HandleValueChangedEvent(Any, Any) { - m_pObjManager->UpdateValue(m_xAccessible.get()); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_VALUECHANGE); + m_rObjManager.UpdateValue(m_xAccessible.get()); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_VALUECHANGE); } bool AccContainerEventListener::IsEditable(Reference<XAccessibleContext> const & xContext) @@ -391,7 +391,7 @@ bool AccContainerEventListener::NotifyChildEvent(UnoMSAAEvent eWinEvent, const A if(xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->NotifyAccEvent(pAcc, eWinEvent); + m_rObjManager.NotifyAccEvent(pAcc, eWinEvent); return true; } } @@ -404,7 +404,7 @@ void AccContainerEventListener::HandleSelectionChangedAddEvent(const Any& /*oldV { return ; } - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_ADD); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_ADD); } void AccContainerEventListener::HandleSelectionChangedRemoveEvent(const Any& /*oldValue*/, const Any& newValue) @@ -413,7 +413,7 @@ void AccContainerEventListener::HandleSelectionChangedRemoveEvent(const Any& /*o { return ; } - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_REMOVE); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_REMOVE); } void AccContainerEventListener::HandleSelectionChangedWithinEvent(const Any& /*oldValue*/, const Any& newValue) @@ -422,7 +422,7 @@ void AccContainerEventListener::HandleSelectionChangedWithinEvent(const Any& /*o { return ; } - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_WITHIN); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_WITHIN); } void AccContainerEventListener::UpdateAllChildrenState(XAccessible* pXAccessible) @@ -452,7 +452,7 @@ void AccContainerEventListener::UpdateAllChildrenState(XAccessible* pXAccessible css::accessibility::XAccessible* mpAccessible = mxAccessible.get(); if(mpAccessible != nullptr) { - m_pObjManager->UpdateState(mpAccessible); + m_rObjManager.UpdateState(mpAccessible); UpdateAllChildrenState(mpAccessible); } } @@ -460,17 +460,17 @@ void AccContainerEventListener::UpdateAllChildrenState(XAccessible* pXAccessible void AccContainerEventListener::HandlePageChangedEvent(const Any& /*oldValue*/, const Any& /*newValue*/) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_PAGECHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_PAGECHANGED); } void AccContainerEventListener::HandleSectionChangedEvent(const Any& /*oldValue*/, const Any& /*newValue*/ ) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SECTION_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SECTION_CHANGED); } void AccContainerEventListener::HandleColumnChangedEvent(const Any& /*oldValue*/, const Any& /*newValue*/) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::COLUMN_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::COLUMN_CHANGED); } void AccContainerEventListener::HandleNameChangedEvent( Any name ) @@ -487,7 +487,7 @@ void AccContainerEventListener::HandleNameChangedEvent( Any name ) short childrole = mxChildContext->getAccessibleRole(); if (childrole == AccessibleRole::TEXT) { - m_pObjManager->SetAccName(mxChild.get(), name); + m_rObjManager.SetAccName(mxChild.get(), name); } } } diff --git a/winaccessibility/source/service/AccDescendantManagerEventListener.cxx b/winaccessibility/source/service/AccDescendantManagerEventListener.cxx index d3fcb2d0fe5a..8406458230a4 100644 --- a/winaccessibility/source/service/AccDescendantManagerEventListener.cxx +++ b/winaccessibility/source/service/AccDescendantManagerEventListener.cxx @@ -32,8 +32,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccDescendantManagerEventListener::AccDescendantManagerEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - : AccComponentEventListener(pAcc, pManager) +AccDescendantManagerEventListener::AccDescendantManagerEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + : AccComponentEventListener(pAcc, rManager) { } @@ -88,10 +88,10 @@ void AccDescendantManagerEventListener::HandleSelectionChangedEvent(Any oldValue //if the Role is the SC cell ,don't add the selected state. if (xContext.is() && xContext->getAccessibleRole() != AccessibleRole::TABLE_CELL) { - m_pObjManager->IncreaseState( pAcc, AccessibleStateType::SELECTED); + m_rObjManager.IncreaseState( pAcc, AccessibleStateType::SELECTED); } - m_pObjManager->NotifyAccEvent(pAcc, UnoMSAAEvent::SELECTION_CHANGED); + m_rObjManager.NotifyAccEvent(pAcc, UnoMSAAEvent::SELECTION_CHANGED); bSend=true; } } @@ -100,12 +100,12 @@ void AccDescendantManagerEventListener::HandleSelectionChangedEvent(Any oldValue if(xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->DecreaseState( pAcc, AccessibleStateType::SELECTED); + m_rObjManager.DecreaseState( pAcc, AccessibleStateType::SELECTED); } } if (!bSend) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED); } } @@ -119,8 +119,8 @@ void AccDescendantManagerEventListener::HandleChildChangedNoFocusEvent(Any oldVa { XAccessible* pAcc = xChild.get(); - m_pObjManager->InsertAccObj(pAcc, m_xAccessible.get()); - m_pObjManager->InsertChildrenAccObj(pAcc); + m_rObjManager.InsertAccObj(pAcc, m_xAccessible.get()); + m_rObjManager.InsertChildrenAccObj(pAcc); } } if (oldValue >>= xChild) @@ -128,8 +128,8 @@ void AccDescendantManagerEventListener::HandleChildChangedNoFocusEvent(Any oldVa if(xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->DeleteChildrenAccObj( pAcc ); - m_pObjManager->DeleteAccObj( pAcc ); + m_rObjManager.DeleteChildrenAccObj( pAcc ); + m_rObjManager.DeleteAccObj( pAcc ); } } } @@ -142,7 +142,7 @@ bool AccDescendantManagerEventListener::NotifyChildEvent(UnoMSAAEvent eWinEvent, if(xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->NotifyAccEvent(pAcc, eWinEvent); + m_rObjManager.NotifyAccEvent(pAcc, eWinEvent); if (AccObjectWinManager::IsStateManageDescendant(m_xAccessible.get())) { @@ -159,7 +159,7 @@ bool AccDescendantManagerEventListener::NotifyChildEvent(UnoMSAAEvent eWinEvent, { // handle any pending deletions for objects previously removed from selection for (XAccessible* pAcc2 : m_aUnselectedChildrenForDeletion) - m_pObjManager->DeleteAccObj(pAcc2); + m_rObjManager.DeleteAccObj(pAcc2); m_aUnselectedChildrenForDeletion.clear(); } } @@ -174,7 +174,7 @@ void AccDescendantManagerEventListener::HandleSelectionChangedAddEvent(const Any { return ; } - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_ADD); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_ADD); } void AccDescendantManagerEventListener::HandleSelectionChangedRemoveEvent(const Any& /*oldValue*/, const Any &newValue) @@ -183,7 +183,7 @@ void AccDescendantManagerEventListener::HandleSelectionChangedRemoveEvent(const { return ; } - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_REMOVE); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_REMOVE); } void AccDescendantManagerEventListener::HandleSelectionChangedWithinEvent(const Any& /*oldValue*/, const Any &newValue) @@ -192,7 +192,7 @@ void AccDescendantManagerEventListener::HandleSelectionChangedWithinEvent(const { return ; } - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_WITHIN); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED_WITHIN); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/winaccessibility/source/service/AccDialogEventListener.cxx b/winaccessibility/source/service/AccDialogEventListener.cxx index 1236fc458aa2..116c2765cc39 100644 --- a/winaccessibility/source/service/AccDialogEventListener.cxx +++ b/winaccessibility/source/service/AccDialogEventListener.cxx @@ -32,8 +32,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccDialogEventListener::AccDialogEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccEventListener(pAcc, pManager) +AccDialogEventListener::AccDialogEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccEventListener(pAcc, rManager) {} AccDialogEventListener::~AccDialogEventListener() { @@ -77,9 +77,9 @@ void AccDialogEventListener::SetComponentState(sal_Int64 state, bool enable) case AccessibleStateType::VISIBLE: // UNO !VISIBLE == MSAA INVISIBLE if( enable ) - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); else - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.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 d8e6223403a3..cb59ad90a878 100644 --- a/winaccessibility/source/service/AccEventListener.cxx +++ b/winaccessibility/source/service/AccEventListener.cxx @@ -41,9 +41,9 @@ using namespace com::sun::star::accessibility; using namespace cppu; AccEventListener::AccEventListener(css::accessibility::XAccessible* pAcc, - AccObjectWinManager* pManager) + AccObjectWinManager& rManager) : m_xAccessible(pAcc) - , m_pObjManager(pManager) + , m_rObjManager(rManager) { } @@ -82,18 +82,18 @@ void AccEventListener::notifyEvent(const css::accessibility::AccessibleEventObje */ void AccEventListener::HandleNameChangedEvent(Any name) { - if (m_pObjManager->IsTopWinAcc(m_xAccessible.get())) + if (m_rObjManager.IsTopWinAcc(m_xAccessible.get())) { - XAccessible* pAccDoc = m_pObjManager->GetAccDocByAccTopWin(m_xAccessible.get()); + XAccessible* pAccDoc = m_rObjManager.GetAccDocByAccTopWin(m_xAccessible.get()); if (pAccDoc) { - m_pObjManager->UpdateAccName(pAccDoc); - m_pObjManager->NotifyAccEvent(pAccDoc, UnoMSAAEvent::OBJECT_NAMECHANGE); + m_rObjManager.UpdateAccName(pAccDoc); + m_rObjManager.NotifyAccEvent(pAccDoc, UnoMSAAEvent::OBJECT_NAMECHANGE); } } - m_pObjManager->SetAccName(m_xAccessible.get(), name); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_NAMECHANGE); + m_rObjManager.SetAccName(m_xAccessible.get(), name); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_NAMECHANGE); } /** @@ -110,9 +110,9 @@ void AccEventListener::HandleChildChangedEvent(com::sun::star::uno::Any oldValue if (xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->InsertAccObj(pAcc, m_xAccessible.get()); - m_pObjManager->InsertChildrenAccObj(pAcc); - m_pObjManager->NotifyAccEvent(pAcc, UnoMSAAEvent::CHILD_ADDED); + m_rObjManager.InsertAccObj(pAcc, m_xAccessible.get()); + m_rObjManager.InsertChildrenAccObj(pAcc); + m_rObjManager.NotifyAccEvent(pAcc, UnoMSAAEvent::CHILD_ADDED); } } else if (oldValue >>= xChild) @@ -120,9 +120,9 @@ void AccEventListener::HandleChildChangedEvent(com::sun::star::uno::Any oldValue if (xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->NotifyAccEvent(pAcc, UnoMSAAEvent::CHILD_REMOVED); - m_pObjManager->DeleteChildrenAccObj(pAcc); - m_pObjManager->DeleteAccObj(pAcc); + m_rObjManager.NotifyAccEvent(pAcc, UnoMSAAEvent::CHILD_REMOVED); + m_rObjManager.DeleteChildrenAccObj(pAcc); + m_rObjManager.DeleteAccObj(pAcc); } } } @@ -132,7 +132,7 @@ void AccEventListener::HandleChildChangedEvent(com::sun::star::uno::Any oldValue */ void AccEventListener::HandleDescriptionChangedEvent() { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_DESCRIPTIONCHANGE); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_DESCRIPTIONCHANGE); } /** @@ -140,7 +140,7 @@ void AccEventListener::HandleDescriptionChangedEvent() */ void AccEventListener::HandleBoundrectChangedEvent() { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::BOUNDRECT_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::BOUNDRECT_CHANGED); } /** @@ -148,8 +148,8 @@ void AccEventListener::HandleBoundrectChangedEvent() */ void AccEventListener::HandleVisibleDataChangedEvent() { - m_pObjManager->UpdateValue(m_xAccessible.get()); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::VISIBLE_DATA_CHANGED); + m_rObjManager.UpdateValue(m_xAccessible.get()); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::VISIBLE_DATA_CHANGED); } /** @@ -196,8 +196,8 @@ void AccEventListener::FireStateFocusedChange(bool enable) { if (enable) { - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_FOCUSED); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::STATE_FOCUSED); } else { @@ -243,7 +243,7 @@ short AccEventListener::GetParentRole() { if (m_xAccessible.is()) { - return m_pObjManager->GetParentRole(m_xAccessible.get()); + return m_rObjManager.GetParentRole(m_xAccessible.get()); } return -1; } @@ -273,7 +273,7 @@ void AccEventListener::RemoveMeFromBroadcaster(bool const isNotifyDestroy) } if (isNotifyDestroy) { - m_pObjManager->NotifyDestroy(m_xAccessible.get()); + m_rObjManager.NotifyDestroy(m_xAccessible.get()); } m_xAccessible.clear(); // release cyclic reference } diff --git a/winaccessibility/source/service/AccFrameEventListener.cxx b/winaccessibility/source/service/AccFrameEventListener.cxx index 55ecf24792d1..c10fab660d35 100644 --- a/winaccessibility/source/service/AccFrameEventListener.cxx +++ b/winaccessibility/source/service/AccFrameEventListener.cxx @@ -36,8 +36,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccFrameEventListener::AccFrameEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccEventListener(pAcc, pManager) +AccFrameEventListener::AccFrameEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccEventListener(pAcc, rManager) { } @@ -85,9 +85,9 @@ void AccFrameEventListener::HandleChildChangedEvent(Any oldValue, Any newValue) const SystemEnvData* systemdata = pvclwindow->GetWindow()->GetSystemData(); - m_pObjManager->InsertAccObj(pAcc, m_xAccessible.get(), systemdata->hWnd); - m_pObjManager->InsertChildrenAccObj(pAcc); - m_pObjManager->NotifyAccEvent(pAcc, UnoMSAAEvent::CHILD_ADDED); + m_rObjManager.InsertAccObj(pAcc, m_xAccessible.get(), systemdata->hWnd); + m_rObjManager.InsertChildrenAccObj(pAcc); + m_rObjManager.NotifyAccEvent(pAcc, UnoMSAAEvent::CHILD_ADDED); } } else if (oldValue >>= xChild) @@ -112,9 +112,9 @@ void AccFrameEventListener::SetComponentState(sal_Int64 state, bool enable ) case AccessibleStateType::VISIBLE: // UNO !VISIBLE == MSAA INVISIBLE if( enable ) - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); else - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.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 9eaab9fd0c95..f2a76c26d8e0 100644 --- a/winaccessibility/source/service/AccListEventListener.cxx +++ b/winaccessibility/source/service/AccListEventListener.cxx @@ -32,8 +32,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccListEventListener::AccListEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccDescendantManagerEventListener(pAcc, pManager) +AccListEventListener::AccListEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccDescendantManagerEventListener(pAcc, rManager) { } @@ -84,15 +84,15 @@ void AccListEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any XAccessible* pAcc = xChild.get(); // Valueset has cache the child item xacc,Update state if no insert obj - bool bHasCache = m_pObjManager->InsertAccObj(pAcc, m_xAccessible.get()); + bool bHasCache = m_rObjManager.InsertAccObj(pAcc, m_xAccessible.get()); if (!bHasCache) { - m_pObjManager->UpdateState(pAcc); + m_rObjManager.UpdateState(pAcc); } - m_pObjManager->IncreaseState( pAcc, AccessibleStateType::FOCUSED); + m_rObjManager.IncreaseState( pAcc, AccessibleStateType::FOCUSED); - m_pObjManager->NotifyAccEvent(pAcc, UnoMSAAEvent::ACTIVE_DESCENDANT_CHANGED); + m_rObjManager.NotifyAccEvent(pAcc, UnoMSAAEvent::ACTIVE_DESCENDANT_CHANGED); } } if (oldValue >>= xChild) @@ -100,7 +100,7 @@ void AccListEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any if(xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->DeleteAccObj( pAcc ); + m_rObjManager.DeleteAccObj( pAcc ); } } } @@ -116,10 +116,9 @@ void AccListEventListener::HandleValueChangedEvent(Any, Any) //to enable value changed event if (GetParentRole() == AccessibleRole::COMBO_BOX) { - XAccessible* pParentAcc = - m_pObjManager->GetParentXAccessible(m_xAccessible.get()); - m_pObjManager->UpdateValue(pParentAcc); - m_pObjManager->NotifyAccEvent(pParentAcc, UnoMSAAEvent::OBJECT_VALUECHANGE); + XAccessible* pParentAcc = m_rObjManager.GetParentXAccessible(m_xAccessible.get()); + m_rObjManager.UpdateValue(pParentAcc); + m_rObjManager.NotifyAccEvent(pParentAcc, UnoMSAAEvent::OBJECT_VALUECHANGE); } } diff --git a/winaccessibility/source/service/AccMenuEventListener.cxx b/winaccessibility/source/service/AccMenuEventListener.cxx index 25b347ebc868..425b7316b7eb 100644 --- a/winaccessibility/source/service/AccMenuEventListener.cxx +++ b/winaccessibility/source/service/AccMenuEventListener.cxx @@ -32,8 +32,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccMenuEventListener::AccMenuEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccComponentEventListener(pAcc, pManager) +AccMenuEventListener::AccMenuEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccComponentEventListener(pAcc, rManager) {} AccMenuEventListener::~AccMenuEventListener() { @@ -64,7 +64,7 @@ void AccMenuEventListener::notifyEvent( const css::accessibility::AccessibleEve */ void AccMenuEventListener::HandleSelectionChangedEventNoArgs() { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::SELECTION_CHANGED); } /** @@ -79,8 +79,8 @@ void AccMenuEventListener::FireStatePropertyChange(sal_Int64 state, bool set) { //for sub menu is popup, there is a menu selected event. case AccessibleStateType::SELECTED: - m_pObjManager->IncreaseState(m_xAccessible.get(), state); - m_pObjManager->UpdateChildState(m_xAccessible.get()); + m_rObjManager.IncreaseState(m_xAccessible.get(), state); + m_rObjManager.UpdateChildState(m_xAccessible.get()); break; default: AccComponentEventListener::FireStatePropertyChange(state, set); @@ -93,7 +93,7 @@ void AccMenuEventListener::FireStatePropertyChange(sal_Int64 state, bool set) { //for sub menu is popup, there is a menu selected event. case AccessibleStateType::SELECTED: - m_pObjManager->DecreaseState(m_xAccessible.get(), state); + m_rObjManager.DecreaseState(m_xAccessible.get(), state); break; default: diff --git a/winaccessibility/source/service/AccObjectContainerEventListener.cxx b/winaccessibility/source/service/AccObjectContainerEventListener.cxx index 137b498a2cdc..09beea09ee37 100644 --- a/winaccessibility/source/service/AccObjectContainerEventListener.cxx +++ b/winaccessibility/source/service/AccObjectContainerEventListener.cxx @@ -33,8 +33,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; AccObjectContainerEventListener::AccObjectContainerEventListener( - css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - : AccContainerEventListener(pAcc, pManager) + css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + : AccContainerEventListener(pAcc, rManager) { } AccObjectContainerEventListener::~AccObjectContainerEventListener() {} @@ -51,7 +51,7 @@ void AccObjectContainerEventListener::HandleStateChangedEvent(Any oldValue, Any { if (newV == AccessibleStateType::FOCUSED) { - m_pObjManager->UpdateAccName(m_xAccessible.get()); + m_rObjManager.UpdateAccName(m_xAccessible.get()); } } AccContainerEventListener::HandleStateChangedEvent(oldValue, newValue); diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index 24deb8150c51..6025a469aa18 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -711,16 +711,16 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* pXAcc) switch( xContext->getAccessibleRole() ) { case AccessibleRole::DIALOG: - pRet = new AccDialogEventListener(pXAcc, this); + pRet = new AccDialogEventListener(pXAcc, *this); break; case AccessibleRole::FRAME: - pRet = new AccFrameEventListener(pXAcc, this); + pRet = new AccFrameEventListener(pXAcc, *this); break; case AccessibleRole::WINDOW: - pRet = new AccWindowEventListener(pXAcc, this); + pRet = new AccWindowEventListener(pXAcc, *this); break; case AccessibleRole::ROOT_PANE: - pRet = new AccFrameEventListener(pXAcc, this); + pRet = new AccFrameEventListener(pXAcc, *this); break; //Container case AccessibleRole::CANVAS: @@ -747,12 +747,12 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* pXAcc) case AccessibleRole::TABLE_CELL: case AccessibleRole::TOOL_BAR: case AccessibleRole::VIEW_PORT: - pRet = new AccContainerEventListener(pXAcc, this); + pRet = new AccContainerEventListener(pXAcc, *this); break; case AccessibleRole::BLOCK_QUOTE: case AccessibleRole::PARAGRAPH: case AccessibleRole::HEADING: - pRet = new AccParagraphEventListener(pXAcc, this); + pRet = new AccParagraphEventListener(pXAcc, *this); break; //Component case AccessibleRole::CHECK_BOX: @@ -772,15 +772,15 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* pXAcc) case AccessibleRole::TOOL_TIP: case AccessibleRole::SPIN_BOX: case AccessibleRole::DATE_EDITOR: - pRet = new AccComponentEventListener(pXAcc, this); + pRet = new AccComponentEventListener(pXAcc, *this); break; //text component case AccessibleRole::TEXT: - pRet = new AccTextComponentEventListener(pXAcc, this); + pRet = new AccTextComponentEventListener(pXAcc, *this); break; //menu case AccessibleRole::MENU: - pRet = new AccMenuEventListener(pXAcc, this); + pRet = new AccMenuEventListener(pXAcc, *this); break; //object container case AccessibleRole::SHAPE: @@ -788,22 +788,22 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* pXAcc) case AccessibleRole::EMBEDDED_OBJECT: case AccessibleRole::GRAPHIC: case AccessibleRole::TEXT_FRAME: - pRet = new AccObjectContainerEventListener(pXAcc, this); + pRet = new AccObjectContainerEventListener(pXAcc, *this); break; //descendmanager case AccessibleRole::LIST: - pRet = new AccListEventListener(pXAcc, this); + pRet = new AccListEventListener(pXAcc, *this); break; case AccessibleRole::TREE: - pRet = new AccTreeEventListener(pXAcc, this); + pRet = new AccTreeEventListener(pXAcc, *this); break; //special case AccessibleRole::COLUMN_HEADER: case AccessibleRole::TABLE: - pRet = new AccTableEventListener(pXAcc, this); + pRet = new AccTableEventListener(pXAcc, *this); break; default: - pRet = new AccContainerEventListener(pXAcc, this); + pRet = new AccContainerEventListener(pXAcc, *this); break; } } diff --git a/winaccessibility/source/service/AccParagraphEventListener.cxx b/winaccessibility/source/service/AccParagraphEventListener.cxx index fe7504901fa5..3591af83fb14 100644 --- a/winaccessibility/source/service/AccParagraphEventListener.cxx +++ b/winaccessibility/source/service/AccParagraphEventListener.cxx @@ -32,8 +32,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccParagraphEventListener::AccParagraphEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccContainerEventListener(pAcc, pManager) +AccParagraphEventListener::AccParagraphEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccContainerEventListener(pAcc, rManager) {} AccParagraphEventListener::~AccParagraphEventListener() { @@ -64,12 +64,12 @@ void AccParagraphEventListener::notifyEvent( const css::accessibility::Accessib sal_Int64 State; if( (aEvent.NewValue >>= State) && (State == AccessibleStateType::SELECTED) ) { - m_pObjManager->IncreaseState(m_xAccessible.get(), State); + m_rObjManager.IncreaseState(m_xAccessible.get(), State); break; } else if( (aEvent.OldValue >>= State) && (State == AccessibleStateType::SELECTED) ) { - m_pObjManager->DecreaseState(m_xAccessible.get(), State); + m_rObjManager.DecreaseState(m_xAccessible.get(), State); break; } @@ -94,7 +94,7 @@ void AccParagraphEventListener::notifyEvent( const css::accessibility::Accessib */ void AccParagraphEventListener::HandleCaretChangedEvent(Any, Any) { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_CARETCHANGE); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::OBJECT_CARETCHANGE); } /** @@ -124,7 +124,7 @@ void AccParagraphEventListener::SetComponentState(sal_Int64 state, bool enable ) void AccParagraphEventListener::HandleTextSelectionChangedEvent() { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TEXT_SELECTION_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TEXT_SELECTION_CHANGED); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/winaccessibility/source/service/AccTableEventListener.cxx b/winaccessibility/source/service/AccTableEventListener.cxx index ccc67690a605..30f551e3db76 100644 --- a/winaccessibility/source/service/AccTableEventListener.cxx +++ b/winaccessibility/source/service/AccTableEventListener.cxx @@ -33,8 +33,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccTableEventListener::AccTableEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccDescendantManagerEventListener(pAcc, pManager) +AccTableEventListener::AccTableEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccDescendantManagerEventListener(pAcc, rManager) {} AccTableEventListener::~AccTableEventListener() { @@ -56,22 +56,22 @@ void AccTableEventListener::notifyEvent( const css::accessibility::AccessibleEv case AccessibleEventId::TABLE_CAPTION_CHANGED: { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_CAPTION_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_CAPTION_CHANGED); break; } case AccessibleEventId::TABLE_COLUMN_DESCRIPTION_CHANGED: { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_COLUMN_DESCRIPTION_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_COLUMN_DESCRIPTION_CHANGED); break; } case AccessibleEventId::TABLE_COLUMN_HEADER_CHANGED: { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_COLUMN_HEADER_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_COLUMN_HEADER_CHANGED); break; } case AccessibleEventId::TABLE_ROW_HEADER_CHANGED: { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_ROW_HEADER_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_ROW_HEADER_CHANGED); break; } case AccessibleEventId::TABLE_MODEL_CHANGED: @@ -81,12 +81,12 @@ void AccTableEventListener::notifyEvent( const css::accessibility::AccessibleEv } case AccessibleEventId::TABLE_SUMMARY_CHANGED: { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_SUMMARY_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_SUMMARY_CHANGED); break; } case AccessibleEventId::TABLE_ROW_DESCRIPTION_CHANGED: { - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_ROW_DESCRIPTION_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_ROW_DESCRIPTION_CHANGED); break; } default: @@ -108,8 +108,8 @@ void AccTableEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any if(xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->InsertAccObj(pAcc, m_xAccessible.get()); - m_pObjManager->NotifyAccEvent(pAcc, UnoMSAAEvent::ACTIVE_DESCENDANT_CHANGED); + m_rObjManager.InsertAccObj(pAcc, m_xAccessible.get()); + m_rObjManager.NotifyAccEvent(pAcc, UnoMSAAEvent::ACTIVE_DESCENDANT_CHANGED); } } else if (oldValue >>= xChild) @@ -118,7 +118,7 @@ void AccTableEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any if(xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->DeleteAccObj( pAcc ); + m_rObjManager.DeleteAccObj( pAcc ); } } @@ -131,11 +131,11 @@ void AccTableEventListener::HandleTableModelChangeEvent(Any newValue) if (m_xAccessible.is()) { //delete all oldValue's existing children - m_pObjManager->DeleteChildrenAccObj(m_xAccessible.get()); + m_rObjManager.DeleteChildrenAccObj(m_xAccessible.get()); //add all oldValue's existing children - m_pObjManager->InsertChildrenAccObj(m_xAccessible.get()); + m_rObjManager.InsertChildrenAccObj(m_xAccessible.get()); } - m_pObjManager->NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_MODEL_CHANGED); + m_rObjManager.NotifyAccEvent(m_xAccessible.get(), UnoMSAAEvent::TABLE_MODEL_CHANGED); } } diff --git a/winaccessibility/source/service/AccTextComponentEventListener.cxx b/winaccessibility/source/service/AccTextComponentEventListener.cxx index 05643016ea2f..7b9dfef9fe94 100644 --- a/winaccessibility/source/service/AccTextComponentEventListener.cxx +++ b/winaccessibility/source/service/AccTextComponentEventListener.cxx @@ -32,8 +32,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccTextComponentEventListener::AccTextComponentEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccComponentEventListener(pAcc, pManager) +AccTextComponentEventListener::AccTextComponentEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccComponentEventListener(pAcc, rManager) {} AccTextComponentEventListener::~AccTextComponentEventListener() { diff --git a/winaccessibility/source/service/AccTreeEventListener.cxx b/winaccessibility/source/service/AccTreeEventListener.cxx index b7c80b2d1f9a..377e2505c8bc 100644 --- a/winaccessibility/source/service/AccTreeEventListener.cxx +++ b/winaccessibility/source/service/AccTreeEventListener.cxx @@ -32,8 +32,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccTreeEventListener::AccTreeEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccDescendantManagerEventListener(pAcc, pManager) +AccTreeEventListener::AccTreeEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccDescendantManagerEventListener(pAcc, rManager) {} AccTreeEventListener::~AccTreeEventListener() { @@ -71,8 +71,8 @@ void AccTreeEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any if(xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->InsertAccObj(pAcc, m_xAccessible.get()); - m_pObjManager->NotifyAccEvent(pAcc, UnoMSAAEvent::ACTIVE_DESCENDANT_CHANGED); + m_rObjManager.InsertAccObj(pAcc, m_xAccessible.get()); + m_rObjManager.NotifyAccEvent(pAcc, UnoMSAAEvent::ACTIVE_DESCENDANT_CHANGED); } } if (oldValue >>= xChild) @@ -81,7 +81,7 @@ void AccTreeEventListener::HandleActiveDescendantChangedEvent(Any oldValue, Any if(xChild.is()) { XAccessible* pAcc = xChild.get(); - m_pObjManager->DeleteAccObj(pAcc); + m_rObjManager.DeleteAccObj(pAcc); } } diff --git a/winaccessibility/source/service/AccWindowEventListener.cxx b/winaccessibility/source/service/AccWindowEventListener.cxx index 5a96914ea53c..71d078c33cda 100644 --- a/winaccessibility/source/service/AccWindowEventListener.cxx +++ b/winaccessibility/source/service/AccWindowEventListener.cxx @@ -32,8 +32,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; -AccWindowEventListener::AccWindowEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager) - :AccEventListener(pAcc, pManager) +AccWindowEventListener::AccWindowEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager& rManager) + :AccEventListener(pAcc, rManager) {} AccWindowEventListener::~AccWindowEventListener() { @@ -77,18 +77,18 @@ void AccWindowEventListener::SetComponentState(sal_Int64 state, bool enable ) case AccessibleStateType::VISIBLE: // UNO !VISIBLE == MSAA INVISIBLE if( enable ) - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); else - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::VISIBLE); break; case AccessibleStateType::SHOWING: // UNO !SHOWING == MSAA OFFSCREEN if( enable ) { - m_pObjManager->IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); + m_rObjManager.IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); } else - m_pObjManager->DecreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); + m_rObjManager.DecreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING); break; default: break;