reportdesign/source/core/api/Section.cxx | 16 ++-------------- reportdesign/source/core/inc/Section.hxx | 3 +-- reportdesign/source/core/sdr/RptPage.cxx | 4 ++-- 3 files changed, 5 insertions(+), 18 deletions(-)
New commits: commit a4261757b89f6a198261006a8c9aa6b4eb8e19fb Author: Arkadiy Illarionov <qar...@gmail.com> AuthorDate: Fri Jun 21 00:11:43 2019 +0300 Commit: Arkadiy Illarionov <qar...@gmail.com> CommitDate: Fri Jun 21 19:38:17 2019 +0200 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 <qar...@gmail.com> 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits