summaryrefslogtreecommitdiff
path: root/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx')
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 046f8bd87ea4..406df92db13a 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -47,6 +47,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
#include <vcl/settings.hxx>
#include <com/sun/star/drawing/ShapeCollection.hpp>
@@ -1026,15 +1027,10 @@ namespace {
uno::Reference< lang::XMultiServiceFactory > getShapeFactory(const uno::Reference<uno::XInterface>& xChartView)
{
- Reference< lang::XUnoTunnel> xUnoTunnel(xChartView,uno::UNO_QUERY);
- if(xUnoTunnel.is())
- {
- ExplicitValueProvider* pProvider = reinterpret_cast<ExplicitValueProvider*>(xUnoTunnel->getSomething(
- ExplicitValueProvider::getUnoTunnelId() ));
- if( pProvider )
- return pProvider->getDrawModelWrapper()->getShapeFactory();
+ auto pProvider = comphelper::getUnoTunnelImplementation<ExplicitValueProvider>(xChartView);
+ if( pProvider )
+ return pProvider->getDrawModelWrapper()->getShapeFactory();
- }
return uno::Reference< lang::XMultiServiceFactory >();
}