Bug 148540 - FILEOPEN RTF Paragraph style extends to more table cells in a row
Summary: FILEOPEN RTF Paragraph style extends to more table cells in a row
Status: VERIFIED FIXED
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: target:24.2.0
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: RTF-Tables
  Show dependency treegraph
 
Reported: 2022-04-12 16:00 UTC by Gabor Kelemen (allotropia)
Modified: 2023-12-29 10:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word 2013 (80.30 KB, application/msword)
2022-04-12 16:00 UTC, Gabor Kelemen (allotropia)
Details
The example file in Word and Writer master (115.56 KB, image/png)
2022-04-12 16:02 UTC, Gabor Kelemen (allotropia)
Details
The example file in Word and current master (49.03 KB, image/png)
2023-12-22 09:07 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-12 16:00:09 UTC
Created attachment 179489 [details]
Example file from Word 2013

Attached RTF document contains a table which has a 3pt character spacing set by paragraph style ("Formularüberschrift") for its first cell in its row.

Other cells have the "Normal" paragraph style which does not have any defined character spacing.
When opening the file in Writer the first cells paragraph style setting escapes to the other two table cells, making the last ones content not fit in the cells anymore.

1, Open attached document in Word and Writer
2, Observe that in Word the first tables first cell ("III...") has "Formularüberschrift" style which has a 3pt Character spacing set. The middle and right cells have the "Normal" paragraph style.
3, In Writer the "Formularüberschrift" paragraph style setting is applied to the middle and last cell ("Ffff...11"), making the content not fit in the cell.

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 6f39602ecb9b90795bfd4101273f90b16f17b6d6
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

Started in 6.0, in 5.4 this was good.

Bibisected on Windows to the range
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=b6e32d53ce9c98bfba517c40f53d40e97a091b0e..a0abb2f6a4e2392ce44634a58f3a5d1af1868499

of which, this commit looks most suspicious:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=aaa6a5202a447fb4e86d5f016d8e79fbc34a3ed7

author	Miklos Vajna <vmiklos@collabora.co.uk>	2017-07-31 22:43:51 +0200
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2017-08-01 10:12:29 +0200
commit aaa6a5202a447fb4e86d5f016d8e79fbc34a3ed7 (patch)

tdf#cccRTF import: keep remembering paragraph style between \cell and \row

Adding CC to: Miklos Vajna
Comment 1 Gabor Kelemen (allotropia) 2022-04-12 16:02:35 UTC
Created attachment 179490 [details]
The example file in Word and Writer master
Comment 2 Gabor Kelemen (allotropia) 2022-04-12 16:03:52 UTC
> tdf#cccRTF import: keep remembering paragraph style between \cell and \row
> 
Oops, correctly:

tdf#109790 RTF import: keep remembering paragraph style between \cell and \row
Comment 3 Dieter 2022-04-26 04:18:30 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

in comparison with Word 2016
Comment 4 Miklos Vajna 2023-10-16 07:21:10 UTC
The timeline I see:

- cbe79789a0fc9b80b2fd14a5abfe0973a2cb69dc (tdf#86814 RTF import: fix sometimes lost bold style, 2015-05-18): this "started to work"
- aaa6a5202a447fb4e86d5f016d8e79fbc34a3ed7 (tdf#109790 RTF import: keep remembering paragraph style between \cell and \row, 2017-07-31): previous fix was problematic, had to revert it partially

So I think this never really worked properly, adjusting keywords accordingly.
Comment 5 Commit Notification 2023-12-05 07:50:13 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b63a12d481cd26f960f97f74e5a4d764966db338

tdf#148540 Revert "tdf#109790 RTF import: keep remembering...

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Gabor Kelemen (allotropia) 2023-12-22 09:07:28 UTC
Created attachment 191561 [details]
The example file in Word and current master

Looks good in

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2eb428a8890dda29fbdc8b639fc1377080fab59f
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

Thanks Justin!
Comment 7 Dieter 2023-12-29 10:04:17 UTC
(In reply to Gabor Kelemen (allotropia) from comment #6)
> Created attachment 191561 [details]
> The example file in Word and current master
> 
> Looks good in
> 
> Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 2eb428a8890dda29fbdc8b639fc1377080fab59f
> CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL:
> win
> Locale: hu-HU (hu_HU); UI: en-US
> Calc: threaded
> 
> Thanks Justin!

=> VERIFIED FIXED