Bug 163686 - FILEOPEN RTF Row height is determined by deleted cells font size
Summary: FILEOPEN RTF Row height is determined by deleted cells font size
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks: RTF-Tables
  Show dependency treegraph
 
Reported: 2024-10-30 12:27 UTC by Gabor Kelemen (allotropia)
Modified: 2024-11-19 09:07 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word 2016 with table and deleted cells (49.01 KB, application/msword)
2024-10-30 12:27 UTC, Gabor Kelemen (allotropia)
Details
The example file in Word 2016 and Writer master (124.43 KB, image/png)
2024-10-30 12:28 UTC, Gabor Kelemen (allotropia)
Details
The example file saved as docx by Word 2016 (11.72 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-10-30 12:43 UTC, Gabor Kelemen (allotropia)
Details
The docx version of the example file in Word and Writer (76.02 KB, image/png)
2024-10-30 12:46 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) 2024-10-30 12:27:36 UTC
Created attachment 197300 [details]
Example file from Word 2016 with table and deleted cells

Attached RTF example file has two rows with deleted cells.

The first row had a 20 pt font size set before deleting the B1 cell, this setting is retained.
When opening the file in Writer, this 20 pt is used to determine the row height, which is incorrectly large compared to Word.

Similarly the third row has a 6 pt font size set in the C1 cell, but the default formatting (Normal style, 11 pt font, 1.08 line spacing) used on the deleted C2 determines the row height, unlike in Word.

1. Open attached file
-> First and third rows are taller than in Word.

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: dd41459378bca78a18f32e61bfac77aa48fabb8d
CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default

Seems to have started in 5.3 with:

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

author	Miklos Vajna <vmiklos@collabora.co.uk>	2016-09-06 08:16:37 +0200
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2016-09-06 12:13:48 +0000
commit 0f2d5db38bac64b665c6e4a127bbbd63a7ed9af5 (patch)

tdf#44986 RTF import: handle \trwWidthA by faking cells
Comment 1 Gabor Kelemen (allotropia) 2024-10-30 12:28:32 UTC
Created attachment 197301 [details]
The example file in Word 2016 and Writer master
Comment 2 Gabor Kelemen (allotropia) 2024-10-30 12:43:27 UTC
Created attachment 197302 [details]
The example file saved as docx by Word 2016

The same thing seems to work if the original is saved as docx file in Word and opened.
Comment 3 Gabor Kelemen (allotropia) 2024-10-30 12:46:13 UTC
Created attachment 197303 [details]
The docx version of the example file in Word and Writer
Comment 4 Gabor Kelemen (allotropia) 2024-10-30 13:46:55 UTC
(In reply to Gabor Kelemen (allotropia) from comment #2)
> Created attachment 197302 [details]
> The example file saved as docx by Word 2016
> 
> The same thing seems to work if the original is saved as docx file in Word
> and opened.

Still not perfect in docx, the third row is not as small as it should be. Sigh.
Comment 5 m_a_riosv 2024-10-30 23:25:11 UTC
Repro
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fc2e8daa4bdcac9ce79400269baee8e3d59f9e3d
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 6 Oliver Specht (CIB) 2024-11-19 09:07:42 UTC
In addition to the font size all paragraphs in the table have a line spacing of 108% which also results in increased row height.