From 421a23bb36bbf51edfabc58b7d2cd28ad37719d0 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 27 Sep 2017 15:55:43 +0200 Subject: tdf#112679 sw: fix copying of fieldmarks Aha, now we know that the reason for the defensive programming in lcl_AssureFieldMarksSet() was that there are actually 2 different use-cases for it: usually a new mark is inserted, so there are no dummy characters and they must be inserted. However when copying text, the dummy characters are copied too, so they must not be inserted, or we get duplicate fieldmarks. This also reverts commit d4036d3a89b65a4912f62e3930eb1a31cd90a16b which fixed the problem only for CHECKBOX_FIELDMARK in a different way. (regression from bb069fe7b8b6a24f9ff4df4c7052961e17ea3a8c) Change-Id: I3c99b8c6d720951655198e682018794337859373 --- sw/inc/IDocumentMarkAccess.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sw/inc/IDocumentMarkAccess.hxx') diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx index 6bd844d0c59f..ff0a13cccbc4 100644 --- a/sw/inc/IDocumentMarkAccess.hxx +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -72,12 +72,15 @@ class IDocumentMarkAccess @param eMark [in] the type of the new mark. + @param eMode + [in] is the new mark part of a text copy operation + @returns a pointer to the new mark (name might have changed). */ virtual ::sw::mark::IMark* makeMark(const SwPaM& rPaM, const OUString& rProposedName, - MarkType eMark) = 0; + MarkType eMark, ::sw::mark::InsertMode eMode) = 0; virtual sw::mark::IFieldmark* makeFieldBookmark( const SwPaM& rPaM, const OUString& rName, -- cgit