summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-08-09 12:11:17 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-09 17:01:52 +0200
commit844f9fa6ba7108b12758202c5fd08daa2a707641 (patch)
tree45607d6e722b3587884430728cd446dd3740c9f3 /sw
parentfca94779872b8ba0b0583d0b7068f1a46beb88c5 (diff)
tdf#126626 sw: fix duplicate SwUndoInsLayFormat in single-node Copy
Fly Undo created later in SwUndoInserts::SetInsertRange(); suppress it in DocumentContentOperationsManager::CopyImpl(). (regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5) Change-Id: I3b8756c20a7472029748d9e64a941320fc10b19f Reviewed-on: https://gerrit.libreoffice.org/77190 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 207cb005d9a2..e86296671638 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4614,6 +4614,8 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// copy at-char flys in rPam
aInsPos = *pDestTextNd; // update to new (start) node for flys
+ // tdf#126626 prevent duplicate Undos
+ ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
CopyFlyInFlyImpl(aRg, &rPam, aInsPos, false);
break;