[Libreoffice-commits] core.git: writerfilter/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 15 09:40:28 UTC 2020
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit f761059b8c8ffe4e7b6e28924898ba71ee6b9ea8
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jan 14 18:42:52 2020 +0100
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Wed Jan 15 10:39:46 2020 +0100
tdf#129525 writerfilter: ignore GOTOBUTTON field
The bugdoc contains nested fields for some of the page numbers:
{\field\flddirty{\*\fldinst {\caps0\lang1024 GOTOBUTTON _Toc434317064 }{\field{\*\fldinst {\caps0\lang1024 PAGEREF _Toc434317064 }}{\fldrslt {\caps0\lang1024 4}}}}}
The problem is that the outer field does not have a \fldrslt, only the
inner PAGEREF field has one.
This used to be imported incorrectly because the nested field's result
ended up in the outer field's result; now it's imported correctly but
then there's no field result to show, because Writer can't expand
fieldmarks.
As we can't do anything with a GOTOBUTTON field, just ignore it
explicitly to prevent creating a generic fieldmark; the PAGEREF is
already ignored inside of a ToX since commit
9679e9c23216decb5f9f25f85b04cb3f25211111.
("regression" from e511a0ca5dde6d731bb126bbfe21768867890102..d9030ad6298e2f49ee63489d6158ea6ad23c0111)
Change-Id: I8135c8d14995378181ce959d22d9be5ea0cae260
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86796
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 75b6133e312c..eaa720d91565 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3713,7 +3713,7 @@ static const FieldConversionMap_t & lcl_GetFieldConversion()
{"FORMCHECKBOX", {"", FIELD_FORMCHECKBOX }},
{"FORMDROPDOWN", {"DropDown", FIELD_FORMDROPDOWN }},
{"FORMTEXT", {"Input", FIELD_FORMTEXT }},
-// {"GOTOBUTTON", {"", FIELD_GOTOBUTTON }},
+ {"GOTOBUTTON", {"", FIELD_GOTOBUTTON }},
{"HYPERLINK", {"", FIELD_HYPERLINK }},
{"IF", {"ConditionalText", FIELD_IF }},
// {"INFO", {"", FIELD_INFO }},
@@ -4677,6 +4677,7 @@ void DomainMapper_Impl::CloseFieldCommand()
case FIELD_EQ:
case FIELD_INCLUDEPICTURE:
case FIELD_SYMBOL:
+ case FIELD_GOTOBUTTON:
bCreateField = false;
break;
case FIELD_FORMCHECKBOX :
More information about the Libreoffice-commits
mailing list