From 259480c5e1a387e01618dcd772e0ecdeead9b88b Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 7 Dec 2024 01:34:27 +0500 Subject: [PATCH] Simplify OABSPilotUno Change-Id: Id722754aadecbb0cdb0a35fd8b3a7ac24e21b546 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178026 Reviewed-by: Mike Kaganski Tested-by: Jenkins --- extensions/source/abpilot/unodialogabp.cxx | 31 +--------------------- extensions/source/abpilot/unodialogabp.hxx | 14 ++-------- 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/extensions/source/abpilot/unodialogabp.cxx b/extensions/source/abpilot/unodialogabp.cxx index 4baafbf7f705..b8d78e81e888 100644 --- a/extensions/source/abpilot/unodialogabp.cxx +++ b/extensions/source/abpilot/unodialogabp.cxx @@ -35,41 +35,12 @@ namespace abp using namespace ::com::sun::star::ui::dialogs; OABSPilotUno::OABSPilotUno(const Reference< XComponentContext >& _rxORB) - :OGenericUnoDialog(_rxORB) + : OABSPilotUno_JBase(_rxORB) { registerProperty( u"DataSourceName"_ustr, PROPERTY_ID_DATASOURCENAME, PropertyAttribute::READONLY , &m_sDataSourceName, cppu::UnoType::get() ); } - Any SAL_CALL OABSPilotUno::queryInterface( const Type& aType ) - { - Any aReturn = svt::OGenericUnoDialog::queryInterface( aType ); - return aReturn.hasValue() ? aReturn : OABSPilotUno_JBase::queryInterface( aType ); - } - - void SAL_CALL OABSPilotUno::acquire( ) noexcept - { - svt::OGenericUnoDialog::acquire(); - } - - void SAL_CALL OABSPilotUno::release( ) noexcept - { - svt::OGenericUnoDialog::release(); - } - - Sequence< Type > SAL_CALL OABSPilotUno::getTypes( ) - { - return ::comphelper::concatSequences( - svt::OGenericUnoDialog::getTypes(), - OABSPilotUno_JBase::getTypes() - ); - } - - Sequence SAL_CALL OABSPilotUno::getImplementationId( ) - { - return css::uno::Sequence(); - } - OUString SAL_CALL OABSPilotUno::getImplementationName() { return u"org.openoffice.comp.abp.OAddressBookSourcePilot"_ustr; diff --git a/extensions/source/abpilot/unodialogabp.hxx b/extensions/source/abpilot/unodialogabp.hxx index b8bd940afa04..b07f0b2d870b 100644 --- a/extensions/source/abpilot/unodialogabp.hxx +++ b/extensions/source/abpilot/unodialogabp.hxx @@ -28,12 +28,11 @@ namespace abp { class OABSPilotUno; - typedef ::cppu::ImplHelper1< css::task::XJob > OABSPilotUno_JBase; + typedef cppu::ImplInheritanceHelper OABSPilotUno_JBase; typedef ::comphelper::OPropertyArrayUsageHelper< OABSPilotUno > OABSPilotUno_PBase; /// the UNO wrapper for the address book source pilot class OABSPilotUno - : public svt::OGenericUnoDialog - , public OABSPilotUno_JBase + : public OABSPilotUno_JBase , public OABSPilotUno_PBase { OUString m_sDataSourceName; @@ -42,15 +41,6 @@ namespace abp explicit OABSPilotUno(const css::uno::Reference< css::uno::XComponentContext >& _rxORB); private: - // XInterface (disambiguation) - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override; - virtual void SAL_CALL acquire( ) noexcept override; - virtual void SAL_CALL release( ) noexcept override; - - // XTypeProvider - virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; - virtual css::uno::Sequence SAL_CALL getImplementationId( ) override; - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() override;