summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-04 17:09:11 +0100
committerTor Lillqvist <tml@collabora.com>2016-08-02 16:42:45 +0300
commitf4933afbd70136e3873f8197314ea41c1095076c (patch)
tree4e431768843e528b5b59948c598a000a1d8a6fae
parenttdf#73335 sc: ODF export: ignore ScChangeAction SC_CAT_NONE harder (diff)
downloadcore-f4933afbd70136e3873f8197314ea41c1095076c.tar.gz
core-f4933afbd70136e3873f8197314ea41c1095076c.zip
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> (cherry picked from commit 7bcd59241495fe474387abb176185d8775aa104c)
-rw-r--r--sc/source/core/data/column.cxx4
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));
}