Simplify OABSPilotUno

Change-Id: Id722754aadecbb0cdb0a35fd8b3a7ac24e21b546
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178026
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Mike Kaganski 2024-12-07 01:34:27 +05:00
parent 734f80b669
commit 259480c5e1
2 changed files with 3 additions and 42 deletions

View file

@ -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<decltype(m_sDataSourceName)>::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_Int8> SAL_CALL OABSPilotUno::getImplementationId( )
{
return css::uno::Sequence<sal_Int8>();
}
OUString SAL_CALL OABSPilotUno::getImplementationName()
{
return u"org.openoffice.comp.abp.OAddressBookSourcePilot"_ustr;

View file

@ -28,12 +28,11 @@
namespace abp
{
class OABSPilotUno;
typedef ::cppu::ImplHelper1< css::task::XJob > OABSPilotUno_JBase;
typedef cppu::ImplInheritanceHelper<svt::OGenericUnoDialog, css::task::XJob> 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_Int8> SAL_CALL getImplementationId( ) override;
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;