Bug Hunting Session
Bug 41796 - HTML: exported table borders cannot be imported again
Summary: HTML: exported table borders cannot be imported again
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: x86 (IA32) Linux (All)
: high critical
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: target:3.6.0 target:3.5.4
Keywords: regression
: 34591 (view as bug list)
Depends on:
Blocks: 44768
  Show dependency treegraph
 
Reported: 2011-10-14 10:46 UTC by Duaine Hechler
Modified: 2012-05-22 02:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot.png (203.84 KB, image/png)
2011-12-27 17:24 UTC, Duaine Hechler
Details
2012_show_repertorie_before.html (13.59 KB, text/html)
2012-01-27 10:27 UTC, Duaine Hechler
Details
2012_show_repertorie_after.html (12.25 KB, text/html)
2012-01-27 10:27 UTC, Duaine Hechler
Details
2012_show_repertorie_after_with_borders_added_again.html (13.64 KB, text/html)
2012-01-27 10:27 UTC, Duaine Hechler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duaine Hechler 2011-10-14 10:46:13 UTC
Every time I edit an html document with borders on the tables, at opening the borders are completely turned off.

For example: I have several tables in various html documents that have borders turned on for everything - top, bottom, sides, in between rows. Every time before closing the document, I have to turn on the borders AGAIN. And every time I re-edit the document, the borders have to be turned on AGAIN.
Comment 1 Björn Michaelsen 2011-12-23 12:35:32 UTC
Created attachment 54876 [details]
Screenshot.png

[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 2 Duaine Hechler 2011-12-27 17:24:53 UTC
On 12/23/2011 02:35 PM, bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=41796
>
> Björn Michaelsen<bjoern.michaelsen@canonical.com>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|NEW                         |NEEDINFO
>
> --- Comment #1 from Björn Michaelsen<bjoern.michaelsen@canonical.com>  2011-12-23 12:35:32 PST ---
> [This is an automated message.]
> This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
> started right out as NEW without ever being explicitly confirmed. The bug is
> changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
> to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2
> prereleases.
> Details on how to test the 3.5.0 beta1 can be found at:
> http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1
>
> more detail on this bulk operation:
> http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
>
Yes, in version 3.5.0 beta1 the borders disappear on the tables
Comment 3 Michael Stahl (CIB) 2012-01-27 10:08:14 UTC
Created attachment 56233 [details]
2012_show_repertorie_before.html

hi Duaine,

that sounds annoying; could you either attach a document
that reproduces the problem, or some step-by-step instructions
how to create such a document?
Comment 4 Duaine Hechler 2012-01-27 10:27:43 UTC
I am attaching a before editing document (that has the borders added and saved from the last edit), an after edit with 
the borders gone. and another after with the borders added again.

Duaine

On 01/27/2012 12:08 PM, bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=41796
>
> Michael Stahl<mstahl@redhat.com>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |mstahl@redhat.com
>
> --- Comment #3 from Michael Stahl<mstahl@redhat.com>  2012-01-27 10:08:14 PST ---
> hi Duaine,
>
> that sounds annoying; could you either attach a document
> that reproduces the problem, or some step-by-step instructions
> how to create such a document?
>
Comment 5 Duaine Hechler 2012-01-27 10:27:44 UTC
Created attachment 56234 [details]
2012_show_repertorie_after.html
Comment 6 Duaine Hechler 2012-01-27 10:27:44 UTC
Created attachment 56235 [details]
2012_show_repertorie_after_with_borders_added_again.html
Comment 7 Michael Stahl (CIB) 2012-03-23 15:08:14 UTC
the first html attachment has various attributes like this,
but no border is displayed anywhere:

 STYLE="border: 1px solid #000000; padding: 0.05in"

this does not appear to be a regression, at least OOo 3.4beta,
3.2.0, 3.0.1 also do not display a border.

but then, if i open it in OOo 3.4beta, add a border and save it again,
it looks different: the style attributes are all:

 STYLE="border: none; padding: 0cm"

but there is now a BORDER attribute here that wasn't there before:

 <TABLE WIDTH=434 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=5 CELLSPACING=0>

opening this document in LO results in visible borders.

so there is a regression after all: either LO should learn to
read borders from the STYLE attributes it writes, or it should
write again the BORDER attribute that it can read.
Comment 8 hitec_tsc 2012-04-16 01:53:45 UTC
Is this bug maybe related to the one submitted here: https://bugs.freedesktop.org/show_bug.cgi?id=47670 ?

Since noone seems to care about the one I submitted there I was looking for others submits... Just a shot in the dark.
Comment 9 Michael Stahl (CIB) 2012-04-30 06:03:07 UTC
i take part of comment 7 back:

 STYLE="border: none; padding: 0cm"

is only on paragraphs and didn't change at all.

there are several problems:

1. the importer does not apply the "border" stuff in STYLE on
   TD elements to the table cell, but to something in the table cell
2. the exporter writes all but the first STYLE on TD elements
   with a spurious semicolon at the start that is likely invalid:

 STYLE="; border-top: none; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; padding-top: 0in; padding-bottom: 0.05in; padding-left: 0.05in; padding-right: 0.05in"

3. the importer cannot read STYLE with spurious semicolon at all

fixed on master now.
Comment 10 Not Assigned 2012-04-30 06:04:30 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9a482b4ea49c3ce964de4c0f81d8d3206ac75dc8

fdo#41796: sw: HTML: import CSS STYLE border on TD:
Comment 11 Not Assigned 2012-04-30 06:04:55 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=284b421f40078275e5e647a4f7e82e4ef7fec6a7

fdo#41796: sw: HTML: spurious semicolons in STYLE:
Comment 12 hitec_tsc 2012-04-30 06:07:47 UTC
(In reply to comment #11)
> Michael Stahl committed a patch related to this issue.
> It has been pushed to "master":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=284b421f40078275e5e647a4f7e82e4ef7fec6a7
> 
> fdo#41796: sw: HTML: spurious semicolons in STYLE:

Could you pretty pretty please take a look over to the bug report I posted in comment 7 and tell me if your fix applies to that as well? Pretty please and thanks ;)
Comment 13 hitec_tsc 2012-04-30 06:09:41 UTC
> Could you pretty pretty please take a look over to the bug report I posted in
> comment 7 and tell me if your fix applies to that as well? Pretty please and
> thanks ;)


I meant Comment 8... Sorry
Comment 14 Not Assigned 2012-04-30 07:28:36 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b363a1aac10fad09d62d3c4aece5b2de5589947a&g=libreoffice-3-5

fdo#41796: sw: HTML: import CSS STYLE border on TD:


It will be available in LibreOffice 3.5.4.
Comment 15 Not Assigned 2012-04-30 07:29:02 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=920de2d0f5bfc79b2570595d95495759c009a825&g=libreoffice-3-5

fdo#41796: sw: HTML: spurious semicolons in STYLE:


It will be available in LibreOffice 3.5.4.
Comment 16 Michael Stahl (CIB) 2012-05-22 02:59:25 UTC
*** Bug 34591 has been marked as a duplicate of this bug. ***