Bug 148517

Summary: FILESAVE RTF Paragraph with before-after spacing set with DF gets its spacing reset to Auto
Product: LibreOffice Reporter: Gabor Kelemen (allotropia) <kelemeng>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: aron.budea, dgp-mail, telesto, vmiklos
Priority: medium Keywords: bibisected, bisected, implementationError
Version: 6.0.0.3 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=107480
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 113340    
Attachments: Example file from Word 2013
The example file saved by Writer master
The original and exported files in Word 2013
Updated example file

Description Gabor Kelemen (allotropia) 2022-04-11 14:29:56 UTC
Created attachment 179466 [details]
Example file from Word 2013

Attached example file contains a paragraph with 48 pt (1.69 cm) before and 0 pt after spacing, which is set by direct formatting.
This is opened correctly in Writer, but saving sets these values to both "Auto" (0.49 cm), changing the layout.
Word reports that the original DF of 48 pt is saved as "Auto", while the 0 pt setting is not saved at all, so the Style-level "Auto" value is applied.

1, Open attached file
2, Save as RTF, reload in either Writer or Word
3. The paragraph "just some formatted text" has changed its "large" 1.69 cm spacing before to a "medium" 0.49 cm before and after spacing ("Auto" when opened in Word).

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: cf4d5ed026c8799a70432a832a8a707c2e316216
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded Jumbo

This was good in 5.4, broke in 6.0 with:

https://git.libreoffice.org/core/+/9dd82d0d68065ab95e20a1a489f4130299a8669e

author	Miklos Vajna <vmiklos@collabora.co.uk>	Tue Aug 15 22:34:13 2017 +0200
committer	Miklos Vajna <vmiklos@collabora.co.uk>	Wed Aug 16 08:14:27 2017 +0200

tdf#107480 RTF import: fix HTML automatic spacing in styles

Adding CC to: Miklos Vajna
Comment 1 Gabor Kelemen (allotropia) 2022-04-11 14:30:27 UTC
Created attachment 179467 [details]
The example file saved by Writer master
Comment 2 Gabor Kelemen (allotropia) 2022-04-11 14:31:00 UTC
Created attachment 179468 [details]
The original and exported files in Word 2013
Comment 3 Dieter 2022-04-26 04:05:21 UTC
I confirm it with

Version: 7.3.3.1 (x64) / LibreOffice Community
Build ID: 1688991ca59a3ca1c74bc2176b274fba1b034928
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
Comment 4 Miklos Vajna 2023-10-16 07:24:32 UTC
The timeline I see:

- this "started to work" with 291c9122b23ce7aa619e828b895b08dcd21bf025 (tdf#104081 RTF import: handle \htmautsp, 2017-02-21)
- then this had to be partially reverted in 9dd82d0d68065ab95e20a1a489f4130299a8669e (tdf#107480 RTF import: fix HTML automatic spacing in styles, 2017-08-15)

So this never really worked, I think. Adjusting keywords accordingly.
Comment 5 Gabor Kelemen (allotropia) 2023-11-28 13:19:53 UTC
Created attachment 191081 [details]
Updated example file
Comment 6 Xisco FaulĂ­ 2023-11-29 13:18:48 UTC
The content of attachment 179466 [details] has been deleted for the following reason:

User's request