diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2025-01-28 10:55:54 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2025-01-29 08:25:57 +0100 |
commit | cf8a59f258d10d1bc9b2eb27dbea91d26e2a1b84 (patch) | |
tree | 4455b0110b858a8e1906cad2c852910d44591692 /toolkit | |
parent | 7ebcd51ea2959c6c01ba2529a83509d3dcd04745 (diff) |
uno grid a11y: Use cppu::ImplInheritanceHelper
Change-Id: I363a3836ee46f1243c6d61c323910bcac70c0da6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180834
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/inc/controls/table/AccessibleGridControlTableCell.hxx | 22 | ||||
-rw-r--r-- | toolkit/source/controls/table/AccessibleGridControlTableCell.cxx | 34 |
2 files changed, 10 insertions, 46 deletions
diff --git a/toolkit/inc/controls/table/AccessibleGridControlTableCell.hxx b/toolkit/inc/controls/table/AccessibleGridControlTableCell.hxx index 57d5118cb87e..334b1ffdaba9 100644 --- a/toolkit/inc/controls/table/AccessibleGridControlTableCell.hxx +++ b/toolkit/inc/controls/table/AccessibleGridControlTableCell.hxx @@ -61,13 +61,12 @@ namespace accessibility AccessibleGridControlCell& operator=( const AccessibleGridControlCell& ) = delete; }; - typedef ::cppu::ImplHelper2 < css::accessibility::XAccessibleText - , css::accessibility::XAccessible - > AccessibleTextHelper_BASE; // implementation of a table cell of GridControl - class AccessibleGridControlTableCell final :public AccessibleGridControlCell - ,public AccessibleTextHelper_BASE - ,public ::comphelper::OCommonAccessibleText + class AccessibleGridControlTableCell final + : public cppu::ImplInheritanceHelper<AccessibleGridControlCell, + css::accessibility::XAccessibleText, + css::accessibility::XAccessible>, + public ::comphelper::OCommonAccessibleText { private: // OCommonAccessibleText @@ -82,17 +81,6 @@ namespace accessibility sal_Int32 _nRowId, sal_uInt16 _nColId); - // XInterface ------------------------------------------------------------- - - /** Queries for a new interface. */ - css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override; - - /** Acquires the object (calls acquire() on base class). */ - virtual void SAL_CALL acquire() noexcept override; - - /** Releases the object (calls release() on base class). */ - virtual void SAL_CALL release() noexcept override; - /** @return The index of this object among the parent's children. */ virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override; diff --git a/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx b/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx index 0d80a6977a29..1145a79b2f7c 100644 --- a/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx +++ b/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx @@ -96,38 +96,14 @@ namespace accessibility nEndIndex = 0; } - AccessibleGridControlTableCell::AccessibleGridControlTableCell(const css::uno::Reference<XAccessible >& _rxParent, - svt::table::TableControl& _rTable, - sal_Int32 _nRowPos, - sal_uInt16 _nColPos) - :AccessibleGridControlCell(_rxParent, _rTable, _nRowPos, _nColPos, AccessibleTableControlObjType::TABLECELL) + AccessibleGridControlTableCell::AccessibleGridControlTableCell( + const css::uno::Reference<XAccessible>& _rxParent, svt::table::TableControl& _rTable, + sal_Int32 _nRowPos, sal_uInt16 _nColPos) + : ImplInheritanceHelper(_rxParent, _rTable, _nRowPos, _nColPos, + AccessibleTableControlObjType::TABLECELL) { } - // XInterface - - /** Queries for a new interface. */ - css::uno::Any SAL_CALL AccessibleGridControlTableCell::queryInterface( - const css::uno::Type& rType ) - { - Any aRet = AccessibleGridControlCell::queryInterface(rType); - if ( !aRet.hasValue() ) - aRet = AccessibleTextHelper_BASE::queryInterface(rType); - return aRet; - } - - /** Acquires the object (calls acquire() on base class). */ - void SAL_CALL AccessibleGridControlTableCell::acquire() noexcept - { - AccessibleGridControlCell::acquire(); - } - - /** Releases the object (calls release() on base class). */ - void SAL_CALL AccessibleGridControlTableCell::release() noexcept - { - AccessibleGridControlCell::release(); - } - css::awt::Rectangle SAL_CALL AccessibleGridControlTableCell::getCharacterBounds( sal_Int32 nIndex ) { SolarMutexGuard aSolarGuard; |