diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-11 14:05:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-13 11:39:21 +0000 |
commit | 414ede0435645a2ebf8f1476435b6ec3bb248f33 (patch) | |
tree | 97f4fc1f1f3a3b9c077ae11348baa6fed6852f9b /sc/inc/chartpos.hxx | |
parent | d05f56b160390022fdb0c21eed5e430440cd79ca (diff) |
new loplugin: useuniqueptr: sc part 1
Change-Id: Ic96fd3b56b2063df0882168a7d02725d3c50515f
Reviewed-on: https://gerrit.libreoffice.org/32961
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/chartpos.hxx')
-rw-r--r-- | sc/inc/chartpos.hxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sc/inc/chartpos.hxx b/sc/inc/chartpos.hxx index 18c40aee8e53..664cbc966c08 100644 --- a/sc/inc/chartpos.hxx +++ b/sc/inc/chartpos.hxx @@ -46,12 +46,13 @@ class ScChartPositionMap SCROW nRowAdd, // header rows ColumnMap& rCols // table with col tables with address* ); - ~ScChartPositionMap(); //! deletes all ScAddress* ScChartPositionMap( const ScChartPositionMap& ) = delete; ScChartPositionMap& operator=( const ScChartPositionMap& ) = delete; public: + ~ScChartPositionMap(); //! deletes all ScAddress* + SCCOL GetColCount() const { return nColCount; } SCROW GetRowCount() const { return nRowCount; } @@ -103,7 +104,7 @@ class ScChartPositioner final // only parameter struct { ScRangeListRef aRangeListRef; ScDocument* pDocument; - ScChartPositionMap* pPositionMap; + std::unique_ptr<ScChartPositionMap> pPositionMap; ScChartGlue eGlue; SCCOL nStartCol; SCROW nStartRow; @@ -132,15 +133,7 @@ public: bool HasColHeaders() const { return bColHeaders; } bool HasRowHeaders() const { return bRowHeaders; } - void InvalidateGlue() - { - eGlue = SC_CHARTGLUE_NA; - if ( pPositionMap ) - { - delete pPositionMap; - pPositionMap = nullptr; - } - } + void InvalidateGlue(); const ScChartPositionMap* GetPositionMap(); }; |