sc/source/core/data/drwlayer.cxx | 5 ----- sc/source/core/data/table2.cxx | 7 ++++--- 2 files changed, 4 insertions(+), 8 deletions(-)
New commits: commit b491bb4b1e2eb6745ced3e958550ea8526cd2f2a Author: Dennis Francis <dennis.fran...@collabora.co.uk> Date: Thu Jun 21 15:13:44 2018 +0530 tdf#112452 : Refine the fix for tdf#94561 Do the changes in 7c0f6b9d0fb8d7d9e54865ccf1047bb8f8148101 only if the destination is not an undo document. Also removes the below unnecessary change in that commit. if ( IsNoteCaption( pOldObject ) ) { pOldObject = aIter.Next(); continue; } Change-Id: Ib18324ed16e91dbd932d449858a489dc09c53713 Reviewed-on: https://gerrit.libreoffice.org/56287 Tested-by: Jenkins Reviewed-by: Eike Rathke <er...@redhat.com> (cherry picked from commit eebd2c72ce2d6003975de6b5bfe14b204b382a6e) Reviewed-on: https://gerrit.libreoffice.org/56474 Reviewed-by: Dennis Francis <dennis.fran...@collabora.co.uk> diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index d8c4069c135c..0fae0c873dbf 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -453,11 +453,6 @@ void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos ) SdrObject* pOldObject = aIter.Next(); while (pOldObject) { - if ( IsNoteCaption( pOldObject ) ) - { - pOldObject = aIter.Next(); - continue; - } ScDrawObjData* pOldData = GetObjData(pOldObject); if (pOldData) { diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 0f4e91090ffa..6f136059508d 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1127,19 +1127,20 @@ void ScTable::CopyToTable( if (!ValidColRow(nCol1, nRow1) || !ValidColRow(nCol2, nRow2)) return; + bool bIsUndoDoc = pDestTab->pDocument->IsUndo(); if (nFlags != InsertDeleteFlags::NONE) { InsertDeleteFlags nTempFlags( nFlags & ~InsertDeleteFlags( InsertDeleteFlags::NOTE | InsertDeleteFlags::ADDNOTES)); for (SCCOL i = nCol1; i <= nCol2; i++) - aCol[i].CopyToColumn(rCxt, nRow1, nRow2, nTempFlags, bMarked, + aCol[i].CopyToColumn(rCxt, nRow1, nRow2, bIsUndoDoc ? nFlags : nTempFlags, bMarked, pDestTab->aCol[i], pMarkData, bAsLink, bGlobalNamesToLocal); } if (!bColRowFlags) // Column widths/Row heights/Flags return; - if(pDestTab->pDocument->IsUndo() && (nFlags & InsertDeleteFlags::ATTRIB)) + if(bIsUndoDoc && (nFlags & InsertDeleteFlags::ATTRIB)) { pDestTab->mpCondFormatList.reset(new ScConditionalFormatList(pDestTab->pDocument, *mpCondFormatList)); } @@ -1247,7 +1248,7 @@ void ScTable::CopyToTable( if(nFlags & InsertDeleteFlags::OUTLINE) // also only when bColRowFlags pDestTab->SetOutlineTable( pOutlineTable.get() ); - if (bCopyCaptions && (nFlags & (InsertDeleteFlags::NOTE | InsertDeleteFlags::ADDNOTES))) + if (!bIsUndoDoc && bCopyCaptions && (nFlags & (InsertDeleteFlags::NOTE | InsertDeleteFlags::ADDNOTES))) { bool bCloneCaption = (nFlags & InsertDeleteFlags::NOCAPTIONS) == InsertDeleteFlags::NONE; CopyCaptionsToTable( nCol1, nRow1, nCol2, nRow2, pDestTab, bCloneCaption); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits