sw/source/filter/ww8/docxattributeoutput.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a1306b2d9204ea72b5e5d045f634551a71d34e63
Author:     Vasily Melenchuk <vasily.melenc...@cib.de>
AuthorDate: Fri Nov 26 14:03:22 2021 +0300
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Nov 30 12:06:26 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>
    (cherry picked from commit 42c6e2eb529ec7ca66684bbf4603bace95d33556)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126004
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 9b6a144ed481..ce1b190382bc 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2186,7 +2186,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 );
 

Reply via email to