summaryrefslogtreecommitdiff
path: root/sw/inc/IDocumentMarkAccess.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-09-27 15:55:43 +0200
committerAndras Timar <andras.timar@collabora.com>2017-09-30 12:16:52 +0200
commitfb741b48a4d11c1f91702a73ef600c7df976a298 (patch)
tree3359e5c553d6c332afa4f04a7ee24336ecbc35b6 /sw/inc/IDocumentMarkAccess.hxx
parent149f28e9a5d66db18ffb36547b2ba394c303fc4d (diff)
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) (cherry picked from commit 421a23bb36bbf51edfabc58b7d2cd28ad37719d0) Silence --disable-assert-always-abort warnings (cherry picked from commit 7e76b983301b02dd7020636905b764b981b1fff0) loplugin:constparams (cherry picked from commit 14e2a82002042a3fe4d8866b635ee84a436a7a7c) Change-Id: I3c99b8c6d720951655198e682018794337859373 Reviewed-on: https://gerrit.libreoffice.org/42868 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw/inc/IDocumentMarkAccess.hxx')
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx5
1 files changed, 4 insertions, 1 deletions
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,