Bug 162173 - Writer incorrectly displays justified text in docx (2010-365) files with non-breakable spaces
Summary: Writer incorrectly displays justified text in docx (2010-365) files with non-...
Status: RESOLVED DUPLICATE of bug 163060
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.5.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2024-07-24 12:54 UTC by Pavel Hok
Modified: 2024-09-25 21:45 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
File with issue - docx (2010-365) (467.31 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-07-24 12:54 UTC, Pavel Hok
Details
File with issue - saved as odt (441.30 KB, application/vnd.oasis.opendocument.text)
2024-07-24 12:55 UTC, Pavel Hok
Details
Corrected file - saved as Word 2007 docx (467.28 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-07-24 12:55 UTC, Pavel Hok
Details
Screenshot of text (14.72 KB, image/png)
2024-08-16 09:36 UTC, Pavel Hok
Details
sample document (14.97 KB, application/vnd.oasis.opendocument.text)
2024-08-17 10:27 UTC, Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Hok 2024-07-24 12:54:09 UTC
Description:
When using docx files (Word 2010-365 version) created in LO (due to journal policy accepting only docx files) containing paragraphs with justified alignment and non-breakable spaces, some (apparently random) characters are displayed outside the paragraph margin or words are split incorrectly (without hyphen while word splitting is disabled). The wrong appearance is preserved when saving as odt, but is fixed when saving as docx (Word 2007) and then re-opened, as suggested here https://www.reddit.com/r/libreoffice/comments/1crpj9a/writer_242_new_issues_with_justified_text/?rdt=51105

Steps to Reproduce:
1. Open the attached file Bug_report.docx.
2. Optionally - delete the non-breakable space on the first line of the paragraph and re-insert it to reproduce the bug.
3. Optionally replace spaces with non-breakable spaces before and after "analysis" on the second line to reproduce the same behaviour.

Actual Results:
The first line of the paragraph ends with "a p". The space is a non-breakable space, the "p" is part of a word that has been incorrectly split.

Expected Results:
The two words "a published" should be moved to a next line after replacing the 


Reproducible: Sometimes


User Profile Reset: No

Additional Info:
The behaviour seems somewhat random, inserting non-breakable space at different places not always reproduces the bug. However, once problem appears, it can be consistently reproduced by deleting and re-inserting the non-breakable space. Sometimes, words are not split but some characters appear outside the paragraph margin. Exporting to PDF or saving as ODT does not change appearance. Saving as DOCX with Word 2007 compatibility solves the issue. Saving the same (corrected) document as 2010-365 docx does not reproduce the issue.
Comment 1 Pavel Hok 2024-07-24 12:54:43 UTC
Created attachment 195470 [details]
File with issue - docx (2010-365)
Comment 2 Pavel Hok 2024-07-24 12:55:07 UTC
Created attachment 195471 [details]
File with issue - saved as odt
Comment 3 Pavel Hok 2024-07-24 12:55:31 UTC
Created attachment 195472 [details]
Corrected file - saved as Word 2007 docx
Comment 4 Dieter 2024-08-16 08:02:46 UTC
Pavel, thank you for reporting the bug. I can't see nonbreakable spaces in attachment 195471 [details], so a assume this is not the original odt file.
Please add original odt file with nonbreakable spaces. thank you.
=> NEEDINFO
Comment 5 Pavel Hok 2024-08-16 09:36:05 UTC
Created attachment 195854 [details]
Screenshot of text
Comment 6 Pavel Hok 2024-08-16 09:36:14 UTC
There is a non-breakable space on the first line of the second paragraph (including headings), see the screenshot.
Comment 7 Dieter 2024-08-17 10:27:06 UTC
Created attachment 195875 [details]
sample document

I confirm it with

Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 0bdf1299c94fe897b119f97f3c613e9dca6be583
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL threaded

Steps to reproduce:
1. Open attached file. Line two of the paragraph start with a nonbreaking space "a published"
2. Save as docx and reload

Actual result
Break within the word "published"

Expected result
No change
Comment 8 László Németh 2024-09-25 21:45:40 UTC
The problem solved in Bug 163060.

@Pavel Hok: many thanks for the bug report!

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