Created attachment 78591 [details] test document for space collapsing In ODF consecutive space are collapsed. E.g. <text:p><text:span>a </text:span> b</text:p> should have 1 space between 'a' and 'b'. <text:s/> is used for non-collapsing spaces. LibreOffice collapses normal spaces after <text:s/>, for example: <span>a </span><s/> <span>b</span> should have 3 spaces between 'a' and 'b'. LibreOffice only shows 2.
Created attachment 78592 [details] rendering of test document in calligra
Created attachment 78593 [details] rendering of test document in libreoffice
Created attachment 78594 [details] rendering of test document in ms office
Michael - is this expected behavior or indeed a bug?
Created attachment 78708 [details] same issue but now in odp file
(In reply to comment #4) > Michael - is this expected behavior or indeed a bug? Michael - ping! Thanks,
please give an update of the bug status with current LibO 4.4.3.2 release.
comment #4 and comment #7 -> NEEDINFO.
Created attachment 118197 [details] test files as rendered by LibreOffice 5.0.0.5 LO still handles the spaces wrong on some lines.
Converting Whiteboard tags to Keywords: filter:odf
Dear Bug Submitter, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team Sun, 11 Sep 2016 21:43:24 +0200
Bug submitter answered question in comment #7. Now, we are waiting for answer to comment #4. Best regards. JBF
@jos: obviously you can point us to the specs right away, so we can read and set to new? or alternatively: @mstahl: (In reply to Jean-Baptiste Faure from comment #12) > Now, we are waiting for answer to comment #4. maybe you can confirm right away?
The description of space collapsing is given in http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#a6_1_2White_Space_Characters Following steps 1, 2, and 3 in the section for the ODF fragment: <span>a </span><s/> <span>b</span> should yield 3 spaces between 'a' and 'b'. There is no rule that says that spaces after <s/> may be ignored.
thanks for reminding me of this. apparently nothing changed here between OOo 3.3 and current master. this is all rather confusing so i'm not quite sure i understand it. is whitespace directly following <text:s> allowed at all? 6.1.3 <text:s> The <text:s> element is used to represent the [UNICODE] character “ “ (U+0020, SPACE). This element shall be used to represent the second and all following “ “ (U+0020, SPACE) characters in a sequence of “ “ (U+0020, SPACE) characters. doesn't a space character following the <text:s> violate the "shall" wording above, and it should be something like this? <span>a </span><s c="2"/><span>b</span> <span>a </span><s/><span><s/>b</span> or does "sequence" imply there are no opening or closing XML tags between the spaces? some relevant issues: https://issues.oasis-open.org/browse/OFFICE-3828 https://issues.oasis-open.org/browse/OFFICE-3706
<span>a </span><s c="2"/><span>b</span> is the right way to create this document. And one might even claim that <span>a </span><s/> <span>b</span> is invalid. But it would still be nice if applications would interpret it the same way.
fixed on master
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b5b57c677fd7fe9b2594e428c556862df88fca9d tdf#64038 ODF import: fix handling of space following <text:s> It will be available in 5.3.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.