From a0fa6911a013dc5cc844fdbee13132a467f4a437 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 15 Oct 2019 12:41:37 +0200 Subject: sw: fix copying of fieldmarks in lcl_CopyBookmarks() Surprisingly this handles CHECKBOX_FIELDMARK differently than the others but clearly it's a bug not to copy a fully selected TEXT_FIELDMARK as seen in CppunitTest_sw_ooxmlexport testMultiPageToc, where a header is copied with its CH_TXT_ATR_FIELD* but not the fieldmark. Change-Id: Ibf4d934ea834c1ac9fe4e541259605a745246049 Reviewed-on: https://gerrit.libreoffice.org/80914 Tested-by: Jenkins Reviewed-by: Michael Stahl --- sw/source/core/doc/DocumentContentOperationsManager.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index baff9f898f4d..c7faedd49eab 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -251,7 +251,10 @@ namespace if ( rMarkStart >= rStt && rMarkEnd <= rEnd && ( bIsNotOnBoundary || aMarkType == IDocumentMarkAccess::MarkType::ANNOTATIONMARK - || aMarkType == IDocumentMarkAccess::MarkType::CHECKBOX_FIELDMARK ) ) + || aMarkType == IDocumentMarkAccess::MarkType::TEXT_FIELDMARK + || aMarkType == IDocumentMarkAccess::MarkType::CHECKBOX_FIELDMARK + || aMarkType == IDocumentMarkAccess::MarkType::DROPDOWN_FIELDMARK + || aMarkType == IDocumentMarkAccess::MarkType::DATE_FIELDMARK)) { vMarksToCopy.push_back(pMark); } -- cgit v1.2.3