Bug 38542 - FORMATTING TABLE double borders incompatibility with old LibO / OOo Versions
Summary: FORMATTING TABLE double borders incompatibility with old LibO / OOo Versions
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.0 release
Hardware: x86-64 (AMD64) All
: highest critical
Assignee: Cédric Bosdonnat
URL:
Whiteboard: target:3.4.6 target:3.5.0.3 target:3....
Keywords: regression
: 42570 44708 (view as bug list)
Depends on:
Blocks: mab3.4 44768
  Show dependency treegraph
 
Reported: 2011-06-21 15:35 UTC by Steve Kelem
Modified: 2012-05-23 03:40 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
180% screenshot of table rules in 3.3.2 (7.64 KB, image/png)
2011-06-21 15:35 UTC, Steve Kelem
Details
180% screenshot of table rules in 3.3.4 (9.69 KB, image/png)
2011-06-21 15:35 UTC, Steve Kelem
Details
table with 3pt double rules that don't display properly in 3.4 (9.17 KB, application/vnd.oasis.opendocument.text)
2011-06-28 00:12 UTC, Steve Kelem
Details
Test kit, see Comment 7 (142.43 KB, application/x-zip-compressed)
2011-07-19 23:02 UTC, Rainer Bielefeld Retired
Details
doc viewed in LO ver 3.3 (32.63 KB, application/pdf)
2012-01-07 12:08 UTC, Greg Madden
Details
doc viewed in LO ver 3.4 & greater (32.24 KB, application/pdf)
2012-01-07 12:08 UTC, Greg Madden
Details
document containing table with single line borders (14.63 KB, application/vnd.oasis.opendocument.text)
2012-01-11 09:10 UTC, Martin Whitaker
Details
document viewed in OOo 3.3.0 (55.21 KB, image/png)
2012-01-11 09:12 UTC, Martin Whitaker
Details
document viewed in LO 3.5.0 beta (57.67 KB, image/png)
2012-01-11 09:14 UTC, Martin Whitaker
Details
put "double" cell borders on a diet (1.06 KB, patch)
2012-01-25 09:03 UTC, Michael Stahl (allotropia)
Details
prevents wrong overriding of the style:border-line-width attributes (2.48 KB, patch)
2012-01-25 09:05 UTC, Michael Stahl (allotropia)
Details
add a custom double border style (2.47 KB, patch)
2012-01-25 13:48 UTC, Michael Stahl (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Kelem 2011-06-21 15:35:03 UTC
Created attachment 48258 [details]
180% screenshot of table rules in 3.3.2

I have a document with hundreds of tables.  I designed the table rules with the corporate style.  I've attached a screenshot of one of the tables, before and after 3.3.4.

When I loaded the file into LibreOffice 3.3.4, the table rules exploded, as shown in the second attachment.  (Both attachments are taken with the document at 180%.)

Here's how the upper-left corner cell is defined in the odt/content.xml file:
style:border-line-width-left="0.0139in 0.0139in 0.0139in" style:border-line-width-top="0.0139in 0.0139in 0.0139in" fo:padding="0.0201in" fo:border-left="0.0417in double #0000ff" fo:border-right="none" fo:border-top="0.0417in double #0000ff" fo:border-bottom="0.0007in solid #0000ff"

Here's how is looks in 3.3.4:
style:border-line-width-left="0.0417in 0.0417in 0.0417in" style:border-line-width-top="0.0417in 0.0417in 0.0417in" fo:padding="0.0201in" fo:border-left="3pt double #0000ff" fo:border-right="none" fo:border-top="3pt double #0000ff" fo:border-bottom="0.05pt solid #0000ff"

As you can see, the border-line-width-left and top are getting tripled!

(B.T.W. 0.0139in = 1pt; 0.0417in = 3pt)
Comment 1 Steve Kelem 2011-06-21 15:35:44 UTC
Created attachment 48259 [details]
180% screenshot of table rules in 3.3.4
Comment 2 Steve Kelem 2011-06-27 14:34:46 UTC
Yo, anyone home?
Comment 3 Steve Kelem 2011-06-28 00:12:46 UTC
Created attachment 48504 [details]
table with 3pt double rules that don't display properly in 3.4
Comment 4 Steve Kelem 2011-06-28 00:13:23 UTC
More on this one.  LibreOffice 3.3.3 and 3.4 display the same table rules radically differently for the same file (attached).  3.3.3 draws the lines correctly.  3.4 draws the lines way too fat, which obscures part of the content.
Comment 5 Steve Kelem 2011-07-19 16:48:05 UTC
Still a problem in 3.4.2rc1
Comment 6 Steve Kelem 2011-07-19 16:49:26 UTC
P.S. The tables were created in OpenOffice, not Microsoft, so it's a problem with changing OO versions, not conversion from Microsoft.
Comment 7 Rainer Bielefeld Retired 2011-07-19 23:01:23 UTC
[Reproducible] with "LibreOffice 3.4.1  - WIN7  Home Premium (64bit) German UI [OOO340m1 (Build:103)]". In master situation becomes even worse!

Situation is a little confusing because there seem to be also bugs in older versions ( see "Bug 39227 - TABLES border formatting preserved" comment 6).

But facts are:
a) Double borders are shown different in LibO 3.3.3 (OOo) ans LibO 3.4
aa) white space between lines and inner lines will be shown too thick
b) Saving with LibO 3.4 and Reopening with LibO 3.3.3 does not heal problems from 3.4, Tables will be destroyed, look even worse than looked with 3.4 (with thin single border) and can no longer be used in 3.3.3 without intensive rework.

