From cf8a59f258d10d1bc9b2eb27dbea91d26e2a1b84 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 28 Jan 2025 10:55:54 +0100 Subject: 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 --- .../table/AccessibleGridControlTableCell.hxx | 22 ++++---------- .../table/AccessibleGridControlTableCell.cxx | 34 ++++------------------ 2 files changed, 10 insertions(+), 46 deletions(-) (limited to 'toolkit') 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, + 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& _rxParent, - svt::table::TableControl& _rTable, - sal_Int32 _nRowPos, - sal_uInt16 _nColPos) - :AccessibleGridControlCell(_rxParent, _rTable, _nRowPos, _nColPos, AccessibleTableControlObjType::TABLECELL) + AccessibleGridControlTableCell::AccessibleGridControlTableCell( + const css::uno::Reference& _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; -- cgit