diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2021-11-02 15:34:08 +0530 |
---|---|---|
committer | Dennis Francis <dennis.francis@collabora.com> | 2021-11-04 08:20:10 +0100 |
commit | 430a3e123c24ba2e87d89dddebb4fda4d3ff2e93 (patch) | |
tree | 55159794c3880840c8b6a5a5f0a28111f36b2e5c | |
parent | 4ff08a1332e5150d7ef978572e747ac8da3a0820 (diff) |
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 <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
-rw-r--r-- | sc/source/ui/view/viewfun5.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 722076048eae..c1c156c04724 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -160,7 +160,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 ); |