For more details please see screenshots from my Testkit.

This problem makes 3.4 unusable for all users using tables with double lines. Dataloss problem, so CRITICAL

@Steve Kelem:
Version modified due to <http://wiki.documentfoundation.org/BugReport>?

@Cédric:
Please feel free to reassign if it’s not your area
Comment 8 Rainer Bielefeld Retired 2011-07-19 23:02:07 UTC
Created attachment 49327 [details]
Test kit, see Comment 7
Comment 9 Petr Mladek 2011-07-20 02:05:57 UTC
It causes data loss. It is relatively common thing. So I increase the priority.
Comment 10 Petr Mladek 2011-07-20 05:48:34 UTC
Cedric has vacation next few weeks. Lubos, any chance that you could look at it?
Comment 11 Cor Nouws 2011-08-02 03:53:20 UTC
.
Comment 12 Cor Nouws 2011-08-02 15:01:30 UTC
Is this related to Bug 37693 - Abnormal Table Rendering ?
Comment 13 Steve Kelem 2011-08-02 16:36:08 UTC
No, bug 37693 has to do with rendering tables whose borders were generated in xml, something about incompatible parameters.

This bug has to do with tables created in OpenOffice prior to 3.4 being rendered improperly in 3.4.
Comment 14 Steve Kelem 2011-09-12 11:29:50 UTC
Has anyone signed on to this bug?
Comment 15 Josef.Latt 2011-09-19 15:24:26 UTC
(In reply to comment #13)
> No, bug 37693 has to do with rendering tables whose borders were generated in
> xml, something about incompatible parameters.
> 
> This bug has to do with tables created in OpenOffice prior to 3.4 being
> rendered improperly in 3.4.

Abnormal table rendering you can also see in new documents created with LO 3.4.3.
Comment 16 stefan 2011-09-20 12:26:34 UTC
Glad that someone filed this bug before. This bug makes older files nearly unusable.
Comment 17 Greg Madden 2012-01-07 12:08:18 UTC
Created attachment 55271 [details]
doc viewed in LO ver 3.3
Comment 18 Greg Madden 2012-01-07 12:08:59 UTC
Created attachment 55272 [details]
doc viewed in LO ver 3.4 & greater
Comment 19 Martin Whitaker 2012-01-11 09:10:34 UTC
Created attachment 55448 [details]
document containing table with single line borders

It's not just double borders that are affected. I have many documents containing tables with single minimal width (0.05pt) borders that no longer render correctly. A stripped down example is attached. In OOo 3.3.0 and LO 3.3.2 this renders correctly, with borders around all cells (see first screenshot). In LO 3.4.x and LO 3.5.0, most of the borders are missing (see second screenshot).

For me, this makes LO completely unusable.
Comment 20 Martin Whitaker 2012-01-11 09:12:21 UTC
Created attachment 55449 [details]
document viewed in OOo 3.3.0
Comment 21 Martin Whitaker 2012-01-11 09:14:20 UTC
Created attachment 55450 [details]
document viewed in LO 3.5.0 beta
Comment 22 Greg Madden 2012-01-23 14:56:28 UTC
(In reply to comment #19)
> Created attachment 55448 [details]
> document containing table with single line borders
> 
> It's not just double borders that are affected. I have many documents
> containing tables with single minimal width (0.05pt) borders that no longer
> render correctly. A stripped down example is attached. In OOo 3.3.0 and LO
> 3.3.2 this renders correctly, with borders around all cells (see first
> screenshot). In LO 3.4.x and LO 3.5.0, most of the borders are missing (see
> second screenshot).
> 
> For me, this makes LO completely unusable.

Another issue, viewing hidden cell borders has changed also.Using Lo 3.5 RC1 and the LO 3.4.x series.

These two features seem to control the visibility of cell borders, the behavior has been changed.
1. menu > view > text boundaries
2. menu > table > table boundaries

AFAIKT, 'table boundaries' is not working (does not show or hide cell boundaries) on my docs.

Seems like someone has been busy changing table features, without an eye towards backward compatibility.
Comment 23 Michael Stahl (allotropia) 2012-01-25 09:03:01 UTC
Created attachment 56150 [details]
put "double" cell borders on a diet

in the first attachment, the cell borders are of type "double",
and the ODF import filter effectively triples their width.
patch should fix that.
Comment 24 Michael Stahl (allotropia) 2012-01-25 09:05:19 UTC
Created attachment 56151 [details]
prevents wrong overriding of the style:border-line-width attributes

another problem when importing the first attachment:
the width from fo:border overrides widths in style:border-line-width,
which are more specific for "double" style borders and thus
should be preferred.
Comment 25 Michael Stahl (allotropia) 2012-01-25 13:42:45 UTC
additional note about the second patch:
i'd really like to detect the fact that we have read the other
attribute by adding some booleans in the import filter
instead of checking that the width is not zero, but that seems
to require too much refactoring to do it now... so this
heuristic will have to do.


now, the document inside the zip file attached in comment#8
looks much better, which is mostly good but in one case not:

the 6.55 pt double border has attributes like this:

  style:border-line-width="0.002cm 0.088cm 0.141cm" 

but it is displayed with 3 equal width inside, gap, outside lines.

looking at it in OOo 3.3 it is rather ugly, but still
the fact that it looks prettier in LO 3.4 is a regression :)
Comment 26 Michael Stahl (allotropia) 2012-01-25 13:48:33 UTC
Created attachment 56161 [details]
add a custom double border style

this patch seems to fix the problem described in previous comment.

i'm really not sure if this is the right approach, apparently
everything that doesn't match one of the pre-defined styles
is deliberately ignored; is there a reason for that?

anyway, saving the document again, i get the same attribute values,
and the rendering looks rather more like in older versions,
except not the same: the thin inner lines are painted too long,
also outside the table cell borders.
Comment 27 Cédric Bosdonnat 2012-01-27 00:46:13 UTC
Michael,

thanks for the patches. they are OK for me. I just pushed them to master and cherry-picked to -3-5. 2 more reviews to get them into -3-5-0.
Comment 28 Martin Whitaker 2012-01-27 10:18:41 UTC
Have these patches also fixed the problem with minimal width single borders (see comment 19)? If not, I will open a new bug for this.
Comment 29 Michael Stahl (allotropia) 2012-01-27 10:36:16 UTC
the bugdoc attached in comment #19 mainly has the problem that
the border line is only 1 twip wide, and is not painted for some reason.

this problem is handled with bug 42750.
Comment 30 Martin Whitaker 2012-01-27 10:53:15 UTC
OK, thanks Michael, that saves me a job. Can I suggest changing the title of bug 42750 to make it more obvious what it is now tracking.
Comment 31 Michael Stahl (allotropia) 2012-02-03 10:08:48 UTC
*** Bug 42570 has been marked as a duplicate of this bug. ***
Comment 33 Michael Stahl (allotropia) 2012-05-23 03:40:23 UTC
*** Bug 44708 has been marked as a duplicate of this bug. ***