diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-08-07 21:43:23 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-08-08 08:18:28 +0200 |
commit | 37b72ba4542ca8dc49d0121be995d9253c65d6ba (patch) | |
tree | f2ea1e637aa4bc843d88431d6dc1e8054a632e7f /solenv | |
parent | df73c73b3f798453675f286bca537f102a71e770 (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 'solenv')
-rw-r--r-- | solenv/clang-format/excludelist | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index c49000bc3350..64eded82acab 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -15132,7 +15132,6 @@ winaccessibility/inc/AccContainerEventListener.hxx winaccessibility/inc/AccDescendantManagerEventListener.hxx winaccessibility/inc/AccObject.hxx winaccessibility/inc/AccObjectContainerEventListener.hxx -winaccessibility/inc/AccObjectManagerAgent.hxx winaccessibility/inc/AccObjectWinManager.hxx winaccessibility/source/UAccCOM/AccAction.cxx winaccessibility/source/UAccCOM/AccAction.h @@ -15168,7 +15167,6 @@ winaccessibility/source/service/AccFrameEventListener.cxx winaccessibility/source/service/AccListEventListener.cxx winaccessibility/source/service/AccMenuEventListener.cxx winaccessibility/source/service/AccObject.cxx -winaccessibility/source/service/AccObjectManagerAgent.cxx winaccessibility/source/service/AccObjectWinManager.cxx winaccessibility/source/service/AccParagraphEventListener.cxx winaccessibility/source/service/AccTableEventListener.cxx |