[Libreoffice-commits] core.git: Branch 'libreoffice-6-4-0' - writerfilter/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 16 09:20:25 UTC 2020
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 9b39977e4133d4430f0969115902a6fd1fac91f2
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jan 14 18:42:52 2020 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jan 16 10:19:57 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>
(cherry picked from commit f761059b8c8ffe4e7b6e28924898ba71ee6b9ea8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86832
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
(cherry picked from commit bdd17d4dd5c51d563c5f866e69c47e458b3851b6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86862
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index ec337152525f..8c3638423c93 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3600,7 +3600,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 }},
@@ -4550,6 +4550,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