[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source
Eike Rathke
erack at redhat.com
Sun Jan 4 12:55:19 PST 2015
sc/source/core/data/document.cxx | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
New commits:
commit f303896706144cd25aa907805db6ca8bf338bb13
Author: Eike Rathke <erack at redhat.com>
Date: Thu Dec 18 20:07:55 2014 +0100
fdo#68385 update references only if cut originates from the same document
Change-Id: Ia7b27309251cf9e47505c58d8ed0172d134280f4
(cherry picked from commit f2ac9fab2677a6a718f251baef75d3cae96d1f01)
Reviewed-on: https://gerrit.libreoffice.org/13530
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index c6c3196..b423f05 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2552,11 +2552,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
{
More information about the Libreoffice-commits
mailing list