sw/source/filter/ww8/docxattributeoutput.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 42c6e2eb529ec7ca66684bbf4603bace95d33556 Author: Vasily Melenchuk <vasily.melenc...@cib.de> AuthorDate: Fri Nov 26 14:03:22 2021 +0300 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Mon Nov 29 12:57:01 2021 +0100 docx export: preserve spaces in field instructions MS Word is putting spaces between field mark and field instruction text. Writer preserves these spaces, but without xml:space="preserve" they are not displayed by Word later. Change-Id: I480e6febf0ee278b56e9dfc6e0430c5fd5bdfd71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125875 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 6f531bef6cd6..71fa753bd44c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2350,7 +2350,7 @@ void DocxAttributeOutput::DoWriteCmd( const OUString& rCmd ) if ( m_pRedlineData && m_pRedlineData->GetType() == RedlineType::Delete ) nTextToken = XML_delInstrText; - m_pSerializer->startElementNS(XML_w, nTextToken); + m_pSerializer->startElementNS(XML_w, nTextToken, FSNS(XML_xml, XML_space), "preserve"); m_pSerializer->writeEscaped( rCmd ); m_pSerializer->endElementNS( XML_w, nTextToken );