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/source/core/data/column4.cxx | |
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/source/core/data/column4.cxx')
-rw-r--r-- | sc/source/core/data/column4.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index d21d52f4029c..379d6e24a389 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -295,7 +295,7 @@ void ScColumn::CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1, for (size_t i = 0; i < nDestSize; ++i) { bool bCloneCaption = (nFlags & InsertDeleteFlags::NOCAPTIONS) == InsertDeleteFlags::NONE; - aNotes.push_back(pNote->Clone(rSrcPos, *pDocument, aDestPos, bCloneCaption)); + aNotes.push_back(pNote->Clone(rSrcPos, *pDocument, aDestPos, bCloneCaption).release()); aDestPos.IncRow(); } @@ -611,14 +611,14 @@ void ScColumn::CloneFormulaCell( CellStorageModified(); } -ScPostIt* ScColumn::ReleaseNote( SCROW nRow ) +std::unique_ptr<ScPostIt> ScColumn::ReleaseNote( SCROW nRow ) { if (!ValidRow(nRow)) return nullptr; ScPostIt* p = nullptr; maCellNotes.release(nRow, p); - return p; + return std::unique_ptr<ScPostIt>(p); } size_t ScColumn::GetNoteCount() const |