Bug 152839 - FILEOPEN RTF Border lines appear incorrectly in table
Summary: FILEOPEN RTF Border lines appear incorrectly in table
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTF-Tables
  Show dependency treegraph
 
Reported: 2023-01-02 14:11 UTC by Gabor Kelemen (allotropia)
Modified: 2023-11-29 13:19 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word 2016 (deleted)
2023-01-02 14:11 UTC, Gabor Kelemen (allotropia)
Details
The example file in Word 2016 and Writer (99.72 KB, image/png)
2023-01-02 14:12 UTC, Gabor Kelemen (allotropia)
Details
Same file as docx, for reference (18.24 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-01-02 14:22 UTC, Gabor Kelemen (allotropia)
Details
Minimized RTF sample (165 bytes, application/msword)
2023-01-13 08:43 UTC, Vasily Melenchuk (CIB)
Details
Updated example file (50.23 KB, application/rtf)
2023-11-28 13:47 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) 2023-01-02 14:11:50 UTC
Created attachment 184443 [details]
Example file from Word 2016

Attached example file contains a table with different number of columns in rows.
In Word the second rows second and third cells have their top border turned off, but in Writer this is visible.

1. Open attached file
2. Notice the cell starting with 2 and the empty one right of it has top border, unlike in Word.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 44355a90b3450111ad87ad4b6607a564e41d7b54
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (hu_HU); UI: en-US
Calc: threaded

and all the way back to 3.6. In 3.5 there was no border imported at all.

If the same example is saved to docx, it had the same import issue fixed in 5.3 times with:

https://git.libreoffice.org/core/+/1d1748d143ab4270a2ca1b5117852b1b1bb4c

author	Miklos Vajna <vmiklos@collabora.co.uk>	Tue Aug 30 09:14:47 2016 +0200
committer	Miklos Vajna <vmiklos@collabora.co.uk>	Tue Aug 30 08:40:30 2016 +0000

Related: tdf#44986 DOCX import: handle w:gridAfter by faking cells
Comment 1 Gabor Kelemen (allotropia) 2023-01-02 14:12:22 UTC
Created attachment 184444 [details]
The example file in Word 2016 and Writer
Comment 2 Gabor Kelemen (allotropia) 2023-01-02 14:22:33 UTC
Created attachment 184449 [details]
Same file as docx, for reference
Comment 3 raal 2023-01-03 16:43:29 UTC
Confirm with Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d993327eab0a2c9c8820c6528075b01de68b0ec6
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 4 Vasily Melenchuk (CIB) 2023-01-13 08:43:26 UTC
Created attachment 184627 [details]
Minimized RTF sample

I've stripped down testcase to minimal for problem to became clear.

As far I see, there is problem with non-rectangular tables:
* first row contains only one cell and border below
* second row contains 2 cells
* in Writer first row is extended to fit entire table width unlike in Word.

I see that for DOCX Writer does creates extra cells in first row to make rectangular table. But it is not done for RTF.
Comment 5 Gabor Kelemen (allotropia) 2023-11-28 13:47:29 UTC
Created attachment 191084 [details]
Updated example file
Comment 6 Xisco Faulí 2023-11-29 13:19:55 UTC
The content of attachment 184443 [details] has been deleted for the following reason:

User's request