summaryrefslogtreecommitdiff
path: root/chart2/source/model
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/model')
-rw-r--r--chart2/source/model/template/GL3DBarChartTypeTemplate.cxx21
-rw-r--r--chart2/source/model/template/GL3DBarChartTypeTemplate.hxx5
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;