summaryrefslogtreecommitdiff
path: root/winaccessibility/inc/AccListEventListener.hxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-08-07 21:43:23 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-08-08 08:18:28 +0200
commit37b72ba4542ca8dc49d0121be995d9253c65d6ba (patch)
treef2ea1e637aa4bc843d88431d6dc1e8054a632e7f /winaccessibility/inc/AccListEventListener.hxx
parentdf73c73b3f798453675f286bca537f102a71e770 (diff)
wina11y: Drop AccObjectManagerAgent indirection
`AccObjectManagerAgent` was holding an `AccObjectWinManager` object and forwarding everything to that one and the event listeners were holding a pointer to the `AccObjectManagerAgent` object. Drop this `AccObjectManagerAgent` indirection and let all of the classes that were interacting with the `AccObjectManagerAgent` directly interact with the `AccObjectWinManager` instead. The idea of having the agent seems to have been to have an abstraction layer and implement different accessible object managers for all platforms, but the agent already has quite some Windows-/IAccessible-specific code/interface and by now, the Linux VCL plugins and macOS have their own a11y bridges, so the TODO do implement this here for Linux as well seems outdated to me. Even if implementing this for Linux and/or macOS in a similar way, I don't see the need for the agent layer, but one way might be to just have an abstract base class (e.g. `AccObjectManager`) that `AccObjectWinManager` and implementations for other platforms derive from, and have the SalInstance return the platform-specific implementation that the `AccTopWindowListener` would then retrieve and pass on. Given that `AccObjectManagerAgent` was forwarding all calls to `AccObjectWinManager` and the methods and params are mostly the same by now (s.a. the preparatory commits), this change is mostly straightforward. A few notes: * `AccObjectManagerAgent::InsertAccObj` had a default nullptr value for the HWND that `AccObjectWinManager:InsertAccObj` didn't have yet, so add that. * `AccObjectManagerAgent::GetIAccessibleFromResID` had an out param instead of a return value; call sites were adapted to fit `AccObjectWinManager:GetIAccessibleFromResID`. * The `UpdateValue` and `UpdateAccName` methods taking 2 params are called `SetValue` and `SetAccName` in `AccObjectWinManager` instead, so adapt call sites accordingly. * prewin.h and postwin.h includes had to be added around the windows.h include in AccObjectWinManager.hxx (build would otherwise fail) * A few `AccObjectWinManager` methods had to be made virtual to make linking work. Change-Id: I88741bf416d4db25d78e973c0db060a828f27926 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155440 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility/inc/AccListEventListener.hxx')
-rw-r--r--winaccessibility/inc/AccListEventListener.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/winaccessibility/inc/AccListEventListener.hxx b/winaccessibility/inc/AccListEventListener.hxx
index bd75a977c531..eb9911308d81 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, AccObjectManagerAgent* Agent);
+ AccListEventListener(css::accessibility::XAccessible* pAcc, AccObjectWinManager* pManager);
virtual ~AccListEventListener() override;
// XAccessibleEventListener