tdf#148111: docx std fields: use placeholder text for empty data
commitcebca5086b42ff9462d8c6f8ed2344a0138b2f4a
authorVasily Melenchuk <vasily.melenchuk@cib.de>
Fri, 25 Mar 2022 08:14:10 +0000 (25 11:14 +0300)
committerXisco Fauli <xiscofauli@libreoffice.org>
Mon, 28 Mar 2022 09:32:10 +0000 (28 11:32 +0200)
tree8b772e0060b303c2d69132003d5973dedeb948a3
parent88df06e5268ddfe3e0961d8fdbf4aaad1bfa3674
tdf#148111: docx std fields: use placeholder text for empty data

It is quite unexpected Word behavior: if data source for sdt field
exists but contains empty string it is not used. Placeholder is
inserted instead.

In general behavior is more complex: logic of replacement is defined
by <w:showingPlcHdr> property and results can vary (see testcase).
But LO does not support this property correctly yet.

Change-Id: I2ec8efe05f79a01af5d74d21bfcd05f3b19e3970
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132096
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit 9d033508af5257aeebbd8c22a053db5e74a814d3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132050
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
sw/qa/extras/ooxmlexport/data/tdf148111.docx [new file with mode: 0644]
sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
writerfilter/source/dmapper/SdtHelper.cxx