diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-20 11:21:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-21 08:36:10 +0200 |
commit | b4ef23955e11a90b54bce189c3300406e9cf15b0 (patch) | |
tree | 498e0eb4560b499fed37e054affb50edd0e0abcf /chart2 | |
parent | 5779775c6dd831205a296393a2cca26a9120d2ea (diff) |
loplugin:useuniqueptr in NetChart
Change-Id: I095ae98b809c1dc938c12b5fbe4427fb08edc604
Reviewed-on: https://gerrit.libreoffice.org/59353
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/charttypes/NetChart.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/charttypes/NetChart.hxx | 2 | ||||
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx index d94453ea5e3f..6ebca9bfbebf 100644 --- a/chart2/source/view/charttypes/NetChart.cxx +++ b/chart2/source/view/charttypes/NetChart.cxx @@ -52,10 +52,10 @@ using namespace ::com::sun::star::chart2; NetChart::NetChart( const uno::Reference<XChartType>& xChartTypeModel , sal_Int32 nDimensionCount , bool bNoArea - , PlottingPositionHelper* pPlottingPositionHelper + , std::unique_ptr<PlottingPositionHelper> pPlottingPositionHelper ) : VSeriesPlotter( xChartTypeModel, nDimensionCount, true ) - , m_pMainPosHelper(pPlottingPositionHelper) + , m_pMainPosHelper(std::move(pPlottingPositionHelper)) , m_bArea(!bNoArea) , m_bLine(bNoArea) , m_xSeriesTarget(nullptr) diff --git a/chart2/source/view/charttypes/NetChart.hxx b/chart2/source/view/charttypes/NetChart.hxx index 36d648a4e034..2d948d2e2138 100644 --- a/chart2/source/view/charttypes/NetChart.hxx +++ b/chart2/source/view/charttypes/NetChart.hxx @@ -35,7 +35,7 @@ public: NetChart( const css::uno::Reference< css::chart2::XChartType >& xChartTypeModel , sal_Int32 nDimensionCount , bool bNoArea - , PlottingPositionHelper* pPlottingPositionHelper //takes ownership + , std::unique_ptr<PlottingPositionHelper> pPlottingPositionHelper //takes ownership ); virtual ~NetChart() override; diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index b2af514f763c..bad0d71432da 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -2601,9 +2601,9 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter( else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE) ) pRet = new PieChart(xChartTypeModel,nDimensionCount, bExcludingPositioning ); else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_NET) ) - pRet = new NetChart(xChartTypeModel,nDimensionCount,true,new PolarPlottingPositionHelper()); + pRet = new NetChart(xChartTypeModel,nDimensionCount,true,o3tl::make_unique<PolarPlottingPositionHelper>()); else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET) ) - pRet = new NetChart(xChartTypeModel,nDimensionCount,false,new PolarPlottingPositionHelper()); + pRet = new NetChart(xChartTypeModel,nDimensionCount,false,o3tl::make_unique<PolarPlottingPositionHelper>()); else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) ) pRet = new CandleStickChart(xChartTypeModel,nDimensionCount); else |