summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/table/AccessibleGridControlHeader.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-01-24 18:57:58 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2025-01-24 22:02:08 +0100
commit7107db3fe773629cc511eb5922bc9c28c9c5c60a (patch)
tree75bc61f32d746cafd997c040d7957924d12bd0ba /toolkit/source/controls/table/AccessibleGridControlHeader.cxx
parentd1d2afa7dd9591664c72fffd6cd941220bb05999 (diff)
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>
Diffstat (limited to 'toolkit/source/controls/table/AccessibleGridControlHeader.cxx')
-rw-r--r--toolkit/source/controls/table/AccessibleGridControlHeader.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/toolkit/source/controls/table/AccessibleGridControlHeader.cxx b/toolkit/source/controls/table/AccessibleGridControlHeader.cxx
index ea1c71b138eb..b77d63355b80 100644
--- a/toolkit/source/controls/table/AccessibleGridControlHeader.cxx
+++ b/toolkit/source/controls/table/AccessibleGridControlHeader.cxx
@@ -58,7 +58,7 @@ AccessibleGridControlHeader::getAccessibleChild( sal_Int64 nChildIndex )
if (nChildIndex<0 || nChildIndex>=getAccessibleChildCount())
throw IndexOutOfBoundsException();
- ensureIsAlive();
+ ensureAlive();
Reference< XAccessible > xChild;
if (m_eObjType == vcl::table::AccessibleTableControlObjType::COLUMNHEADERBAR)
{
@@ -79,7 +79,7 @@ sal_Int64 SAL_CALL AccessibleGridControlHeader::getAccessibleIndexInParent()
{
SolarMutexGuard aSolarGuard;
- ensureIsAlive();
+ ensureAlive();
if (m_eObjType == vcl::table::AccessibleTableControlObjType::ROWHEADERBAR && m_aTable.HasColHeader())
return 1;
else
@@ -93,7 +93,7 @@ AccessibleGridControlHeader::getAccessibleAtPoint( const awt::Point& rPoint )
{
SolarMutexGuard aSolarGuard;
- ensureIsAlive();
+ ensureAlive();
sal_Int32 nRow = 0;
sal_Int32 nColumnPos = 0;
@@ -104,7 +104,7 @@ AccessibleGridControlHeader::getAccessibleAtPoint( const awt::Point& rPoint )
void SAL_CALL AccessibleGridControlHeader::grabFocus()
{
- ensureIsAlive();
+ ensureAlive();
// focus on header not supported
}
@@ -114,7 +114,7 @@ OUString SAL_CALL AccessibleGridControlHeader::getAccessibleRowDescription( sal_
{
SolarMutexGuard aSolarGuard;
- ensureIsAlive();
+ ensureAlive();
ensureIsValidRow( nRow );
return OUString(); // no headers in headers
}
@@ -123,7 +123,7 @@ OUString SAL_CALL AccessibleGridControlHeader::getAccessibleColumnDescription( s
{
SolarMutexGuard aSolarGuard;
- ensureIsAlive();
+ ensureAlive();
ensureIsValidColumn( nColumn );
return OUString(); // no headers in headers
}
@@ -132,7 +132,7 @@ Reference< XAccessibleTable > SAL_CALL AccessibleGridControlHeader::getAccessibl
{
SolarMutexGuard g;
- ensureIsAlive();
+ ensureAlive();
return nullptr; // no headers in headers
}
@@ -140,7 +140,7 @@ Reference< XAccessibleTable > SAL_CALL AccessibleGridControlHeader::getAccessibl
{
SolarMutexGuard g;
- ensureIsAlive();
+ ensureAlive();
return nullptr; // no headers in headers
}
//not selectable
@@ -169,7 +169,7 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlHeader::getAccessibleCell
{
SolarMutexGuard g;
- ensureIsAlive();
+ ensureAlive();
ensureIsValidAddress(nRow, nColumn);
return implGetChild(nRow, nColumn);
}