Bug 164958 - Trailing spaces cannot be underscored in legacy documents
Summary: Trailing spaces cannot be underscored in legacy documents
Status: RESOLVED DUPLICATE of bug 164487
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-30 13:14 UTC by csongor
Modified: 2025-01-30 13:51 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
example document showing the missing underlines (66.84 KB, application/vnd.oasis.opendocument.text)
2025-01-30 13:14 UTC, csongor
Details
binary fix for the legacy file (66.81 KB, application/vnd.oasis.opendocument.text)
2025-01-30 13:15 UTC, csongor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description csongor 2025-01-30 13:14:16 UTC
Created attachment 198890 [details]
example document showing the missing underlines

I have an old document I created a couple of years ago, with an older version of LO. The document is a lecturebook, where I used underlined spaces to indicate fillable areas, like this:

>>>>>>>>>
Use the proper tense of the verb "see".
Yesterday I ________ my old friend.
>>>>>>>>>  

In some places, the underlined spaces occur not in the middle of a sentence but at the end of a paragraph, or they are the only content of the paragraph. For example:

>>>>>>>>>
Nomiate three adjacent countries to Hungary.<end-of-paragraph>
____________<end-of-paragraph>
____________<end-of-paragraph>
____________<end-of-paragraph>
>>>>>>>>>

Out of the subsequent underlined spaces, only the first one is displayed as underlined, if they are the tariling spaces of the paragraph. 
Instead of
____________
I can see only
_           

But if I add any character after the spaces (so that they are not trailing spaces anymore), the interim spaces become underlined. After adding a single "x" to the end, I can see:
____________x

This behaviour is not what I would like to see. The trailing spaces also should show their underline, even for legacy odt files. 

See the attached disappearing_underscores_at_trailing_spaces.odt for example.

Notes:

1.
If I start a new LO document, the behaviour is what I want. This bug appears only with legacy ODT files. 

2. 
The legacy ODT file can be "cured" by changing the MsWordCompTrailingBlanks from true to false in the settigs.xml withing the ODT file. (Rename *.odt to *.zip to access the settings.xml file.)

3.
See the second attachment disappearing_underscores_at_trailing_spaces_fixed.odt to see how it looks after fixing it.

I think there should be a checkbox on the Format -> Character -> Font Effects page:
[_] format trailing spaces too.
Comment 1 csongor 2025-01-30 13:15:06 UTC
Created attachment 198891 [details]
binary fix for the legacy file
Comment 2 csongor 2025-01-30 13:27:49 UTC
Note 4.

I realised there is an option to configure how it should behave:

Tools -> Options -> LibreOffice Writer -> Compatibility -> Word-compatible tariling blanks 

But I have some problems with this:
a) It should not be a general setting. I may need this feature at some places and not at some others. Therefore, this should be possible to set on a case-by-case basis, not at one place for the whole document.
b) I didn't find this setting for a very long time because if I type "trail" in the "Type to search" field of the Tools -> Options dialog, the "Word-compatible tariling blanks" setting doesn't pop up. (Is this a bug in the Options dialog?)
c) I would expect LO to alert me when I open a legacy document, somewhat like this:

Hey, you are opening a legacy ODT file. In the current version of LO, the "Word-compatible tariling blanks" setting works differently from how it worked in the old version of LO you created this file with. 

Or, if LO knows how the old LO version worked, it should set this flag accordingly.
Comment 3 csongor 2025-01-30 13:31:22 UTC
I apollogsie, I copy-pasted a typo several times and I cannot fix my comment. The correct spelling is "Word-compatible trailing blanks"
Comment 4 Mike Kaganski 2025-01-30 13:51:13 UTC

*** This bug has been marked as a duplicate of bug 164487 ***