writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 +- writerfilter/source/ooxml/model.xml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
New commits: commit ae97beb73efca8e31a7b2d93d55bdb118711d72a Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Tue Oct 15 18:05:21 2019 +0200 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Wed Oct 23 13:04:25 2019 +0200 tdf#120224 writerfilter: don't suppress all bookmarks inside fields MSWordExportBase used to erroneously export all sorts of marks as bookmarks, but we fixed that. Apparently this code in DomainMapper_Impl::SetBookmarkName() should prevent import of the bookmarks that were exported as duplicates for fieldmarks; suppress only the marks with the same name as the fieldmark, but not unrelated marks that happen to start inside the field, like the "_GoBack" one in tdf120224_textControlCrossRef.docx. The reason why this was necessary previously is some dubious nonsense in model.xml that caused the ffData stuff to be delayed until the next run, hence the bookmark start is sent to domain mapper before the ffData; this was already helpfully marked with a TODO comment, so just implement the suggestion. (regression from 579c0749bef8c980507229439715e72060c1b077) Change-Id: I15a1865ac34b0b9b3f11849d612e95115582b90b Reviewed-on: https://gerrit.libreoffice.org/80917 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index b2cb490f221a..e4b88d868cf6 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -5455,7 +5455,7 @@ void DomainMapper_Impl::SetBookmarkName( const OUString& rBookmarkName ) if ( IsOpenField() ) { FFDataHandler::Pointer_t pFFDataHandler(GetTopFieldContext()->getFFDataHandler()); - if ( IsOpenFieldCommand() || (pFFDataHandler && pFFDataHandler->getName() == rBookmarkName) ) + if (pFFDataHandler && pFFDataHandler->getName() == rBookmarkName) { // HACK: At the END marker, StartOrEndBookmark will START // a bookmark which will eventually be abandoned, not created. diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index dc260be432cf..f4fdf41dad57 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -17650,8 +17650,7 @@ <element name="checkBox" tokenid="ooxml:CT_FFData_checkBox"/> <element name="ddList" tokenid="ooxml:CT_FFData_ddList"/> <element name="textInput" tokenid="ooxml:CT_FFData_textInput"/> - <!-- TODO: This is possibly wrong and should be sendPropertiesWithId --> - <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:ffdata"/> + <action name="end" action="sendPropertiesWithId" sendtokenid="ooxml:ffdata"/> <action name="end" action="clearProps"/> </resource> <resource name="CT_FFHelpText" resource="Properties"> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits