diff options
Diffstat (limited to 'chart2/source/model/template/ChartTypeManager.cxx')
-rw-r--r-- | chart2/source/model/template/ChartTypeManager.cxx | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx index 5b639dbf31ab..2e6753444d99 100644 --- a/chart2/source/model/template/ChartTypeManager.cxx +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -33,13 +33,13 @@ #include <com/sun/star/container/XContentEnumerationAccess.hpp> #include <com/sun/star/lang/XServiceName.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#include <tools/diagnose_ex.h> #include <sal/log.hxx> #include <algorithm> #include <iterator> #include <o3tl/functional.hxx> #include <map> +#include <utility> using namespace ::com::sun::star; @@ -89,6 +89,8 @@ enum TemplateId TEMPLATE_PIEALLEXPLODED, TEMPLATE_DONUT, TEMPLATE_DONUTALLEXPLODED, + TEMPLATE_BAROFPIE, + TEMPLATE_PIEOFPIE, TEMPLATE_THREEDPIE, TEMPLATE_THREEDPIEALLEXPLODED, TEMPLATE_THREEDDONUT, @@ -163,6 +165,9 @@ const tTemplateMapType & lcl_DefaultChartTypeMap() {"com.sun.star.chart2.template.PieAllExploded", TEMPLATE_PIEALLEXPLODED}, {"com.sun.star.chart2.template.Donut", TEMPLATE_DONUT}, {"com.sun.star.chart2.template.DonutAllExploded", TEMPLATE_DONUTALLEXPLODED}, + {"com.sun.star.chart2.template.BarOfPie", TEMPLATE_BAROFPIE}, + {"com.sun.star.chart2.template.PieOfPie", TEMPLATE_PIEOFPIE}, + {"com.sun.star.chart2.template.DonutAllExploded", TEMPLATE_DONUTALLEXPLODED}, {"com.sun.star.chart2.template.ThreeDPie", TEMPLATE_THREEDPIE}, {"com.sun.star.chart2.template.ThreeDPieAllExploded", TEMPLATE_THREEDPIEALLEXPLODED}, {"com.sun.star.chart2.template.ThreeDDonut", TEMPLATE_THREEDDONUT}, @@ -213,8 +218,8 @@ namespace chart ChartTypeManager::ChartTypeManager( uno::Reference< - uno::XComponentContext > const & xContext ) : - m_xContext( xContext ) + uno::XComponentContext > xContext ) : + m_xContext(std::move( xContext )) {} ChartTypeManager::~ChartTypeManager() @@ -382,35 +387,47 @@ rtl::Reference< ::chart::ChartTypeTemplate > ChartTypeManager::createTemplate( case TEMPLATE_PIE: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_NONE, false )); + chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_NONE )); break; case TEMPLATE_PIEALLEXPLODED: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_ALL_EXPLODED, false )); + chart2::PieChartOffsetMode_ALL_EXPLODED, false, + chart2::PieChartSubType_NONE )); break; case TEMPLATE_DONUT: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_NONE, true )); + chart2::PieChartOffsetMode_NONE, true, chart2::PieChartSubType_NONE )); break; case TEMPLATE_DONUTALLEXPLODED: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_ALL_EXPLODED, true )); + chart2::PieChartOffsetMode_ALL_EXPLODED, true, + chart2::PieChartSubType_NONE )); + break; + case TEMPLATE_BAROFPIE: + xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, + chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_BAR )); + break; + case TEMPLATE_PIEOFPIE: + xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, + chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_PIE )); break; case TEMPLATE_THREEDPIE: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_NONE, false, 3 )); + chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_NONE, 3 )); break; case TEMPLATE_THREEDPIEALLEXPLODED: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_ALL_EXPLODED, false, 3 )); + chart2::PieChartOffsetMode_ALL_EXPLODED, false, + chart2::PieChartSubType_NONE, 3 )); break; case TEMPLATE_THREEDDONUT: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_NONE, true, 3 )); + chart2::PieChartOffsetMode_NONE, true, chart2::PieChartSubType_NONE, 3 )); break; case TEMPLATE_THREEDDONUTALLEXPLODED: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_ALL_EXPLODED, true, 3 )); + chart2::PieChartOffsetMode_ALL_EXPLODED, true, + chart2::PieChartSubType_NONE, 3 )); break; case TEMPLATE_SCATTERLINESYMBOL: |