diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-10 16:07:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-11 08:42:59 +0200 |
commit | ff8442fd85f2e281a564e3dc832a751a3a9c3072 (patch) | |
tree | 05d4a59e914d53a357f99a8ce6146cb3e35f47c3 /sc/source/core/data/column3.cxx | |
parent | 672660031e4ca38205e2068b1e321268a844a68b (diff) |
pass EditTextObject around using std::unique_ptr
Change-Id: I71f4529c2e02fd0ac2561191e4cb35e18e206037
Reviewed-on: https://gerrit.libreoffice.org/52682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core/data/column3.cxx')
-rw-r--r-- | sc/source/core/data/column3.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 2907532f961e..114b132d797f 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -1359,7 +1359,7 @@ public: void operator() (size_t nRow, const EditTextObject* p) { - miNewCellsPos = maNewCells.set(miNewCellsPos, nRow-mnRowOffset, p->Clone()); + miNewCellsPos = maNewCells.set(miNewCellsPos, nRow-mnRowOffset, p->Clone().release()); } void operator() (size_t nRow, const ScFormulaCell* p) @@ -1475,7 +1475,7 @@ public: { EditTextObject* pObj = sc::edittext_block::at(*aPos.first->data, aPos.second); miNewCellsPos = maNewCells.set( - miNewCellsPos, nDestRow-mnRowOffset, pObj->Clone()); + miNewCellsPos, nDestRow-mnRowOffset, pObj->Clone().release()); } break; case sc::element_type_formula: @@ -1877,22 +1877,22 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const OUString& rString, return bNumFmtSet; } -void ScColumn::SetEditText( SCROW nRow, EditTextObject* pEditText ) +void ScColumn::SetEditText( SCROW nRow, std::unique_ptr<EditTextObject> pEditText ) { pEditText->NormalizeString(GetDoc()->GetSharedStringPool()); sc::CellStoreType::iterator it = GetPositionToInsert(nRow); - maCells.set(it, nRow, pEditText); + maCells.set(it, nRow, pEditText.release()); maCellTextAttrs.set(nRow, sc::CellTextAttr()); CellStorageModified(); BroadcastNewCell(nRow); } -void ScColumn::SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, EditTextObject* pEditText ) +void ScColumn::SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, std::unique_ptr<EditTextObject> pEditText ) { pEditText->NormalizeString(GetDoc()->GetSharedStringPool()); rBlockPos.miCellPos = GetPositionToInsert(rBlockPos.miCellPos, nRow); - rBlockPos.miCellPos = maCells.set(rBlockPos.miCellPos, nRow, pEditText); + rBlockPos.miCellPos = maCells.set(rBlockPos.miCellPos, nRow, pEditText.release()); rBlockPos.miCellTextAttrPos = maCellTextAttrs.set( rBlockPos.miCellTextAttrPos, nRow, sc::CellTextAttr()); |