diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-28 09:10:55 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-29 00:47:20 -0400 |
commit | 0be6a5ef376e1841bf60658b41d0f56d07caf2a3 (patch) | |
tree | 59f6aaeab39fd3c6d1f758a3be8baec45768530b /chart2 | |
parent | cd1e89728218eeb1e6d478d9bd925e207cb83f0b (diff) |
Transfer back properties from the chart type object to template object.
Change-Id: I3484a2ae0141087835e34e4e174bdc24b3357854
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/model/template/GL3DBarChartTypeTemplate.cxx | 21 | ||||
-rw-r--r-- | chart2/source/model/template/GL3DBarChartTypeTemplate.hxx | 5 |
2 files changed, 26 insertions, 0 deletions
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx index 163423a1e562..223999748c6e 100644 --- a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx +++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx @@ -125,6 +125,27 @@ uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForInde return xResult; } +sal_Bool SAL_CALL GL3DBarChartTypeTemplate::matchesTemplate( + const css::uno::Reference<css::chart2::XDiagram>& xDiagram, + sal_Bool bAdaptProperties ) + throw (css::uno::RuntimeException, std::exception) +{ + bool bResult = ChartTypeTemplate::matchesTemplate(xDiagram, bAdaptProperties); + + if (bResult && bAdaptProperties) + { + uno::Reference<chart2::XChartType> xChartType = DiagramHelper::getChartTypeByIndex(xDiagram, 0); + uno::Reference<beans::XPropertySet> xPS(xChartType, uno::UNO_QUERY); + if (xPS.is()) + { + setFastPropertyValue_NoBroadcast( + PROP_GL3DCHARTTYPE_ROUNDED_EDGE, xPS->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE)); + } + } + + return bResult; +} + uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence<uno::Reference<chart2::XChartType> >& /*xOldChartTypes*/ ) throw (::css::uno::RuntimeException, ::std::exception) diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx index ba4943a64bf9..1651dec16878 100644 --- a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx +++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx @@ -38,6 +38,11 @@ public: // XChartTypeTemplate + virtual sal_Bool SAL_CALL matchesTemplate( + const css::uno::Reference<css::chart2::XDiagram>& xDiagram, + sal_Bool bAdaptProperties ) + throw (css::uno::RuntimeException, std::exception); + virtual css::uno::Reference<css::chart2::XChartType> SAL_CALL getChartTypeForNewSeries( const css::uno::Sequence<css::uno::Reference<css::chart2::XChartType> >& xOldChartTypes ) throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE; |