sc/inc/dapiuno.hxx | 13 ++----------- sc/source/filter/oox/pivottablebuffer.cxx | 2 +- sc/source/ui/unoobj/dapiuno.cxx | 16 +--------------- 3 files changed, 4 insertions(+), 27 deletions(-)
New commits: commit 8446cac7d39d3f09f9dd0d5b513ceb96184b0da8 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Jan 16 14:02:15 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jan 17 14:45:46 2023 +0000 XUnoTunnel->dynamic_cast in ScDataPilotDescriptorBase Change-Id: I493d3fbd5eabb70804bd44affefdd705118f8185 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145635 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx index e10cf45f97e1..88c24ce1a4dc 100644 --- a/sc/inc/dapiuno.hxx +++ b/sc/inc/dapiuno.hxx @@ -26,7 +26,6 @@ #include <svl/itemprop.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/container/XNameContainer.hpp> @@ -128,13 +127,11 @@ public: }; // ScDataPilotDescriptorBase is never instantiated directly -class SAL_DLLPUBLIC_RTTI ScDataPilotDescriptorBase : - public cppu::WeakImplHelper< +class SC_DLLPUBLIC ScDataPilotDescriptorBase : public cppu::WeakImplHelper< css::sheet::XDataPilotDescriptor, css::beans::XPropertySet, css::sheet::XDataPilotDataLayoutFieldSupplier, - css::lang::XServiceInfo, - css::lang::XUnoTunnel>, + css::lang::XServiceInfo>, public SfxListener { private: @@ -193,12 +190,6 @@ public: virtual css::uno::Reference< css::sheet::XDataPilotField > SAL_CALL getDataLayoutField() override; - // XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< - sal_Int8 >& aIdentifier ) override; - - SC_DLLPUBLIC static const css::uno::Sequence<sal_Int8>& getUnoTunnelId(); - // XServiceInfo is in derived classes }; diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx index d57c17571282..e936d0fadd87 100644 --- a/sc/source/filter/oox/pivottablebuffer.cxx +++ b/sc/source/filter/oox/pivottablebuffer.cxx @@ -1241,7 +1241,7 @@ void PivotTable::finalizeImport() mxDPDescriptor->setTag( maDefModel.maTag ); // TODO: This is a hack. Eventually we need to convert the whole thing to the internal API. - auto pImpl = comphelper::getFromUnoTunnel<ScDataPilotDescriptorBase>(mxDPDescriptor); + auto pImpl = dynamic_cast<ScDataPilotDescriptorBase*>(mxDPDescriptor.get()); if (!pImpl) return; diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 4be1c767fad0..7247b655bf23 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -414,7 +414,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName, if (!pDocShell) throw RuntimeException("DocShell is null", static_cast<cppu::OWeakObject*>(this)); - auto pImp = comphelper::getFromUnoTunnel<ScDataPilotDescriptorBase>( xDescriptor ); + auto pImp = dynamic_cast<ScDataPilotDescriptorBase*>( xDescriptor.get() ); if (!pImp) throw RuntimeException("Failed to get ScDataPilotDescriptor", static_cast<cppu::OWeakObject*>(this)); @@ -973,20 +973,6 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotDescriptorBase::getDataLayoutFi return nullptr; } -// XUnoTunnel - -sal_Int64 SAL_CALL ScDataPilotDescriptorBase::getSomething( - const Sequence<sal_Int8 >& rId ) -{ - return comphelper::getSomethingImpl(rId, this); -} - -const Sequence<sal_Int8>& ScDataPilotDescriptorBase::getUnoTunnelId() -{ - static const comphelper::UnoIdInit theScDataPilotDescriptorBaseUnoTunnelId; - return theScDataPilotDescriptorBaseUnoTunnelId.getSeq(); -} - ScDataPilotTableObj::ScDataPilotTableObj(ScDocShell& rDocSh, SCTAB nT, OUString aN) : ScDataPilotDescriptorBase( rDocSh ), nTab( nT ),