Bug 166953 - RTF import: table wrong after few saves
Summary: RTF import: table wrong after few saves
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Michael Stahl
URL:
Whiteboard: target:26.2.0 target:25.8.1
Keywords: bibisected, bisected, filter:rtf, regression
Depends on:
Blocks: RTF-Tables
  Show dependency treegraph
 
Reported: 2025-06-11 14:34 UTC by Timur
Modified: 2025-08-12 14:32 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
RTF 10 pages (289.96 KB, text/rtf)
2025-06-11 14:34 UTC, Timur
Details
RTF saved has wrong table so 13 pages (289.41 KB, text/rtf)
2025-06-11 14:50 UTC, Timur
Details
RTF 2 pages (145.63 KB, text/rtf)
2025-06-12 12:38 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2025-06-11 14:34:26 UTC
Created attachment 201206 [details]
RTF 10 pages

Open attached 10 pages RTF and see mixed orientation (bug 166879) and table. 
Save and reload 3 times. 
Table does not look good in LO. Interestingly, it still looks good in MSO.
Comment 1 Timur 2025-06-11 14:50:03 UTC
Created attachment 201207 [details]
RTF saved has wrong table so 13 pages
Comment 2 Timur 2025-06-12 12:38:28 UTC
Created attachment 201225 [details]
RTF 2 pages

Here is smaller sample with 2 pages. With 1 page, it is already wrong on open, so I put this one with 2 so that initial open shows correct table.
Comment 3 Timur 2025-06-12 12:41:23 UTC
Turns out this is regression in 25.2:
commit 038473595ed266d15a788d8f97781cbaf066cfe7	[log]
author	Oliver Specht <oliver.specht@cib.de>	Wed Oct 02 14:48:08 2024 +0200
committer	Gabor Kelemen <gabor.kelemen.extern@allotropia.de>	Fri Oct 11 19:07:49 2024 +0200
tdf#152839 add fill cells to tables imported wrongly from RTF

Note that while I saved in GUI 3 times to spot the bug, with headless just 2 saves seems to enough.
Comment 5 Commit Notification 2025-07-23 15:19:54 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#166953 writerfilter: add column width when adding extra cell

It will be available in 26.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 Michael Stahl 2025-07-23 15:20:56 UTC
fixed on master - the problem is really in the RTF import, Word shows the file much better
Comment 7 Commit Notification 2025-08-12 14:32:13 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

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

tdf#166953 writerfilter: add column width when adding extra cell

It will be available in 25.8.1.

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.