diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-07 15:00:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-08 08:28:33 +0200 |
commit | 32e48476fe514955aca5f66f6f7a632341623f01 (patch) | |
tree | a23ba70f4654ef57a122e3368b49d73b7e50d24f /sc | |
parent | 6ce4cf4ca87a2a7d0bbba6f7c94619de3e493263 (diff) |
use cppu::WeakImplHelper in ScDataPilotDescriptorBase
Change-Id: I16f7ba16f08c186bbdb32af5206089c497e1c8c1
Reviewed-on: https://gerrit.libreoffice.org/80411
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/dapiuno.hxx | 23 | ||||
-rw-r--r-- | sc/source/ui/unoobj/dapiuno.cxx | 42 |
2 files changed, 7 insertions, 58 deletions
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx index cc5067171293..e73e824c309c 100644 --- a/sc/inc/dapiuno.hxx +++ b/sc/inc/dapiuno.hxx @@ -128,13 +128,13 @@ public: }; // ScDataPilotDescriptorBase is never instantiated directly -class SAL_DLLPUBLIC_RTTI ScDataPilotDescriptorBase : public css::sheet::XDataPilotDescriptor, - public css::beans::XPropertySet, - public css::sheet::XDataPilotDataLayoutFieldSupplier, - public css::lang::XServiceInfo, - public css::lang::XUnoTunnel, - public css::lang::XTypeProvider, - public cppu::OWeakObject, +class SAL_DLLPUBLIC_RTTI ScDataPilotDescriptorBase : + public cppu::WeakImplHelper< + css::sheet::XDataPilotDescriptor, + css::beans::XPropertySet, + css::sheet::XDataPilotDataLayoutFieldSupplier, + css::lang::XServiceInfo, + css::lang::XUnoTunnel>, public SfxListener { private: @@ -145,11 +145,6 @@ public: ScDataPilotDescriptorBase(ScDocShell* pDocSh); virtual ~ScDataPilotDescriptorBase() override; - virtual css::uno::Any SAL_CALL queryInterface( - const css::uno::Type & rType ) override; - virtual void SAL_CALL acquire() throw() override; - virtual void SAL_CALL release() throw() override; - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; ScDocShell* GetDocShell() const { return pDocShell; } @@ -204,10 +199,6 @@ public: SC_DLLPUBLIC static const css::uno::Sequence<sal_Int8>& getUnoTunnelId(); - // XTypeProvider (override in ScDataPilotTableObj) - virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - // XServiceInfo is in derived classes }; diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index d71b93ff1ba0..14698deec829 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -596,48 +596,6 @@ ScDataPilotDescriptorBase::~ScDataPilotDescriptorBase() pDocShell->GetDocument().RemoveUnoObject(*this); } -Any SAL_CALL ScDataPilotDescriptorBase::queryInterface( const uno::Type& rType ) -{ - SC_QUERYINTERFACE( XDataPilotDescriptor ) - SC_QUERYINTERFACE( XPropertySet ) - SC_QUERYINTERFACE( XDataPilotDataLayoutFieldSupplier ) - SC_QUERYINTERFACE( XNamed ) // base of XDataPilotDescriptor - SC_QUERYINTERFACE( lang::XUnoTunnel ) - SC_QUERYINTERFACE( lang::XTypeProvider ) - SC_QUERYINTERFACE( lang::XServiceInfo ) - - return OWeakObject::queryInterface( rType ); -} - -void SAL_CALL ScDataPilotDescriptorBase::acquire() throw() -{ - OWeakObject::acquire(); -} - -void SAL_CALL ScDataPilotDescriptorBase::release() throw() -{ - OWeakObject::release(); -} - -Sequence< uno::Type > SAL_CALL ScDataPilotDescriptorBase::getTypes() -{ - static Sequence< uno::Type > const aTypes - { - cppu::UnoType<XDataPilotDescriptor>::get(), - cppu::UnoType<XPropertySet>::get(), - cppu::UnoType<XDataPilotDataLayoutFieldSupplier>::get(), - cppu::UnoType<lang::XUnoTunnel>::get(), - cppu::UnoType<lang::XTypeProvider>::get(), - cppu::UnoType<lang::XServiceInfo>::get(), - }; - return aTypes; -} - -Sequence<sal_Int8> SAL_CALL ScDataPilotDescriptorBase::getImplementationId() -{ - return css::uno::Sequence<sal_Int8>(); -} - void ScDataPilotDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) { //! update of references ? |