Bug 148517 - FILESAVE RTF Paragraph with before-after spacing set with DF gets its spacing reset to Auto
Summary: FILESAVE RTF Paragraph with before-after spacing set with DF gets its spacing...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: RTF-Paragraph
  Show dependency treegraph
 
Reported: 2022-04-11 14:29 UTC by Gabor Kelemen (allotropia)
Modified: 2023-11-29 13:18 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word 2013 (deleted)
2022-04-11 14:29 UTC, Gabor Kelemen (allotropia)
Details
The example file saved by Writer master (14.67 KB, application/msword)
2022-04-11 14:30 UTC, Gabor Kelemen (allotropia)
Details
The original and exported files in Word 2013 (174.33 KB, image/png)
2022-04-11 14:31 UTC, Gabor Kelemen (allotropia)
Details
Updated example file (82.72 KB, application/rtf)
2023-11-28 13:19 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
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