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/rangenam.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/rangenam.hxx')
-rw-r--r-- | sc/inc/rangenam.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx index a1924de86a26..19c288b8ac87 100644 --- a/sc/inc/rangenam.hxx +++ b/sc/inc/rangenam.hxx @@ -63,7 +63,8 @@ private: OUString aName; OUString aUpperName; // #i62977# for faster searching (aName is never modified after ctor) OUString maNewName; ///< used for formulas after changing names in the dialog - ScTokenArray* pCode; + std::unique_ptr<ScTokenArray> + pCode; ScAddress aPos; Type eType; ScDocument* pDoc; @@ -116,9 +117,9 @@ public: sal_uInt16 GetIndex() const { return nIndex; } /// Does not change the name, but sets maNewName for formula update after dialog. void SetNewName( const OUString& rNewName ) { maNewName = rNewName; } - ScTokenArray* GetCode() { return pCode; } + ScTokenArray* GetCode() { return pCode.get(); } SC_DLLPUBLIC void SetCode( ScTokenArray& ); - const ScTokenArray* GetCode() const { return pCode; } + const ScTokenArray* GetCode() const { return pCode.get(); } SC_DLLPUBLIC FormulaError GetErrCode() const; bool HasReferences() const; void AddType( Type nType ); |