sw content controls, drop-down: add DOCX import

Desktop / LibreOffice - Miklos Vajna [collabora.com] - 11 May 2022 07:25 UTC

- inline drop-down content controls were imported as an SwDropDownField previously, but that has the drawback of not being able to store both display texts and values of each list items

- adapt tests under sw/qa/ which asserted that the import result is a field, and check content control properties instead

- change dmapper so that SdtControlType::dropDown is one more inline SDT that gets mapped to SwContentControl

- remove the no longer needed grab-bagging in writerfilter/, otherwise we would write the SDT markup twice on export

- improve DomainMapper_Impl::PopSdt() to actually map the collected dropdown properties to properties on the to-be-inserted content control

Change-Id: I7e88ec8cd1d73bc1c6c75154d6ab07352cbcec8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134143

24417d8c3c9e sw content controls, drop-down: add DOCX import
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 23 +++++++-
sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 59 ++++++++++++---------
sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 43 ++++++++++-----
writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx | 51 ++++++++++++++++++
.../dmapper/data/sdt-run-dropdown.docx | Bin 0 -> 4323 bytes
writerfilter/source/dmapper/DomainMapper.cxx | 23 ++++++--
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 20 +++++++
writerfilter/source/dmapper/SdtHelper.cxx | 1 +
writerfilter/source/dmapper/SdtHelper.hxx | 5 +-
9 files changed, 179 insertions(+), 46 deletions(-)

Upstream: cgit.freedesktop.org


  • Share