diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2022-03-16 11:29:34 +0530 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2022-03-24 14:14:13 +0100 |
commit | acafc2823f917b6f6299fa0b65a0d7461531c8a5 (patch) | |
tree | fb0bc8930975589732b79c6f621a66622e557fdc | |
parent | lok: ensure unique id for annotations (diff) | |
download | core-acafc2823f917b6f6299fa0b65a0d7461531c8a5.tar.gz core-acafc2823f917b6f6299fa0b65a0d7461531c8a5.zip |
lok: CopyCellNotesHandler: use the cloned object
to get correct id for the new cell-note.
Change-Id: I4df492ad91faad5797ba513f9a3aa9abd2baf88f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131690
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r-- | sc/source/core/data/column2.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 886dab8f5ab8..25f7bdd12f86 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -1866,9 +1866,10 @@ public: SCROW nDestRow = nRow + mnDestOffset; ScAddress aSrcPos(mnSrcCol, nRow, mnSrcTab); ScAddress aDestPos(mnDestCol, nDestRow, mnDestTab); - miPos = mrDestNotes.set(miPos, nDestRow, p->Clone(aSrcPos, mrDestCol.GetDoc(), aDestPos, mbCloneCaption).release()); + ScPostIt* pNew = p->Clone(aSrcPos, mrDestCol.GetDoc(), aDestPos, mbCloneCaption).release(); + miPos = mrDestNotes.set(miPos, nDestRow, pNew); // Notify our LOK clients also - ScDocShell::LOKCommentNotify(LOKCommentNotificationType::Add, &mrDestCol.GetDoc(), aDestPos, p); + ScDocShell::LOKCommentNotify(LOKCommentNotificationType::Add, &mrDestCol.GetDoc(), aDestPos, pNew); } }; |