summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-10-15 18:05:21 +0200
committerMichael Stahl <michael.stahl@cib.de>2019-10-23 13:04:25 +0200
commitae97beb73efca8e31a7b2d93d55bdb118711d72a (patch)
tree838da9bec0e2f3d0b40815917236c65102bcf84b
parente0e0109f01929024f7dd60a97616bb3b25de3b92 (diff)
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.stahl@cib.de>
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
-rw-r--r--writerfilter/source/ooxml/model.xml3
2 files changed, 2 insertions, 3 deletions
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">