This is an automated email from the ASF dual-hosted git repository. damjan pushed a commit to branch AOO42X in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO42X by this push: new da1c051b9b 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. da1c051b9b is described below commit da1c051b9b2cdc4ed9487c3658fa0f9c052ccabb Author: Damjan Jovanovic <dam...@apache.org> 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++)