summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-09-19 00:08:37 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-09-20 08:31:02 +0200
commit4342aaef0c4d6cd5c51fd2b74328bb4df5fb71dd (patch)
treeff4385c61bbf7a02f548e1820f8b8437865d8f60 /sc
parent4b49aaf56d4166a2f42e5112bbdb5f17bd32267b (diff)
tdf#39593 Drop ScDataPilotDescriptorBase::getImplementation
Replace with comphelper::getUnoTunnelImplementation. Change-Id: Ice068fcce262014a812a9e0a5d92b8bac173fa39 Reviewed-on: https://gerrit.libreoffice.org/79112 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/dapiuno.hxx3
-rw-r--r--sc/source/filter/oox/pivottablebuffer.cxx2
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx11
3 files changed, 3 insertions, 13 deletions
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx
index 22d7c4302d3a..14842615dab6 100644
--- a/sc/inc/dapiuno.hxx
+++ b/sc/inc/dapiuno.hxx
@@ -202,8 +202,7 @@ public:
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence<
sal_Int8 >& aIdentifier ) override;
- static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
- SC_DLLPUBLIC static ScDataPilotDescriptorBase* getImplementation(const css::uno::Reference<css::sheet::XDataPilotDescriptor>& rObj);
+ 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;
diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx
index e9cc4010b673..5464a0eabbbf 100644
--- a/sc/source/filter/oox/pivottablebuffer.cxx
+++ b/sc/source/filter/oox/pivottablebuffer.cxx
@@ -1230,7 +1230,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.
- ScDataPilotDescriptorBase* pImpl = ScDataPilotDescriptorBase::getImplementation(mxDPDescriptor);
+ auto pImpl = comphelper::getUnoTunnelImplementation<ScDataPilotDescriptorBase>(mxDPDescriptor);
if (!pImpl)
return;
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 3d37f6f9d3d4..e36b21b8aa98 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -417,7 +417,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName,
if (!pDocShell)
throw RuntimeException("DocShell is null", static_cast<cppu::OWeakObject*>(this));
- ScDataPilotDescriptorBase* pImp = ScDataPilotDescriptorBase::getImplementation( xDescriptor );
+ auto pImp = comphelper::getUnoTunnelImplementation<ScDataPilotDescriptorBase>( xDescriptor );
if (!pImp)
throw RuntimeException("Failed to get ScDataPilotDescriptor", static_cast<cppu::OWeakObject*>(this));
@@ -1041,15 +1041,6 @@ const Sequence<sal_Int8>& ScDataPilotDescriptorBase::getUnoTunnelId()
return theScDataPilotDescriptorBaseUnoTunnelId::get().getSeq();
}
-ScDataPilotDescriptorBase* ScDataPilotDescriptorBase::getImplementation(const Reference<XDataPilotDescriptor>& rObj )
-{
- ScDataPilotDescriptorBase* pRet = nullptr;
- Reference<lang::XUnoTunnel> xUT(rObj, UNO_QUERY);
- if (xUT.is())
- pRet = reinterpret_cast<ScDataPilotDescriptorBase*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
- return pRet;
-}
-
ScDataPilotTableObj::ScDataPilotTableObj(ScDocShell* pDocSh, SCTAB nT, const OUString& rN) :
ScDataPilotDescriptorBase( pDocSh ),
nTab( nT ),