summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-12-18 18:08:23 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-12-21 10:07:08 +0100
commit821a6d4ed6423b5e07c6add33c74fb75757ef338 (patch)
treeb5a8a6b0f69017b1b4e12c697202a9c778cd5d24 /sw/source/filter
parentda9a2f68b5b7d17c0d066f2221f16ea443f2b9d5 (diff)
tdf#129247 writerfilter,sw: improve handling of CONTROL fields
The "CONTROL Forms.CheckBox.1" field has a shape as its result. Previously this was imported as an unknown generic field by writerfilter and exported as a CONTROL field followed by a SHAPE field; the CONTROL field was discarded by Writer on a subsequent import. Now this is exported as nested fields to WW8, i.e., SHAPE inside the result of CONTROL, which is an improvement. Unfortunately the WW8 import discards the result of the CONTROL field, because its field code is written as ww::eUNKNOWN = 1, not ww::eCONTROL = 87. To fix that, set the ODF_ID_PARAM parameter in writerfilter for these fields, which is checked in MSWordExportBase::OutputTextNode(). This reveals that the field code was set wrongly on the fieldmark too, it should be set as a ODF_CODE_PARAM parameter and not as the type. Furthermore the WW8 import needs to allow nested fields in the eCONTROL field. Change-Id: If79a186ea30c3b4a933ba1d8325111215250b833 Reviewed-on: https://gerrit.libreoffice.org/85418 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 27b6c82b79f4af2ab16d53de3b2065df0acebdb8) Reviewed-on: https://gerrit.libreoffice.org/85527 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index ea0a435371a3..694782a1e1ed 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -715,6 +715,8 @@ static bool AcceptableNestedField(sal_uInt16 nFieldCode)
// Accept AutoTextList field as nested field.
// Thus, the field result is imported as plain text.
case ww::eAUTOTEXTLIST:
+ // tdf#129247 CONTROL contains a nested SHAPE field in the result
+ case ww::eCONTROL:
return true;
default:
return false;