diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-14 14:39:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-16 12:16:49 +0100 |
commit | 1bf68dbf53f4b5308e295058226abd6d6fb49c3d (patch) | |
tree | 7d291955efb4f58ee047d49fcb5848a2e2bbb7c1 /sc/inc | |
parent | 3c93d34caa79c37c41eab1d3212a7ff1cdf53d34 (diff) |
pass ScPostIt around by unique_ptr
Change-Id: I99c1f0a5d5c760663f5150b477a936d2f45b874c
Reviewed-on: https://gerrit.libreoffice.org/66322
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/column.hxx | 4 | ||||
-rw-r--r-- | sc/inc/document.hxx | 6 | ||||
-rw-r--r-- | sc/inc/postit.hxx | 2 | ||||
-rw-r--r-- | sc/inc/table.hxx | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 7e12cf4eda46..d21918648678 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -602,10 +602,10 @@ public: const ScPostIt* GetCellNote( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const; void DeleteCellNotes( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership ); bool HasCellNotes() const; - void SetCellNote( SCROW nRow, ScPostIt* pNote); + void SetCellNote( SCROW nRow, std::unique_ptr<ScPostIt> pNote); bool IsNotesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const; - ScPostIt* ReleaseNote( SCROW nRow ); + std::unique_ptr<ScPostIt> ReleaseNote( SCROW nRow ); size_t GetNoteCount() const; void CreateAllNoteCaptions(); void ForgetNoteCaptions( SCROW nRow1, SCROW nRow2, bool bPreserveData ); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index bb7a4f01fa2b..7ff9ed357616 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1186,14 +1186,14 @@ public: /** Notes **/ SC_DLLPUBLIC ScPostIt* GetNote(const ScAddress& rPos); SC_DLLPUBLIC ScPostIt* GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab); - void SetNote(const ScAddress& rPos, ScPostIt* pNote); - void SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, ScPostIt* pNote); + void SetNote(const ScAddress& rPos, std::unique_ptr<ScPostIt> pNote); + void SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPostIt> pNote); SC_DLLPUBLIC bool HasNote(const ScAddress& rPos) const; bool HasNote(SCCOL nCol, SCROW nRow, SCTAB nTab) const; SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const; SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const; bool HasNotes() const; - SC_DLLPUBLIC ScPostIt* ReleaseNote(const ScAddress& rPos); + SC_DLLPUBLIC std::unique_ptr<ScPostIt> ReleaseNote(const ScAddress& rPos); SC_DLLPUBLIC ScPostIt* GetOrCreateNote(const ScAddress& rPos); SC_DLLPUBLIC ScPostIt* CreateNote(const ScAddress& rPos); size_t GetNoteCount( SCTAB nTab, SCCOL nCol ) const; diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index ca72c47befca..4700979cd04a 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -90,7 +90,7 @@ public: object (used e.g. in Undo documents to restore the pointer to the existing caption object). */ - ScPostIt* Clone( + std::unique_ptr<ScPostIt> Clone( const ScAddress& rOwnPos, ScDocument& rDestDoc, const ScAddress& rDestPos, bool bCloneCaption ) const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index e26ae0ae7a40..d853c4072de1 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -460,7 +460,7 @@ public: void GetFirstDataPos(SCCOL& rCol, SCROW& rRow) const; void GetLastDataPos(SCCOL& rCol, SCROW& rRow) const; - ScPostIt* ReleaseNote( SCCOL nCol, SCROW nRow ); + std::unique_ptr<ScPostIt> ReleaseNote( SCCOL nCol, SCROW nRow ); size_t GetNoteCount( SCCOL nCol ) const; SCROW GetNotePosition( SCCOL nCol, size_t nIndex ) const; |