Bug 37693 - Abnormal Table Rendering
Summary: Abnormal Table Rendering
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.4.0 release
Hardware: Other Windows (All)
: medium major
Assignee: Cédric Bosdonnat
Depends on:
Reported: 2011-05-28 06:59 UTC by Olivier Hallot
Modified: 2011-08-03 01:58 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

File generated by macro in LO 3.3 (23.24 KB, application/vnd.oasis.opendocument.text)
2011-05-28 07:00 UTC, Olivier Hallot
File generated by macro in LO 3.4, shows thick lines (23.32 KB, application/vnd.oasis.opendocument.text)
2011-05-28 07:01 UTC, Olivier Hallot
file with macro (25.46 KB, application/vnd.oasis.opendocument.text)
2011-05-28 14:23 UTC, Olivier Hallot
Table properties indicating abnormal borders (130.73 KB, image/png)
2011-06-08 03:54 UTC, Olivier Hallot
Seeing as its a LineBorder member in TableBorder, we need it like so I reckon (1.89 KB, patch)
2011-07-27 09:06 UTC, Caolán McNamara

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hallot 2011-05-28 06:59:29 UTC
The following two files attached shows an abnormal and breakage of table rendering under LO 3.4 rc2

Both files were generated by a macro.

File 33.odt was generated by LO 3.3.2 and is OK, renders in both LO 3.3 and LO 3.4

File 34.odt was generated under LO3.4-RC2 and is not OK, with black thick lines polluting the file. Under LO3.4 the lines are seen from left to right and under LO3.3 the lines are in-between the columns.
Comment 1 Olivier Hallot 2011-05-28 07:00:34 UTC
Created attachment 47251 [details]
File generated by macro in LO 3.3
Comment 2 Olivier Hallot 2011-05-28 07:01:12 UTC
Created attachment 47252 [details]
File generated by macro in LO 3.4, shows thick lines
Comment 3 Rainer Bielefeld Retired 2011-05-28 08:43:25 UTC
[Reproducible] with "LibreOffice 3.4.0RC2  – WIN7  Home Premium  (64bit) German UI [OOO340m1 (Build:12)]" and reporter's sample documents. 

Only 1 Bug/Report, so here we should handle the table rendering problem.

When I copy paste compete table from 34.odt to an other empty LibO WRITER text document, it loks like in  34.odt. When I paste it to an empty OOo 3.1.1 document, it looks like a normal table with thick vertical borders between the cells. The new document will not look different from OOo 3.1.1 when I open it with LibO 3.4.

Currently we here have a problem "LibO3.4 has more problems with invalid ODF table code than LibO 3.3", so this does not seem to be a blocker until we do not have information that more users might suffer from this problem.

@Olivier Hallot
Can you please file a second report for the problem that Macro table result in LibO3.4 is different from the one in LibO3.3? I think that is the more serious one, and I believe the macro would be useful!

Please feel free to reassign if it's not your area!
Comment 4 Olivier Hallot 2011-05-28 14:23:55 UTC
Created attachment 47258 [details]
file with macro

This is a file with a simplified macro in its Standard library.

The macro adds a table in the header and the footer of all used page styles.

It looks like the issue is intermittent. If you run the macro several times, the issue appears and vanishes, randomly AFAIK.

The issue appears more often if you run the macro step by step.

The original macro was packed as an extension in system area, with access by menus and has dialogs. The original macro does present the issue consistently.
Comment 5 Olivier Hallot 2011-06-07 11:44:53 UTC
(In reply to comment #3)
> When I paste it to an empty OOo 3.1.1
> document, it looks like a normal table with thick vertical borders between the
> cells. 

Yes: If you look at the table properties / borders you will see weird line thickness and dashes in cell inner borders.
Comment 6 Olivier Hallot 2011-06-08 03:54:15 UTC
Created attachment 47712 [details]
Table properties indicating abnormal borders

Table properties screen indicating abnormal borders:

The red lines indicates where it is wrong. Borders are to be invisible.

Border thickness of 9pt is really wrong.

Middle cell border not to exist

Border style messed.
Comment 7 Rainer Bielefeld Retired 2011-06-10 02:57:49 UTC
RC2 is bit by bit identical with release version, so separate items in the version picker are useless. Changes have been discussed with Michael Meeks.
Comment 8 Caolán McNamara 2011-07-27 08:01:01 UTC
in the 3.3 generated doc: fo:padding="0cm" fo:border="none"
in the 3.4 generated doc: fo:border-left="215494.75pt dotted #000000"

i.e. 7602cm, which seems quite whacky indeed. Looks to me that there must be some initial problem under 3.4 with the generation of the document

Can we take it that "run the macro, get tables which work" is a sufficient victory condition. The real bug looks like it appears in generation of the document. i.e. just write-off the rendering of the crazy borders in the existing document, and not create them
Comment 9 Caolán McNamara 2011-07-27 09:05:09 UTC
hmm, TableBorder is a struct that contains LineBorder. Casting it to a LineBorder2 isn't going to give a valid LineBorder. Would need (presumably) to invent a TableBorder2 to transport LineBorder2 collections around.
Comment 10 Caolán McNamara 2011-07-27 09:06:12 UTC
Created attachment 49617 [details]
Seeing as its a LineBorder member in TableBorder, we need it like so I reckon
Comment 11 Caolán McNamara 2011-07-27 09:06:57 UTC
caolanm->dtardon: You poked around this area as well. Agree/Disagree ?
Comment 12 Caolán McNamara 2011-07-28 01:55:15 UTC
committed as http://cgit.freedesktop.org/libreoffice/writer/commit/?id=a7058d28e5d36778b9f16308632ffb4c9608479c

AFAICT if we want BorderLine2's here we need a TableBorder2 to transport them around, and would need hackery like http://cgit.freedesktop.org/libreoffice/libs-core/commit/?id=0d209ac289dd5c79da6950b4c01b0cec9b7fbe6d at a TableBorder/TableBorder2 level to handle old-style and new-style ones.
Comment 13 David Tardon 2011-07-29 00:07:16 UTC
(In reply to comment #11)
> caolanm->dtardon: You poked around this area as well. Agree/Disagree ?

Comment 14 Cor Nouws 2011-08-02 15:01:20 UTC
Is this related to Bug 38542 - FORMATTING TABLE double borders incompatibility with old LibO / OOo Versions
Comment 15 Caolán McNamara 2011-08-03 01:58:18 UTC
fix here doesn't fix that, though it is clearly also a table border issue, so related in that sense.