summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-06-21 00:11:43 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-06-21 19:38:17 +0200
commita4261757b89f6a198261006a8c9aa6b4eb8e19fb (patch)
tree6e10cb1c1a54323c3694aa4de4c158883875b435 /reportdesign
parentfbead41b7d6c0346ff3373279f9c01dc4c7e61fd (diff)
tdf#39593 Remove reportdesign::OSection::getImplementation
Replace with comphelper::getUnoTunnelImplementation. Change-Id: I3d0837ff3f47392e09ef276f141a8459add7a5ad Reviewed-on: https://gerrit.libreoffice.org/74471 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/api/Section.cxx16
-rw-r--r--reportdesign/source/core/inc/Section.hxx3
-rw-r--r--reportdesign/source/core/sdr/RptPage.cxx4
3 files changed, 5 insertions, 18 deletions
diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx
index 69be4b7fc3c8..b030ae5508e7 100644
--- a/reportdesign/source/core/api/Section.cxx
+++ b/reportdesign/source/core/api/Section.cxx
@@ -571,24 +571,12 @@ sal_Bool SAL_CALL OSection::hasForms()
sal_Int64 OSection::getSomething( const uno::Sequence< sal_Int8 > & rId )
{
- if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
+ if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
return reinterpret_cast<sal_Int64>(this);
return (m_xDrawPage_Tunnel.is()) ? m_xDrawPage_Tunnel->getSomething(rId) : 0;
}
-
-OSection* OSection::getImplementation( const uno::Reference< uno::XInterface >& _rxComponent )
-{
- OSection* pContent( nullptr );
-
- uno::Reference< lang::XUnoTunnel > xUnoTunnel( _rxComponent, uno::UNO_QUERY );
- if ( xUnoTunnel.is() )
- pContent = reinterpret_cast< OSection* >( xUnoTunnel->getSomething( getUnoTunnelImplementationId() ) );
-
- return pContent;
-}
-
-uno::Sequence< sal_Int8 > OSection::getUnoTunnelImplementationId()
+uno::Sequence< sal_Int8 > OSection::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
diff --git a/reportdesign/source/core/inc/Section.hxx b/reportdesign/source/core/inc/Section.hxx
index fb4fe75172ad..77a92db780bd 100644
--- a/reportdesign/source/core/inc/Section.hxx
+++ b/reportdesign/source/core/inc/Section.hxx
@@ -223,8 +223,7 @@ namespace reportdesign
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static OSection* getImplementation( const css::uno::Reference< css::uno::XInterface >& _rxComponent );
- static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
+ static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
void notifyElementAdded(const css::uno::Reference< css::drawing::XShape >& xShape);
void notifyElementRemoved(const css::uno::Reference< css::drawing::XShape >& xShape);
diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx
index c20f11f363cd..18484851739b 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -92,7 +92,7 @@ SdrObject* OReportPage::RemoveObject(size_t nObjNum)
}
// this code is evil, but what else shall I do
- reportdesign::OSection* pSection = reportdesign::OSection::getImplementation(m_xSection);
+ reportdesign::OSection* pSection = comphelper::getUnoTunnelImplementation<reportdesign::OSection>(m_xSection);
uno::Reference< drawing::XShape> xShape(pObj->getUnoShape(),uno::UNO_QUERY);
pSection->notifyElementRemoved(xShape);
if (dynamic_cast< const OUnoObject *>( pObj ) != nullptr)
@@ -177,7 +177,7 @@ void OReportPage::NbcInsertObject(SdrObject* pObj, size_t nPos)
}
// this code is evil, but what else shall I do
- reportdesign::OSection* pSection = reportdesign::OSection::getImplementation(m_xSection);
+ reportdesign::OSection* pSection = comphelper::getUnoTunnelImplementation<reportdesign::OSection>(m_xSection);
uno::Reference< drawing::XShape> xShape(pObj->getUnoShape(),uno::UNO_QUERY);
pSection->notifyElementAdded(xShape);