toolkit a11y: Use OAccessibleComponentHelper for grid control
commit7107db3fe773629cc511eb5922bc9c28c9c5c60a
authorMichael Weghorn <m.weghorn@posteo.de>
Fri, 24 Jan 2025 17:57:58 +0000 (24 18:57 +0100)
committerMichael Weghorn <m.weghorn@posteo.de>
Fri, 24 Jan 2025 21:02:08 +0000 (24 22:02 +0100)
tree75bc61f32d746cafd997c040d7957924d12bd0ba
parentd1d2afa7dd9591664c72fffd6cd941220bb05999
toolkit a11y: Use OAccessibleComponentHelper for grid control

Simplify AccessibleGridControlBase by subclassing the
comphelper::OAccessibleComponentHelper helper class
that already provides much of the logic.

Unless I'm missing anything, the corresponding custom
implementations in AccessibleGridControlBase were
equivalent (and partly looked copy-pasted).

Notes:

* XAccessibleEventBroadcaster logic is fully implemented
  in OAccessibleComponentHelper, so drop the custom logic.

* In order to implement XAccessibleComponent methods,
  only OAccessibleComponentHelper::getBounds needs
  to be overriden. The logic is already implemented
  in AccessibleGridControlBase::implGetBoundingBox,
  just need to convert from tools::Rectangle to
  css::awt::Rectangle in addition.
  Drop all of the other methods related to location/bounds
  handling. The AccessibleGridControlBase logic takes
  care of that now.

* Drop AccessibleGridControlBase::ensureIsAlive and
  use OAccessibleComponentHelper::ensureAlive instead,
  which has the same logic.

In a quick test using sample document attachment 198647
from tdf#164783 with the qt6 VCL plugin and Accerciser
and the Orca screen reader, no differences in behavior
were observed with this change in place.

Change-Id: I90099dd5426db093260175b2c3d09db548e05c33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180723
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
toolkit/inc/controls/table/AccessibleGridControlBase.hxx
toolkit/inc/controls/table/AccessibleGridControlTable.hxx
toolkit/source/controls/table/AccessibleGridControl.cxx
toolkit/source/controls/table/AccessibleGridControlBase.cxx
toolkit/source/controls/table/AccessibleGridControlHeader.cxx
toolkit/source/controls/table/AccessibleGridControlHeaderCell.cxx
toolkit/source/controls/table/AccessibleGridControlTable.cxx
toolkit/source/controls/table/AccessibleGridControlTableBase.cxx
toolkit/source/controls/table/AccessibleGridControlTableCell.cxx