Bug 152865

Summary: FILEOPEN RTF Paragraph below frame wrapped differently than in Word
Product: LibreOffice Reporter: Gabor Kelemen (allotropia) <kelemeng>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: dgp-mail, ilmari.lauhakangas
Priority: medium Keywords: filter:rtf
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=158690
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 113423    
Attachments: Example document from Word 2016
The example file in Word 2016 and Writer with the header frame settings
The example file saved to docx in Word, for reference
The example file saved as docx in Word 2016 and in Writer - good
Updated example file

Description Gabor Kelemen (allotropia) 2023-01-03 23:34:34 UTC
Created attachment 184466 [details]
Example document from Word 2016

Attached RTF document contains a paragraph on the second page, centered and just long enough to be broken into two lines in Word. Also there is a frame with page numbering in the header which somehow affects this behavior - removing the frame makes the "Achtung" text fit in one line.
In Writer the document import is incorrect and the paragraph text is not broken into two lines.

1. Open attached document
2. Notice the "Achtung" text is one line, not two like in Word.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 44355a90b3450111ad87ad4b6607a564e41d7b54
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (hu_HU); UI: en-US
Calc: threaded

and all the way back to 3.5 - this was never good.

If the same file is saved to DOCX in Word, it had the same layout issue until 7.0 with:

https://git.libreoffice.org/core/+/c12358166a9bd88fe10feabca45a6ad3f65dff8e%5E%21/#F2

author	Miklos Vajna <vmiklos@collabora.com>	Fri Jan 10 16:03:43 2020 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	Fri Jan 10 17:20:23 2020 +0100

DOCX import: fix lost objects anchored to an empty linked header

Which smells like sort of a red herring here, since it's not really specific to the docx import filter.

Side note: the wrapping setting of the frame is not the same in RTF and DOCX, this may or may not be relevant - manually changing it does not help though.
Comment 1 Gabor Kelemen (allotropia) 2023-01-03 23:35:59 UTC
Created attachment 184467 [details]
The example file in Word 2016 and Writer with the header frame settings
Comment 2 Gabor Kelemen (allotropia) 2023-01-03 23:37:08 UTC
Created attachment 184468 [details]
The example file saved to docx in Word, for reference
Comment 3 Gabor Kelemen (allotropia) 2023-01-03 23:50:34 UTC
Created attachment 184469 [details]
The example file saved as docx in Word 2016 and in Writer - good
Comment 4 Dieter 2023-02-01 07:01:45 UTC
I confirm it with

Version: 7.5.0.2 (X86_64) / LibreOffice Community
Build ID: c0dd1bc3f1a385d110b88e26ece634da94921f58
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded
Comment 5 Buovjaga 2023-03-23 08:06:59 UTC
I also confirm

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6dfa9c7c0db91a71f3787226636864161d5367ca
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 23 March 2023
Comment 6 Gabor Kelemen (allotropia) 2023-11-28 13:51:23 UTC
Created attachment 191086 [details]
Updated example file
Comment 7 Xisco FaulĂ­ 2023-11-29 13:20:14 UTC
The content of attachment 184466 [details] has been deleted for the following reason:

User's request