summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2021-11-26 14:03:22 +0300
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-11-29 13:05:24 +0100
commit63430f70664a39ecfb900e6919c19d00661aeb61 (patch)
treea301e22e64439e23a680267fe7038adaf6d3c2f3
parentpostgresql: upgrade to release 13.5 (diff)
downloadcore-63430f70664a39ecfb900e6919c19d00661aeb61.tar.gz
core-63430f70664a39ecfb900e6919c19d00661aeb61.zip
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. Conflicts: sw/source/filter/ww8/docxattributeoutput.cxx Change-Id: I480e6febf0ee278b56e9dfc6e0430c5fd5bdfd71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125875 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 366670f86974..be3d70f4a036 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1772,7 +1772,7 @@ void DocxAttributeOutput::DoWriteCmd( const OUString& rCmd )
m_aSeqBookmarksNames[sSeqName].push_back(m_sLastOpenedBookmark);
}
// Write the Field command
- m_pSerializer->startElementNS( XML_w, XML_instrText, FSEND );
+ m_pSerializer->startElementNS( XML_w, XML_instrText, FSNS(XML_xml, XML_space), "preserve" );
m_pSerializer->writeEscaped( rCmd );
m_pSerializer->endElementNS( XML_w, XML_instrText );