summaryrefslogtreecommitdiff
path: root/chart2/source/view
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-09-22 18:20:39 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-09-23 15:47:12 +0200
commit1d398fb983d8f8b53a78e7c47b588fc1f1e7f748 (patch)
tree89e11384ea13d73b3c1dc198c5fee8675036abbe /chart2/source/view
parentcd6780aae1392d4c1af0b15b311a4966834a9602 (diff)
tdf#39593 use getUnoTunnelImplementation
Change-Id: I78eb67913a568c610e38e5002f914773c4906dfd Reviewed-on: https://gerrit.libreoffice.org/79350 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'chart2/source/view')
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx5
-rw-r--r--chart2/source/view/main/ChartView.cxx17
2 files changed, 7 insertions, 15 deletions
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index ffce05afa0ad..fec07e83f0a3 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -204,11 +204,10 @@ void VDiagram::createShapes_2d()
static E3dScene* lcl_getE3dScene( const uno::Reference< drawing::XShape >& xShape )
{
E3dScene* pRet=nullptr;
- uno::Reference< lang::XUnoTunnel > xUnoTunnel( xShape, uno::UNO_QUERY );
uno::Reference< lang::XTypeProvider > xTypeProvider( xShape, uno::UNO_QUERY );
- if(xUnoTunnel.is()&&xTypeProvider.is())
+ if(xTypeProvider.is())
{
- SvxShape* pSvxShape = reinterpret_cast<SvxShape*>(xUnoTunnel->getSomething( SvxShape::getUnoTunnelId() ));
+ SvxShape* pSvxShape = comphelper::getUnoTunnelImplementation<SvxShape>(xShape);
if(pSvxShape)
{
SdrObject* pObj = pSvxShape->GetSdrObject();
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index ab3b10d7c8cf..200b4b4e9823 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1747,18 +1747,11 @@ bool ChartView::getExplicitValuesForAxis(
SdrPage* ChartView::getSdrPage()
{
- SdrPage* pPage=nullptr;
- Reference< lang::XUnoTunnel> xUnoTunnel(m_xDrawPage,uno::UNO_QUERY);
- if(xUnoTunnel.is())
- {
- SvxDrawPage* pSvxDrawPage = reinterpret_cast<SvxDrawPage*>(xUnoTunnel->getSomething(
- SvxDrawPage::getUnoTunnelId() ));
- if(pSvxDrawPage)
- {
- pPage = pSvxDrawPage->GetSdrPage();
- }
- }
- return pPage;
+ auto pSvxDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>(m_xDrawPage);
+ if(pSvxDrawPage)
+ return pSvxDrawPage->GetSdrPage();
+
+ return nullptr;
}
uno::Reference< drawing::XShape > ChartView::getShapeForCID( const OUString& rObjectCID )