diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-27 15:58:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-28 10:13:06 +0200 |
commit | 6100ef45d8c90f141d68011bba9d9745dd319174 (patch) | |
tree | fcb3d07106f936dca2670572920294e050938c50 /sc/source | |
parent | b7239a1271d5af51163b4fcd93608b72db2616a4 (diff) |
return ScMemChart by std::unique_ptr
Change-Id: I5a5b54872ce6ae351c6550a1ec0b2f7c52c35e13
Reviewed-on: https://gerrit.libreoffice.org/59683
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/chartarr.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx index ba632ba1a386..76fcc2645839 100644 --- a/sc/source/core/tool/chartarr.cxx +++ b/sc/source/core/tool/chartarr.cxx @@ -60,7 +60,7 @@ ScChartArray::ScChartArray( pDocument( pDoc ), aPositioner(pDoc, rRangeList) {} -ScMemChart* ScChartArray::CreateMemChart() +std::unique_ptr<ScMemChart> ScChartArray::CreateMemChart() { ScRangeListRef aRangeListRef(GetRangeList()); size_t nCount = aRangeListRef->size(); @@ -112,7 +112,7 @@ double getCellValue( ScDocument& rDoc, const ScAddress& rPos, double fDefault, b } -ScMemChart* ScChartArray::CreateMemChartSingle() +std::unique_ptr<ScMemChart> ScChartArray::CreateMemChartSingle() { SCSIZE nCol; SCSIZE nRow; @@ -207,7 +207,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() } // Data - ScMemChart* pMemChart = new ScMemChart( nColCount, nRowCount ); + std::unique_ptr<ScMemChart> pMemChart(new ScMemChart( nColCount, nRowCount )); if ( bValidData ) { @@ -275,7 +275,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() return pMemChart; } -ScMemChart* ScChartArray::CreateMemChartMulti() +std::unique_ptr<ScMemChart> ScChartArray::CreateMemChartMulti() { SCSIZE nColCount = GetPositionMap()->GetColCount(); SCSIZE nRowCount = GetPositionMap()->GetRowCount(); @@ -300,7 +300,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti() } // Data - ScMemChart* pMemChart = new ScMemChart( nColCount, nRowCount ); + std::unique_ptr<ScMemChart> pMemChart(new ScMemChart( nColCount, nRowCount )); SCSIZE nCol = 0; SCSIZE nRow = 0; diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index e957cb22faef..4d31248c34e9 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -2995,7 +2995,7 @@ void SAL_CALL ScCellRangesBase::incrementIndent() // XChartData -ScMemChart* ScCellRangesBase::CreateMemChart_Impl() const +std::unique_ptr<ScMemChart> ScCellRangesBase::CreateMemChart_Impl() const { if ( pDocShell && !aRanges.empty() ) { |