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-10 07:47:48 +0100 |
commit | 9a35b8f4478553fc314b9ce6b616d2d686867a3e (patch) | |
tree | 5491ab67905946a750655266beb1660b6baaefe1 | |
parent | 89e901484cba0a988d46da39cef357b34a935142 (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>
(cherry picked from commit 430a3e123c24ba2e87d89dddebb4fda4d3ff2e93)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124669
Reviewed-by: Luboš Luňák <l.lunak@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 655d7a1554fa..d32ec61b38fd 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 ); |