diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-04 17:09:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-05 09:25:38 +0000 |
commit | 7bcd59241495fe474387abb176185d8775aa104c (patch) | |
tree | d8caa418e5b6eae5c57efc37145119cac191b721 | |
parent | 638a86ec065f43425065d6459fde05bf60c0e575 (diff) |
Resolves: tdf#91995 copying cells to undo doc shallow copied note pointer
maybe UpdateCaptionPos isn't needed if we do it this way and deep
copy it.
surely we have to copy the note here, otherwise it gets deleted by both the
source and destination document
Change-Id: I6bc885c45b2938d0c775572c48642e67cd1ef5ca
Reviewed-on: https://gerrit.libreoffice.org/26913
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 7566851d653ec052e9b7baa98ec2a993328f84e4)
Reviewed-on: https://gerrit.libreoffice.org/26940
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/core/data/column.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index d4b5a2e0b4e7..9ddb819a6918 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1208,6 +1208,10 @@ void ScColumn::CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDes ScPostIt* pNote = maCellNotes.get<ScPostIt*>(nSrcRow); if (pNote) { + pNote = pNote->Clone(ScAddress(nCol, nSrcRow, nTab), + rDestCol.GetDoc(), + ScAddress(rDestCol.nCol, nDestRow, rDestCol.nTab), + false); rDestCol.maCellNotes.set(nDestRow, pNote); pNote->UpdateCaptionPos(ScAddress(rDestCol.nCol, nDestRow, rDestCol.nTab)); } |