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/CandleStickChartType.cxx | |
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/CandleStickChartType.cxx')
-rw-r--r-- | chart2/source/model/template/CandleStickChartType.cxx | 41 |
1 files changed, 18 insertions, 23 deletions
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 ); |