Description: Underlined spaces at the end of a paragraph are not shown underlined in Word after exporting to docx. Steps to Reproduce: 1. Type "abc " 2. Underline all 3. Export to docx 4. Open docx in Word Actual Results: "abc" is underlined but the spaces after it are not. Expected Results: "abc" and the spaces after it should all be underlined. Reproducible: Always User Profile Reset: No Additional Info: There is an option in Word (Options, Advanced, Layout) called "Draw underline on trailing spaces". Checking this option fixes the problem. Writer should be setting this option on export, to match its own behaviour.
Hi Mathew, try checking the compatibility flag "Word-compatible trailing blanks" in LibreOffice, which is found under Tools - Options - LibreOffice Writer - Compatibility. Does it fix your problem?
No, it doesn't seem to make any difference.
Without trying any special options, I exported both from 7.3 and latest unstable and office.com shows the underline just fine. Which version of MSO did you use to open the DOCX? Arch Linux 64-bit, X11 Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 52ebc632b3cfa122dcb178cf28d8dbc7c7c57007 CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 3 February 2023
Reproduced in MS Word Version 2301 (Build 16026.20146 Click-to-Run) just now.
Created attachment 185093 [details] test file test file created in LO 7.6. This file is without underlined trailing spaces in word 2010, but with Underlined trailing spaces in office.com => looks like word's problem.
Thanks. As I said in the Additional Info section of my original report, Word *can* be made to underline the trailing spaces, by enabling the "Draw underline on trailing spaces" option, so my opinion is that Writer should be setting this option on export.
(In reply to Matthew Kogan from comment #6) > Thanks. As I said in the Additional Info section of my original report, Word > *can* be made to underline the trailing spaces, by enabling the "Draw > underline on trailing spaces" option, so my opinion is that Writer should be > setting this option on export. But why are we seeing the expected result, if Writer is not setting this option? Is the option really per document or global? Can you investigate this and provide a source on MSO's side?
Yes, it is a per-document option. https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.underlinetrailingspaces?view=openxml-2.8.1
(In reply to Matthew Kogan from comment #8) > Yes, it is a per-document option. > https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml. > wordprocessing.underlinetrailingspaces?view=openxml-2.8.1 Thanks. ulTrailSpace exists in the annotated schema writerfilter/source/ooxml/model.xml but it is not used anywhere in the code. I'll set to NEW tentatively and show this to developers.
Thank you.
No objection from devs, adjusting summary to reflect that this should not be done for existing documents.