Created attachment 134524 [details] A test document with runs with and without xml:space Attached document has leading and trailing whitespace (tab and space) characters only in first line when opened in Word. Also, tabs between words also exist in first line. Second line has neither leading/trailing whitespace, nor tabs. In LibreOffice, the two lines both have leading/trailing whitespace, and tabs between words. The problem is absent handling of xml:space attribute (see paragraph 2.10 of XML 1.0 specification and 17.3.3.31 of ECMA-376-1:2016).
A patch is under review: https://gerrit.libreoffice.org/39682
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7c1a51516aaf2767e43b393259a1ad21570df5fb tdf#108995: take xml:space attribute into account It will be available in 6.0.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.