From 5d8dc045f1aafd60a74b781f693d3c168615470b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 12 Feb 2015 15:58:55 +0100 Subject: But then again, no need to go via UNO here anyway (cf. previous commit) Change-Id: I2e5015b9c360fadb6747b5e2e0bd0a62b252312d --- chart2/source/model/template/ChartType.hxx | 5 +++-- .../source/model/template/GL3DBarChartTypeTemplate.cxx | 16 ++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'chart2/source/model') diff --git a/chart2/source/model/template/ChartType.hxx b/chart2/source/model/template/ChartType.hxx index 8b0670a9055c..84831b01f7ae 100644 --- a/chart2/source/model/template/ChartType.hxx +++ b/chart2/source/model/template/ChartType.hxx @@ -58,6 +58,9 @@ public: ::com::sun::star::uno::XComponentContext > const & xContext ); virtual ~ChartType(); + /// merge XInterface implementations + DECLARE_XINTERFACE() + protected: explicit ChartType( const ChartType & rOther ); @@ -133,8 +136,6 @@ protected: getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - /// merge XInterface implementations - DECLARE_XINTERFACE() /// merge XTypeProvider implementations DECLARE_XTYPEPROVIDER() diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx index 5f373bacbc6f..f027fa500cc0 100644 --- a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx +++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx @@ -154,16 +154,12 @@ GL3DBarChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence xFact( - GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW); - xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW); - uno::Reference xCTProp(xResult, uno::UNO_QUERY); - if (xCTProp.is()) - { - bool bVal = false; - getFastPropertyValue(PROP_GL3DCHARTTYPE_ROUNDED_EDGE) >>= bVal; - xCTProp->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, uno::makeAny(bVal)); - } + rtl::Reference chart( + new GL3DBarChartType(GetComponentContext())); + bool bVal = false; + getFastPropertyValue(PROP_GL3DCHARTTYPE_ROUNDED_EDGE) >>= bVal; + chart->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, uno::makeAny(bVal)); + xResult = chart.get(); } catch (const uno::Exception & ex) { -- cgit