diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-08 16:55:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-11 08:40:57 +0200 |
commit | 4c09f8e087cae598efbb78759110c03ed10e3a3a (patch) | |
tree | 963bf5ef462eacc2195ffb23d22c6e7e5fd0d627 /chart2/source/model/template | |
parent | 58edb05341494dfaa3d3ce33505b97961d5f2ea9 (diff) |
clang-tidy modernize-use-emplace in c*
Change-Id: I419d1f67ba301050d05981db2a3d6178878684a9
Reviewed-on: https://gerrit.libreoffice.org/42110
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model/template')
12 files changed, 74 insertions, 107 deletions
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx index 188a7925928c..270aa96f79f4 100644 --- a/chart2/source/model/template/AreaChartTypeTemplate.cxx +++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx @@ -45,12 +45,11 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( "Dimension", + rOutProperties.emplace_back( "Dimension", PROP_AREA_TEMPLATE_DIMENSION, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticAreaChartTypeTemplateDefaults_Initializer diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx index cf176a1e153e..714473803c18 100644 --- a/chart2/source/model/template/BarChartTypeTemplate.cxx +++ b/chart2/source/model/template/BarChartTypeTemplate.cxx @@ -47,18 +47,16 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( "Dimension", + rOutProperties.emplace_back( "Dimension", PROP_BAR_TEMPLATE_DIMENSION, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( "Geometry3D", + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "Geometry3D", PROP_BAR_TEMPLATE_GEOMETRY3D, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticBarChartTypeTemplateDefaults_Initializer diff --git a/chart2/source/model/template/CandleStickChartType.cxx b/chart2/source/model/template/CandleStickChartType.cxx index 99f3de05a8e3..393ca6fd8ac1 100644 --- a/chart2/source/model/template/CandleStickChartType.cxx +++ b/chart2/source/model/template/CandleStickChartType.cxx @@ -47,38 +47,33 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( "Japanese", + rOutProperties.emplace_back( "Japanese", PROP_CANDLESTICKCHARTTYPE_JAPANESE, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); - rOutProperties.push_back( - Property( "WhiteDay", + rOutProperties.emplace_back( "WhiteDay", PROP_CANDLESTICKCHARTTYPE_WHITE_DAY, cppu::UnoType<beans::XPropertySet>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEVOID )); - rOutProperties.push_back( - Property( "BlackDay", + | beans::PropertyAttribute::MAYBEVOID ); + rOutProperties.emplace_back( "BlackDay", PROP_CANDLESTICKCHARTTYPE_BLACK_DAY, cppu::UnoType<beans::XPropertySet>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEVOID )); + | beans::PropertyAttribute::MAYBEVOID ); - rOutProperties.push_back( - Property( "ShowFirst", + rOutProperties.emplace_back( "ShowFirst", PROP_CANDLESTICKCHARTTYPE_SHOW_FIRST, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( "ShowHighLow", + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "ShowHighLow", PROP_CANDLESTICKCHARTTYPE_SHOW_HIGH_LOW, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticCandleStickChartTypeDefaults_Initializer @@ -225,17 +220,17 @@ uno::Sequence< OUString > SAL_CALL CandleStickChartType::getSupportedMandatoryRo std::vector< OUString > aMandRoles; - aMandRoles.push_back( "label"); + aMandRoles.emplace_back("label"); if( bShowFirst ) - aMandRoles.push_back( "values-first"); + aMandRoles.emplace_back("values-first"); if( bShowHiLow ) { - aMandRoles.push_back( "values-min"); - aMandRoles.push_back( "values-max"); + aMandRoles.emplace_back("values-min"); + aMandRoles.emplace_back("values-max"); } - aMandRoles.push_back( "values-last"); + aMandRoles.emplace_back("values-last"); return comphelper::containerToSequence( aMandRoles ); } @@ -250,12 +245,12 @@ Sequence< OUString > SAL_CALL CandleStickChartType::getSupportedOptionalRoles() std::vector< OUString > aOptRoles; if( ! bShowFirst ) - aOptRoles.push_back( "values-first"); + aOptRoles.emplace_back("values-first"); if( ! bShowHiLow ) { - aOptRoles.push_back( "values-min"); - aOptRoles.push_back( "values-max"); + aOptRoles.emplace_back("values-min"); + aOptRoles.emplace_back("values-max"); } return comphelper::containerToSequence( aOptRoles ); diff --git a/chart2/source/model/template/ColumnChartType.cxx b/chart2/source/model/template/ColumnChartType.cxx index b04fd86b299f..af99026027bc 100644 --- a/chart2/source/model/template/ColumnChartType.cxx +++ b/chart2/source/model/template/ColumnChartType.cxx @@ -40,19 +40,17 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( "OverlapSequence", + rOutProperties.emplace_back( "OverlapSequence", PROP_BARCHARTTYPE_OVERLAP_SEQUENCE, cppu::UnoType<Sequence< sal_Int32 >>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); - rOutProperties.push_back( - Property( "GapwidthSequence", + rOutProperties.emplace_back( "GapwidthSequence", PROP_BARCHARTTYPE_GAPWIDTH_SEQUENCE, cppu::UnoType<Sequence< sal_Int32 >>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticColumnChartTypeDefaults_Initializer diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx index f6dd85178eec..68a9db527807 100644 --- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx @@ -50,12 +50,11 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( "NumberOfLines", + rOutProperties.emplace_back( "NumberOfLines", PROP_COL_LINE_NUMBER_OF_LINES, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticColumnLineChartTypeTemplateDefaults_Initializer diff --git a/chart2/source/model/template/LineChartType.cxx b/chart2/source/model/template/LineChartType.cxx index 58b3fb2686e3..eaa1a12dc8dc 100644 --- a/chart2/source/model/template/LineChartType.cxx +++ b/chart2/source/model/template/LineChartType.cxx @@ -45,25 +45,22 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( CHART_UNONAME_CURVE_STYLE, + rOutProperties.emplace_back( CHART_UNONAME_CURVE_STYLE, PROP_LINECHARTTYPE_CURVE_STYLE, cppu::UnoType<chart2::CurveStyle>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); - rOutProperties.push_back( - Property( CHART_UNONAME_CURVE_RESOLUTION, + rOutProperties.emplace_back( CHART_UNONAME_CURVE_RESOLUTION, PROP_LINECHARTTYPE_CURVE_RESOLUTION, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( CHART_UNONAME_SPLINE_ORDER, + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( CHART_UNONAME_SPLINE_ORDER, PROP_LINECHARTTYPE_SPLINE_ORDER, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticLineChartTypeDefaults_Initializer diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx index a06f74466003..cf1238edb373 100644 --- a/chart2/source/model/template/LineChartTypeTemplate.cxx +++ b/chart2/source/model/template/LineChartTypeTemplate.cxx @@ -52,24 +52,21 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( CHART_UNONAME_CURVE_STYLE, + rOutProperties.emplace_back( CHART_UNONAME_CURVE_STYLE, PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE, cppu::UnoType<chart2::CurveStyle>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( CHART_UNONAME_CURVE_RESOLUTION, + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( CHART_UNONAME_CURVE_RESOLUTION, PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( CHART_UNONAME_SPLINE_ORDER, + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( CHART_UNONAME_SPLINE_ORDER, PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticLineChartTypeTemplateDefaults_Initializer diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx index 2645b2f0f285..268334460bdd 100644 --- a/chart2/source/model/template/PieChartType.cxx +++ b/chart2/source/model/template/PieChartType.cxx @@ -46,17 +46,15 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( "UseRings", + rOutProperties.emplace_back( "UseRings", PROP_PIECHARTTYPE_USE_RINGS, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( "3DRelativeHeight", + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "3DRelativeHeight", PROP_PIECHARTTYPE_3DRELATIVEHEIGHT, cppu::UnoType<sal_Int32>::get(), - beans::PropertyAttribute::MAYBEVOID )); + beans::PropertyAttribute::MAYBEVOID ); } struct StaticPieChartTypeDefaults_Initializer diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index 9f7c559617db..c8a7663a9056 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -57,30 +57,26 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( "OffsetMode", + rOutProperties.emplace_back( "OffsetMode", PROP_PIE_TEMPLATE_OFFSET_MODE, cppu::UnoType<chart2::PieChartOffsetMode>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( "DefaultOffset", + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "DefaultOffset", PROP_PIE_TEMPLATE_DEFAULT_OFFSET, cppu::UnoType<double>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( "Dimension", + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "Dimension", PROP_PIE_TEMPLATE_DIMENSION, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( "UseRings", + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "UseRings", PROP_PIE_TEMPLATE_USE_RINGS, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticPieChartTypeTemplateDefaults_Initializer diff --git a/chart2/source/model/template/ScatterChartType.cxx b/chart2/source/model/template/ScatterChartType.cxx index af78b959f7b4..c99cdf72b918 100644 --- a/chart2/source/model/template/ScatterChartType.cxx +++ b/chart2/source/model/template/ScatterChartType.cxx @@ -50,25 +50,22 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( CHART_UNONAME_CURVE_STYLE, + rOutProperties.emplace_back( CHART_UNONAME_CURVE_STYLE, PROP_SCATTERCHARTTYPE_CURVE_STYLE, cppu::UnoType<chart2::CurveStyle>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); - rOutProperties.push_back( - Property( CHART_UNONAME_CURVE_RESOLUTION, + rOutProperties.emplace_back( CHART_UNONAME_CURVE_RESOLUTION, PROP_SCATTERCHARTTYPE_CURVE_RESOLUTION, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( CHART_UNONAME_SPLINE_ORDER, + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( CHART_UNONAME_SPLINE_ORDER, PROP_SCATTERCHARTTYPE_SPLINE_ORDER, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticScatterChartTypeDefaults_Initializer diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx index fe216ea59b9a..cd752f7674fe 100644 --- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx +++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx @@ -54,24 +54,21 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( CHART_UNONAME_CURVE_STYLE, + rOutProperties.emplace_back( CHART_UNONAME_CURVE_STYLE, PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE, cppu::UnoType<chart2::CurveStyle>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( CHART_UNONAME_CURVE_RESOLUTION, + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( CHART_UNONAME_CURVE_RESOLUTION, PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( CHART_UNONAME_SPLINE_ORDER, + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( CHART_UNONAME_SPLINE_ORDER, PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticScatterChartTypeTemplateDefaults_Initializer diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx index bc29b89ac2b3..c16463223183 100644 --- a/chart2/source/model/template/StockChartTypeTemplate.cxx +++ b/chart2/source/model/template/StockChartTypeTemplate.cxx @@ -59,30 +59,26 @@ enum void lcl_AddPropertiesToVector( std::vector< Property > & rOutProperties ) { - rOutProperties.push_back( - Property( "Volume", + rOutProperties.emplace_back( "Volume", PROP_STOCKCHARTTYPE_TEMPLATE_VOLUME, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( "Open", + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "Open", PROP_STOCKCHARTTYPE_TEMPLATE_OPEN, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( "LowHigh", + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "LowHigh", PROP_STOCKCHARTTYPE_TEMPLATE_LOW_HIGH, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); - rOutProperties.push_back( - Property( "Japanese", + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "Japanese", PROP_STOCKCHARTTYPE_TEMPLATE_JAPANESE, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + | beans::PropertyAttribute::MAYBEDEFAULT ); } struct StaticStockChartTypeTemplateDefaults_Initializer |