This is an automated email from the ASF dual-hosted git repository.
damjan pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO41X by this push:
new 90c740b5bc Also allow:
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 instead of only:
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID() in
ScDocument::CopyBlockFromClip(), because that's what it is when cells are
dragged and dropped instead of cut and pasted.
90c740b5bc is described below
commit 90c740b5bc3772cd09423718c8d572588e4187c2
Author: Damjan Jovanovic <[email protected]>
AuthorDate: Mon Apr 10 09:25:01 2023 +0200
Also allow:
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0
instead of only:
pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == GetDocumentID()
in ScDocument::CopyBlockFromClip(), because that's what it is when
cells are dragged and dropped instead of cut and pasted.
Fixes: #128566 - cell displacement problem
Patch by: me
(cherry picked from commit 3accd9b1ca87d0b4656a691efa455d8f0a24bdc9)
---
main/sc/source/core/data/document.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/main/sc/source/core/data/document.cxx
b/main/sc/source/core/data/document.cxx
index 250dab2bb2..ba0e58c6e6 100644
--- a/main/sc/source/core/data/document.cxx
+++ b/main/sc/source/core/data/document.cxx
@@ -1966,7 +1966,8 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW
nRow1,
}
}
if ( (pCBFCP->nInsFlag & IDF_CONTENTS) &&
- (pCBFCP->pClipDoc->GetClipParam().getSourceDocID() ==
GetDocumentID()) ) // #118023# only update references for *intra-document* cut
and paste
+ (pCBFCP->pClipDoc->GetClipParam().getSourceDocID() == 0 ||
+ pCBFCP->pClipDoc->GetClipParam().getSourceDocID() ==
GetDocumentID()) ) // #118023# only update references for *intra-document* cut
and paste
{
nClipTab = 0;
for (SCTAB i = pCBFCP->nTabStart; i <= nTabEnd; i++)