diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-03-03 15:34:06 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-03-04 08:05:33 +0100 |
commit | fbe4d77d961975bafe8ea3e419651df4d418f92b (patch) | |
tree | 8e87aa280d2955e58a12593d95133b944e036446 /accessibility | |
parent | 83419f869c33d550a61d260b1b3aef6a00cefc45 (diff) |
tdf#147742 a11y: AccessibleGridControlBase: get accessible desc on demand
Previously, the accessible description was retrieved
in the `AccessibleGridControlBase` ctor and stored
in a class member. Change that to fetch the
description on demand.
`TableControl::GetAccessibleObjectDescription` is used
to get the description, which currently uses the row and
column index of the currently active cell.
When using the macro from the sample document in tdf#147742
with the Orca screen reader active, no cell was active
at the point that the ctor was called, so
`ROW_INVALID`/`COL_INVALID` were used, resulting
in a crash later (s. backtrace in tdf#147742).
If necessary, `TableControl::GetAccessibleObjectDescription`
could be extended to allow passing an explicit row/column index,
as is the case for `TableControl::GetAccessibleName`, then
override `AccessibleGridControlBase::getAccessibleDescription`
in `AccessibleGridControlCell`, similar to how it is done
for the accessible name in
Change-Id I87eabb2ce3c99d4a622d919ab0fb8d7fb3beed6b
("tdf#147742 a11y: AccessibleGridControl...: get accessible name on
demand").
Change-Id: I58f3a2b0c83e2cdbae103811505d7d0a4f8bfc52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130934
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/inc/extended/AccessibleGridControlBase.hxx | 2 | ||||
-rw-r--r-- | accessibility/source/extended/AccessibleGridControlBase.cxx | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/accessibility/inc/extended/AccessibleGridControlBase.hxx b/accessibility/inc/extended/AccessibleGridControlBase.hxx index 4075b7f7964f..7da777d8dac2 100644 --- a/accessibility/inc/extended/AccessibleGridControlBase.hxx +++ b/accessibility/inc/extended/AccessibleGridControlBase.hxx @@ -253,8 +253,6 @@ protected: ::vcl::table::AccessibleTableControlObjType m_eObjType; private: - /** Localized description text. */ - OUString m_aDescription; ::comphelper::AccessibleEventNotifier::TClientId m_aClientId; }; diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx index c02d921fa1a1..915aeb7e373e 100644 --- a/accessibility/source/extended/AccessibleGridControlBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlBase.cxx @@ -54,7 +54,6 @@ AccessibleGridControlBase::AccessibleGridControlBase( m_xParent( rxParent ), m_aTable( rTable), m_eObjType( eObjType ), - m_aDescription( rTable.GetAccessibleObjectDescription( eObjType ) ), m_aClientId(0) { } @@ -134,7 +133,7 @@ OUString SAL_CALL AccessibleGridControlBase::getAccessibleDescription() SolarMutexGuard g; ensureIsAlive(); - return m_aDescription; + return m_aTable.GetAccessibleObjectDescription(m_eObjType); } OUString SAL_CALL AccessibleGridControlBase::getAccessibleName() |