sc/source/ui/view/viewfun5.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 3b229856b2f09c496dc0800f8a4efac9fcebda91 Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Tue Nov 2 15:34:08 2021 +0530 Commit: Dennis Francis <dennis.fran...@collabora.com> CommitDate: Wed Nov 10 07:55:59 2021 +0100 sc: EMBED_SOURCE: also include objects on copy to clip This is to match the behaviour of copy-pasting with the internal clipboard. If user copies a range that contains some images then on pasting these images are also included when using internal clipboard document. Change-Id: I61a6e71bd6afcace51230d1e7e7539e88404cbe5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124628 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Dennis Francis <dennis.fran...@collabora.com> (cherry picked from commit 430a3e123c24ba2e87d89dddebb4fda4d3ff2e93) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124672 Tested-by: Jenkins diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index c370fe0bbe47..5c6d89671da4 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -162,7 +162,8 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, nFirstRow = nLastRow = 0; } ScClipParam aClipParam(ScRange(nFirstCol, nFirstRow, nSrcTab, nLastCol, nLastRow, nSrcTab), false); - rSrcDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSrcMark, false, false); + bool bIncludeObjects = (nFormatId == SotClipboardFormatId::EMBED_SOURCE); + rSrcDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSrcMark, false, bIncludeObjects); ScGlobal::SetClipDocName( xDocShRef->GetTitle( SFX_TITLE_FULLNAME ) ); SetCursor( nPosX, nPosY );