fdo#68385 update references only if cut originates from the same document

Change-Id: Ia7b27309251cf9e47505c58d8ed0172d134280f4
This commit is contained in:
Eike Rathke
2014-12-18 20:07:55 +01:00
parent 64c479e9da
commit f2ac9fab26

View File

@@ -2548,11 +2548,16 @@ void ScDocument::CopyBlockFromClip(
aRefCxt.mnTabDelta = nDz;
if (rCxt.getClipDoc()->GetClipParam().mbCutMode)
{
bool bOldInserting = IsInsertingFromOtherDoc();
SetInsertingFromOtherDoc( true);
aRefCxt.meMode = URM_MOVE;
UpdateReference(aRefCxt, rCxt.getUndoDoc(), false);
SetInsertingFromOtherDoc( bOldInserting);
// Update references only if cut originates from the same
// document we are pasting into.
if (rCxt.getClipDoc()->GetPool() == GetPool())
{
bool bOldInserting = IsInsertingFromOtherDoc();
SetInsertingFromOtherDoc( true);
aRefCxt.meMode = URM_MOVE;
UpdateReference(aRefCxt, rCxt.getUndoDoc(), false);
SetInsertingFromOtherDoc( bOldInserting);
}
}
else
{