Bug 157322 - When underlining a paragraph, the line goes beyond the last characters to the right.
Summary: When underlining a paragraph, the line goes beyond the last characters to the...
Status: RESOLVED DUPLICATE of bug 102072
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-19 05:17 UTC by Clark Freeman
Modified: 2024-09-18 12:22 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing how the underlining extends to the right (640.77 KB, image/png)
2023-09-19 05:22 UTC, Clark Freeman
Details
Demo document (17.57 KB, application/vnd.oasis.opendocument.text)
2023-09-23 04:01 UTC, BogdanB
Details
screenshot (55.10 KB, image/png)
2023-09-23 04:03 UTC, BogdanB
Details
Trailing spaces underlined in LO 24.8.0.3 (181.42 KB, image/png)
2024-08-22 13:08 UTC, Clark Freeman
Details
Sample odt file showing the bug (21.90 KB, application/vnd.oasis.opendocument.text)
2024-08-22 13:09 UTC, Clark Freeman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Clark Freeman 2023-09-19 05:17:11 UTC
Description:
Since this last version for me, selecting a paragraph and using control U to underline it results in the underline not ending at the last character of the line but going a bit further, like if it would underline spaces at the end also. But the excess underlining is not consistent, it varies from line to line.

Steps to Reproduce:
1.Load a document in LibreOffice Writer
2.Select all
3.Underline all for instance with Control U.

Actual Results:
The underlining extends beyond the last character of the line, sometimes into the right margin.

Expected Results:
It should just underline the last character of the line and no more, no less.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 1 Clark Freeman 2023-09-19 05:22:23 UTC
Created attachment 189689 [details]
Screenshot showing how the underlining extends to the right
Comment 2 m_a_riosv 2023-09-19 22:05:53 UTC
Please attach a sample file.
Comment 3 V Stuart Foote 2023-09-21 00:24:06 UTC
Simply remove any 'space' characters used as formatting. They're considered valid text content and will extend underlining (and other character based font affects) when used.

The <Ctrl>+<F10> "Show formatting marks" will expose any dangling spaces (though just three beyond the right margin).  Our handling of excessive spaces is open as see also bug 155494 where I favor auto-truncation.  

But manual truncation should resolve your underlining issues.
Comment 4 BogdanB 2023-09-21 03:29:24 UTC

*** This bug has been marked as a duplicate of bug 156681 ***
Comment 5 V Stuart Foote 2023-09-21 11:34:19 UTC
(In reply to BogdanB from comment #4)
> 
> *** This bug has been marked as a duplicate of bug 156681 ***

Not clear that is the case. OPs screen shot shows a multi-sentence paragraph (F3 'lorem') with underlining applied (and Ctl+F10 NPCs showing). 

As each line wraps at margin, its single trailing space is underlined.  

Add additional spaces (before the next printing character) and the underline of spaces will extend further--stopping at the margin even though the spaces keep appending.  

So the underline of a single space is kind of expected--it tracks with the wordwrap of the paragraph style and this is really NAB; but handling of the excess spaces is bug 15594
Comment 6 BogdanB 2023-09-23 04:01:11 UTC
(In reply to V Stuart Foote from comment #5)
> (In reply to BogdanB from comment #4)
> > 
> > *** This bug has been marked as a duplicate of bug 156681 ***
> 
> Not clear that is the case. OPs screen shot shows a multi-sentence paragraph
> (F3 'lorem') with underlining applied (and Ctl+F10 NPCs showing). 
> 
> As each line wraps at margin, its single trailing space is underlined.  
> 
> Add additional spaces (before the next printing character) and the underline
> of spaces will extend further--stopping at the margin even though the spaces
> keep appending.  
> 
> So the underline of a single space is kind of expected--it tracks with the
> wordwrap of the paragraph style and this is really NAB; but handling of the
> excess spaces is bug 15594

Indeed, it's not a duplicate. It's similar, but different.

Clark reported: "But the excess underlining is not consistent, it varies from line to line." -> I don't agree here. Where it is a space after each word there is a space underline on the end of the line. On the last line of a paragraph there is no more space, so no more underline. This is the case for left align text. For justify I see no problem.

I have attached a demo document and a screenshot.
Comment 7 BogdanB 2023-09-23 04:01:55 UTC
Created attachment 189765 [details]
Demo document
Comment 8 BogdanB 2023-09-23 04:03:42 UTC
Created attachment 189766 [details]
screenshot
Comment 9 raal 2023-09-25 21:52:54 UTC
No repro with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0c4913e03e8427a576138601958f2dbf13b8c37b
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

@Clark, please attach test file.
Comment 10 QA Administrators 2024-03-24 03:14:59 UTC Comment hidden (obsolete)
Comment 11 Tex2002ans 2024-03-24 18:10:15 UTC
I agree with comment 4. This is a dupe of bug 156681.

- - -

The underlines were inconsistent—and could have been shorter/just-right/longer—and were completely dependent on the zoom level. (See my screenshot in attachment 188957 [details].)

It was much easier to see at the end of lines, like this report, but it happened everywhere underline was used. (See the other topics I linked to in bug 156681 comment 9.)

- - -

156681 was fixed in 7.6.1... and this bug report landed right in 7.6.0 which still had it.
Comment 12 Clark Freeman 2024-08-22 13:06:25 UTC
The bug is still there as of LO:

Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 0bdf1299c94fe897b119f97f3c613e9dca6be583
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Trailing spaces in left justified text are still underlined.

In the earlier report I had noticed underlined marks extending even further, past the margins (see the first screenshot), but I don't have the file nor the same setting to duplicate this again right now.

I am going to attach a new file as sample, but it is pretty straightforward to test. I'll reattach a recent screenshot as well.
Comment 13 Clark Freeman 2024-08-22 13:08:40 UTC
Created attachment 195955 [details]
Trailing spaces underlined in LO 24.8.0.3
Comment 14 Clark Freeman 2024-08-22 13:09:29 UTC
Created attachment 195957 [details]
Sample odt file showing the bug
Comment 15 Buovjaga 2024-09-18 12:22:01 UTC

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