sc/source/core/data/column2.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 53c08c9438a98b2c1a75ed8fa8dc7d2f7c79eebd
Author:     Dennis Francis <dennis.fran...@collabora.com>
AuthorDate: Wed Mar 16 11:29:34 2022 +0530
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Apr 1 13:48:57 2022 +0200

    lok: CopyCellNotesHandler: use the cloned object
    
    to get correct id for the new cell-note.
    
    Conflicts:
            sc/source/core/data/column2.cxx
    
    Change-Id: I4df492ad91faad5797ba513f9a3aa9abd2baf88f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131690
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    (cherry picked from commit acafc2823f917b6f6299fa0b65a0d7461531c8a5)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132254
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 2918e31cd2c4..a8c704a5bef4 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1853,9 +1853,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);
     }
 };
 

Reply via email to