summaryrefslogtreecommitdiff
path: root/accessibility/inc
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-03-03 14:49:57 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2022-03-04 08:05:16 +0100
commit83419f869c33d550a61d260b1b3aef6a00cefc45 (patch)
treecfaea01b06c61203195c8373ca4966db2b073193 /accessibility/inc
parenta9c57e6ac6bc46ad78b66409a964f5b717878931 (diff)
tdf#147742 a11y: AccessibleGridControl...: get accessible name on demand
Base class `AccessibleGridControlBase` was retrieving an accessible name and storing it in class member 'm_aName'. For the classes representing cells, derived from `AccessibleGridControlCell`, the index is needed to get a meaningful name, so the name retrieved in the `AccessibleGridControlBase` ctor with hard-coded row/column indices of 0 was replaced again in the `AccessibleGridControlCell` ctor. Replace that logic to just retrieve the name on demand, and override 'getAccessibleName' in `AccessibleGridControlCell` using the logic used in its ctor previously. (No functional change intended here, but a somewhat similar handling for the accessible description was causing a crash when the Orca screen reader was active. This will be handled in a following commit.) Change-Id: I87eabb2ce3c99d4a622d919ab0fb8d7fb3beed6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130933 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'accessibility/inc')
-rw-r--r--accessibility/inc/extended/AccessibleGridControlBase.hxx14
-rw-r--r--accessibility/inc/extended/AccessibleGridControlTableCell.hxx4
2 files changed, 5 insertions, 13 deletions
diff --git a/accessibility/inc/extended/AccessibleGridControlBase.hxx b/accessibility/inc/extended/AccessibleGridControlBase.hxx
index 361c8d4d59f6..4075b7f7964f 100644
--- a/accessibility/inc/extended/AccessibleGridControlBase.hxx
+++ b/accessibility/inc/extended/AccessibleGridControlBase.hxx
@@ -61,7 +61,7 @@ class AccessibleGridControlBase :
public AccessibleGridControlImplHelper
{
public:
- /** Constructor sets specified name and description.
+ /** Constructor.
@param rxParent XAccessible interface of the parent object.
@param rTable The Table control.
@param eObjType Type of accessible table control. */
@@ -227,10 +227,6 @@ protected:
/** @throws <type>DisposedException</type> If the object is not alive. */
void ensureIsAlive() const;
- /** Changes the name of the object (flat assignment, no notify).
- @attention This method requires a locked mutex. */
- inline void implSetName( const OUString& rName );
-
/** Locks all mutex's and calculates the bounding box relative to the
parent window.
@return The bounding box (VCL rect.) relative to the parent object.
@@ -257,8 +253,6 @@ protected:
::vcl::table::AccessibleTableControlObjType m_eObjType;
private:
- /** Localized name. */
- OUString m_aName;
/** Localized description text. */
OUString m_aDescription;
::comphelper::AccessibleEventNotifier::TClientId m_aClientId;
@@ -315,12 +309,6 @@ inline ::vcl::table::AccessibleTableControlObjType AccessibleGridControlBase::ge
return m_eObjType;
}
-inline void AccessibleGridControlBase::implSetName(
- const OUString& rName )
-{
- m_aName = rName;
-}
-
} // namespace accessibility
diff --git a/accessibility/inc/extended/AccessibleGridControlTableCell.hxx b/accessibility/inc/extended/AccessibleGridControlTableCell.hxx
index 77077183b54b..6e3ee3367ae8 100644
--- a/accessibility/inc/extended/AccessibleGridControlTableCell.hxx
+++ b/accessibility/inc/extended/AccessibleGridControlTableCell.hxx
@@ -40,6 +40,10 @@ namespace accessibility
// XAccessibleComponent
virtual void SAL_CALL grabFocus() override;
+ public:
+ // XAccessibleContext
+ virtual OUString SAL_CALL getAccessibleName() override;
+
protected:
AccessibleGridControlCell(
const css::uno::Reference< css::accessibility::XAccessible >& _rxParent,