Bug 142533 - Hyphens appear in wrong places in an English test sample when using manual hyphenation
Summary: Hyphens appear in wrong places in an English test sample when using manual hy...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-28 06:36 UTC by Panos Stokas
Modified: 2022-12-06 10:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Shows the rogue hyphen (65.71 KB, image/png)
2021-05-28 06:38 UTC, Panos Stokas
Details
odt sample of the rogue hyphen in manual hyphenation (13.06 KB, application/vnd.oasis.opendocument.text)
2021-06-02 19:09 UTC, Panos Stokas
Details
Sample file with the normal hyphen instead a hard hyphen. (13.05 KB, application/vnd.oasis.opendocument.text)
2021-06-02 23:58 UTC, m_a_riosv
Details
Result of running Hyphenation tool myself, shows proper hyphenation (15.88 KB, image/png)
2021-06-05 13:18 UTC, Michael Warner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Panos Stokas 2021-05-28 06:36:36 UTC
Description:
While testing something else, I've realized that a specific English sample text produces some strange hyphens in the interior body of the document. The issue appears in Openoffice too, so it must be pretty old. The issue is pretty minor, but it might help spot a bug.

Here is the sample (I'll upload it as a text file if Bugzilla truncates the white space):


aaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaa aaaaa aaaaaaaa               aaaa aaaa   aaaa creation of documents is not by best. aaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaa  a aaaaa aaaaaaaa               aaaa aaaaaaaaaa creation of documents is not by best.aaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaa aaaaa aaaaaaaa               aaaa aaaaaaaaaa creation of documents is not by best.aaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaa aaaaa aaaaaaaa               aaaa aaaaaaaaaa creation of documents is not by best.aaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaa aaaaa aaaaaaaa               aaaa aaaaaaaaaa creation of documents is not by best.

Steps to Reproduce:
1. Use standard A4 borders
2. Paste the unformatted text to Libreoffice Writer
3. Tools > Language > Hyphenation > Hyphenate All

Actual Results:
Notice the first word "docu-­ments" as it appears in the last line. I'll be including a screenshot.

Expected Results:
Hyphens should only appear at the right edge of the document.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
I haven't seen this issue in normal documents really.
Comment 1 Panos Stokas 2021-05-28 06:38:59 UTC
Created attachment 172397 [details]
Shows the rogue hyphen
Comment 2 m_a_riosv 2021-05-28 07:06:48 UTC
Please attach the sample file, in this case it's necessary to test the issue.
Comment 3 Panos Stokas 2021-06-02 19:09:26 UTC
Created attachment 172582 [details]
odt sample of the rogue hyphen in manual hyphenation
Comment 4 m_a_riosv 2021-06-02 23:58:47 UTC
Created attachment 172583 [details]
Sample file with the normal hyphen instead a hard hyphen.

Manual spaces don't help, and the hyphen it's a hard hyphen, that it's just to keep two words together, what happens here. Mwnu/View/

Delete the extra spaces and replace that hyphen with a normal hyphen (minus)

No bug here.
Comment 5 Panos Stokas 2021-06-05 06:25:25 UTC
The purpose of my report is to report a bug, not find a workaround. The sample document is intended for reproducing the bug.

Removing the spaces will no longer serve this purpose.

There was no hard hyphen on my sample.

I'm requesting a 2nd review from another reviewer.
Comment 6 m_a_riosv 2021-06-05 10:59:45 UTC
Your sample has a hard-hypen.
Comment 7 Michael Warner 2021-06-05 13:17:08 UTC
Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 452bf1359dab3cfab9fd6007d68592e9c96382b3
CPU threads: 12; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-04_18:12:48
Calc: threaded

I'm able to see the hyphen in the unexpected place in attachment 172582 [details], where it looks like it inserted the hyphen but kept the word together. However, it only appears if I am in Edit Mode. If I change to read-only by deselecting Edit->Edit Mode, the hyphen disappears; if I change back to Edit Mode, the hyphen reappears. 

If I do the following:
1. Create a new Writer document
2. Set page size to A4
3. Paste in the text from Comment 0
4. Edit it to get the "documents" word near the end of the line
5. Run Tools->Language->Hyphenation... 

It wraps the word "documents" across two lines with the hyphen between the u and m as expected (see attachment).
Comment 8 Michael Warner 2021-06-05 13:18:16 UTC
Created attachment 172642 [details]
Result of running Hyphenation tool myself, shows proper hyphenation
Comment 9 Panos Stokas 2021-06-06 22:21:15 UTC
@Michael Warner the formatting of this HTML has been retained on the document you have created. It's using a monospaced font. As such, the circumstances has changed and the bug isn't present.

As I've pointed in my original report, it's a specific sample that produces the bug. Paper has to be set to A4 using standard borders, and the text must be pasted unformatted.
Comment 10 Panos Stokas 2022-12-06 07:45:20 UTC
The bug is no longer present in 7.3.7.2. The improper hyphen is still created (you can see it the XML source) but it's not shown and can be cleaned up automatically.

Thanks to whoever fixed it.