basctl/source/accessibility/accessibledialogcontrolshape.cxx | 6 -- basctl/source/inc/accessibledialogcontrolshape.hxx | 20 ++------ dbaccess/source/ui/inc/TableWindowAccess.hxx | 25 ++--------- dbaccess/source/ui/querydesign/TableWindowAccess.cxx | 12 ----- 4 files changed, 12 insertions(+), 51 deletions(-)
New commits: commit bbe63da41a2e6cd877fccf76bd57c66ab81cf3e9 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Jan 27 14:50:41 2023 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sat Jan 28 17:43:06 2023 +0000 Use ImplInheritanceHelper in OTableWindowAccess Change-Id: I4677b9f5e3fe21c6ff80e20bbb7b6befca9f99ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146273 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/dbaccess/source/ui/inc/TableWindowAccess.hxx b/dbaccess/source/ui/inc/TableWindowAccess.hxx index 860c47ba178b..09aa268f1e6c 100644 --- a/dbaccess/source/ui/inc/TableWindowAccess.hxx +++ b/dbaccess/source/ui/inc/TableWindowAccess.hxx @@ -20,21 +20,20 @@ #include "TableWindow.hxx" #include <com/sun/star/accessibility/XAccessibleRelationSet.hpp> -#include <cppuhelper/implbase2.hxx> +#include <cppuhelper/implbase.hxx> #include <toolkit/awt/vclxaccessiblecomponent.hxx> #include <vcl/vclptr.hxx> namespace dbaui { - typedef ::cppu::ImplHelper2< css::accessibility::XAccessibleRelationSet, - css::accessibility::XAccessible - > OTableWindowAccess_BASE; class OTableWindow; /** the class OTableWindowAccess represents the accessible object for table windows like they are used in the QueryDesign and the RelationDesign */ - class OTableWindowAccess : public VCLXAccessibleComponent - , public OTableWindowAccess_BASE + class OTableWindowAccess : public cppu::ImplInheritanceHelper< + VCLXAccessibleComponent, + css::accessibility::XAccessibleRelationSet, + css::accessibility::XAccessible> { VclPtr<OTableWindow> m_pTable; // the window which I should give accessibility to @@ -48,20 +47,6 @@ namespace dbaui public: OTableWindowAccess( OTableWindow* _pTable); - // XInterface - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override; - virtual void SAL_CALL acquire( ) noexcept override - { // here inline is allowed because we do not use this class outside this dll - VCLXAccessibleComponent::acquire( ); - } - virtual void SAL_CALL release( ) noexcept override - { // here inline is allowed because we do not use this class outside this dll - VCLXAccessibleComponent::release( ); - } - - // XTypeProvider - virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx index 826cf22c7629..8d3ce6b2de77 100644 --- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx @@ -24,7 +24,6 @@ #include <com/sun/star/accessibility/AccessibleRole.hpp> #include <com/sun/star/accessibility/AccessibleRelationType.hpp> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> -#include <comphelper/sequence.hxx> #include <vcl/vclevent.hxx> namespace dbaui @@ -36,7 +35,7 @@ namespace dbaui using namespace ::com::sun::star; OTableWindowAccess::OTableWindowAccess(OTableWindow* _pTable) - :VCLXAccessibleComponent(_pTable->GetComponentInterface().is() ? _pTable->GetWindowPeer() : nullptr) + :ImplInheritanceHelper(_pTable->GetComponentInterface().is() ? _pTable->GetWindowPeer() : nullptr) ,m_pTable(_pTable) { } @@ -55,15 +54,6 @@ namespace dbaui VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); } - Any SAL_CALL OTableWindowAccess::queryInterface( const Type& aType ) - { - Any aRet(VCLXAccessibleComponent::queryInterface( aType )); - return aRet.hasValue() ? aRet : OTableWindowAccess_BASE::queryInterface( aType ); - } - Sequence< Type > SAL_CALL OTableWindowAccess::getTypes( ) - { - return ::comphelper::concatSequences(VCLXAccessibleComponent::getTypes(),OTableWindowAccess_BASE::getTypes()); - } OUString SAL_CALL OTableWindowAccess::getImplementationName() { return "org.openoffice.comp.dbu.TableWindowAccessibility"; commit 5a704330ae63edf60bd33900abe71c4ea6a7eb3d Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Jan 27 14:23:04 2023 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sat Jan 28 17:42:58 2023 +0000 Use ImplInheritanceHelper in AccessibleDialogControlShape Change-Id: Icc6ebfc0f2285f8f281abe2240f56300d4ed7f2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146272 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index b7972f3a1ea2..36e84bfea9fc 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -227,12 +227,6 @@ awt::Rectangle AccessibleDialogControlShape::implGetBounds() return GetBounds(); } -// XInterface -IMPLEMENT_FORWARD_XINTERFACE2( AccessibleDialogControlShape, OAccessibleExtendedComponentHelper, AccessibleDialogControlShape_BASE ) - -// XTypeProvider -IMPLEMENT_FORWARD_XTYPEPROVIDER2( AccessibleDialogControlShape, OAccessibleExtendedComponentHelper, AccessibleDialogControlShape_BASE ) - // XComponent void AccessibleDialogControlShape::disposing() { diff --git a/basctl/source/inc/accessibledialogcontrolshape.hxx b/basctl/source/inc/accessibledialogcontrolshape.hxx index 9882bac5ba63..3af6e3da90ee 100644 --- a/basctl/source/inc/accessibledialogcontrolshape.hxx +++ b/basctl/source/inc/accessibledialogcontrolshape.hxx @@ -22,7 +22,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <comphelper/accessiblecomponenthelper.hxx> -#include <cppuhelper/implbase3.hxx> +#include <cppuhelper/implbase.hxx> #include <vcl/vclptr.hxx> namespace vcl { class Window; } @@ -35,13 +35,11 @@ class DialogWindow; -typedef ::cppu::ImplHelper3< - css::accessibility::XAccessible, - css::lang::XServiceInfo, - css::beans::XPropertyChangeListener > AccessibleDialogControlShape_BASE; - -class AccessibleDialogControlShape final : public comphelper::OAccessibleExtendedComponentHelper, - public AccessibleDialogControlShape_BASE +class AccessibleDialogControlShape final : public cppu::ImplInheritanceHelper< + comphelper::OAccessibleExtendedComponentHelper, + css::accessibility::XAccessible, + css::lang::XServiceInfo, + css::beans::XPropertyChangeListener> { friend class AccessibleDialogWindow; @@ -79,12 +77,6 @@ public: AccessibleDialogControlShape (DialogWindow*, DlgEdObj*); virtual ~AccessibleDialogControlShape() override; - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - // XEventListener virtual void SAL_CALL disposing( const css::lang::EventObject& rSource ) override;