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

New commits:
commit 95a66503602dd7cfb5cff2f719914c3053014993
Author:     Vasily Melenchuk <vasily.melenc...@cib.de>
AuthorDate: Fri Nov 26 14:03:22 2021 +0300
Commit:     Vasily Melenchuk <vasily.melenc...@cib.de>
CommitDate: Tue Dec 7 07:09:56 2021 +0300

    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.behr...@allotropia.de>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index be3d70f4a036..a78f1b412798 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, FSNS(XML_xml, 
XML_space), "preserve" );
+    m_pSerializer->startElementNS( XML_w, XML_instrText, FSNS(XML_xml, 
XML_space), "preserve", FSEND );
     m_pSerializer->writeEscaped( rCmd );
     m_pSerializer->endElementNS( XML_w, XML_instrText );
 

Reply via email to