summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2021-11-02 15:34:08 +0530
committerDennis Francis <dennis.francis@collabora.com>2021-11-10 07:55:59 +0100
commit3b229856b2f09c496dc0800f8a4efac9fcebda91 (patch)
tree0060867dd38a5fa44298ca7ae964afc63ce6c99d /sc
parent42df36429bbb32cd75fa1661a31821a9446ef648 (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/+/124672 Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/viewfun5.cxx3
1 files changed, 2 insertions, 1 deletions
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 );