diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-02-12 15:58:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-02-12 16:01:55 +0100 |
commit | 5d8dc045f1aafd60a74b781f693d3c168615470b (patch) | |
tree | 2ad7fee3d7645589974b1f6cd3a16e1cc02cd4dd /chart2 | |
parent | e47f9d0e8beb8ea1f6f36f3983c8405bd4a25533 (diff) |
But then again, no need to go via UNO here anyway (cf. previous commit)
Change-Id: I2e5015b9c360fadb6747b5e2e0bd0a62b252312d
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/model/template/ChartType.hxx | 5 | ||||
-rw-r--r-- | chart2/source/model/template/GL3DBarChartTypeTemplate.cxx | 16 |
2 files changed, 9 insertions, 12 deletions
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<uno::Ref try { - uno::Reference<lang::XMultiServiceFactory> xFact( - GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW); - xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW); - uno::Reference<beans::XPropertySet> 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<GL3DBarChartType> 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) { |