diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-12-17 19:48:22 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-12-18 09:39:28 +0100 |
commit | 6c1e6b188eeb5868cafe3f1605f4213d627a452c (patch) | |
tree | 82c0692b4cc5a4939c82024a19f80e6f988ad322 /sw/inc/ndtxt.hxx | |
parent | 8e6ec5ebcc523a189238a90fd9237872d67085f9 (diff) |
tdf#138897 sw: avoid creating SwUndoResetAttr in CopyImplImpl()
The problem is that SwTextNode::CopyCollFormat() both creates the
SwTextFormatColl with undo and applies it with undo.
The first is desirable, the second causes a problem because it
necessarily happens after SplitNode() and currently happens before
copying the non-start/end nodes, so the node-index may not match in
Undo, regardless if it runs before or after SwUndoCpyDoc.
But SwUndoInserts restores the SwTextFormatColl on the node itself,
so it can just be suppressed, which looks easier than refactoring this
to call SplitNode() with Undo enabled.
(regression from b4365b985178e1866c74afd757a104aad1d405a9)
Change-Id: I4d15fb88cd5ae4cc53d9afb3397dec8fcf7635fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107921
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/inc/ndtxt.hxx')
-rw-r--r-- | sw/inc/ndtxt.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 5733a5f2c3d6..7692dc5b6470 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -413,7 +413,7 @@ public: /** Copy collection with all auto formats to dest-node. The latter might be in another document! (Method in ndcopy.cxx!!). */ - void CopyCollFormat( SwTextNode& rDestNd ); + void CopyCollFormat(SwTextNode& rDestNd, bool bUndoForChgFormatColl = true); // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF: |