Issue 14600 - Generated HTML changes default spacing
Summary: Generated HTML changes default spacing
Status: ACCEPTED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: PC Windows NT
: P4 Trivial with 6 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
: 53807 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-05-19 03:24 UTC by Unknown
Modified: 2013-08-07 14:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Word file, OO-writer HTML conversion (all versions), Word conversion (269.26 KB, application/zip)
2003-05-19 03:27 UTC, Unknown
no flags Details
same, with v1.1b (235.09 KB, application/zip)
2003-05-19 21:39 UTC, Unknown
no flags Details
1.1 beta2 (235.06 KB, application/zip)
2003-06-21 19:05 UTC, Unknown
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2003-05-19 03:24:49 UTC
(See issue #12317)

The generated HTML file increases the line spacing (especially noticable in the
Roll Call section at the top).

Here a sample of the problematic HTML (from attached file 04022009RG-32html.html):
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Chair Warren H.
Newell</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Vice-Chair Carol A.
Roberts</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Commissioner Burt
Aaronson</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Commissioner Addie L.
Greene</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Commissioner Mary McCarty -
Arrived later</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Commissioner Karen T.
Marcus</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Commissioner Tony
Masilotti</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Chief Assistant County
Attorney Maureen E. Cullen</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Deputy County Administrator
Verdenia C. Baker</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Chief Deputy Clerk John W.
Dame</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Recording Clerk Donna
Atwood</FONT></FONT>
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Condensing Clerk Joan
Haverly</FONT></FONT>

Changing this to :
<DD><P ALIGN=JUSTIFY><FONT FACE="Arial"><FONT SIZE=3>Chair Warren H. Newell
<BR>Vice-Chair Carol A. Roberts
<BR>Commissioner Burt Aaronson
<BR>Commissioner Addie L. Greene
<BR>Commissioner Mary McCarty - Arrived later
<BR>Commissioner Karen T. Marcus
<BR>Commissioner Tony Masilotti
<BR>Chief Assistant County Attorney Maureen E. Cullen
<BR>Deputy County Administrator Verdenia C. Baker
<BR>Chief Deputy Clerk John W. Dame
<BR>Recording Clerk Donna Atwood
<BR>Condensing Clerk Joan Haverly</FONT></FONT>

fixes the problem (but only for that area, of course).
The problem appears to be caused by gratuitous use of <P> which adds white space
above and below the paragraph.  From
http://www.w3.org/TR/html401/struct/text.html#h-9.3.5 :
"HTML user agents have traditionally rendered paragraphs with white space before
and after..."
If the initial <P> before 'Chair Warren H. Newell' is to be kept (although it
isn't needed) the <DD>s must also be removed, as the initial <P> is closed when
the next <DD> is reached, closing the paragraph and introducing the white space.

The solution should be to remove the <P> elements, as they introduce white space
not found in the original document, effectively double spacing any document that
is converted to HTML.
Comment 1 Unknown 2003-05-19 03:27:42 UTC
Created attachment 6264 [details]
Word file, OO-writer HTML conversion (all versions), Word conversion
Comment 2 Unknown 2003-05-19 04:20:07 UTC
Adding a style to set the margins of the <P> elements to zero would be
another option.
Comment 3 Unknown 2003-05-19 21:39:02 UTC
Same problem with 1.1b.  Paragraphs need to have their margins set to
zero.
Comment 4 Unknown 2003-05-19 21:39:39 UTC
Created attachment 6281 [details]
same, with v1.1b
Comment 5 Unknown 2003-06-21 19:03:43 UTC
Still happens with beta2.
Comment 6 Unknown 2003-06-21 19:05:02 UTC
Created attachment 7034 [details]
1.1 beta2
Comment 7 h.ilter 2003-06-23 15:17:54 UTC
Reassigned to ES
Comment 8 eric.savary 2003-06-27 23:24:00 UTC
Note if you don't see any further comment in an issue it means nobody 
did work on it so you don't need to repost again the same samples. 
Yes the issue as not been fixed/considered yet!
Comment 9 eric.savary 2003-06-27 23:24:47 UTC
target to 0Oo 2.0
Comment 10 eric.savary 2003-07-22 17:25:03 UTC
ES->BH:
Summary: when Writer styles are exported to HTML, the "0,00" values of
"spacing above paragraph" and "spacing after paragraph" should be also
present in the CSS style definition.
Ex: <p style="margin-top: 0.00; margin-bottom: 0.00">Dummy Text</p>
Comment 11 eric.savary 2003-07-22 17:25:28 UTC
NEW
Comment 12 eric.savary 2003-09-19 10:37:58 UTC
*** Issue 19707 has been marked as a duplicate of this issue. ***
Comment 13 bettina.haberer 2003-11-10 08:04:29 UTC
Hello Michael, please take over this issue. We should try to get this
changed for the Q.
Please give approval for this evaluated OO.o 2.0 flagged issue. 
If you confirm with the target OO.o 2.0, then please keep it on your
owner (or the owner of the concerning developer) for implementation.
In case you want this issue for 'OOo Later', then please reset the
target milestone. If you decline the issue finally, please set the
resolution to 'Wontfix' (but do not close). In case of 'OOo Later' or
'Wontfix' please reset it on Bettina's owner. Thank you.
Comment 14 michael.brauer 2003-11-10 15:28:18 UTC
For browsers that support style sheets (Netscape, IE) margin-bottom:
0in is already added to the style of "P". Unfortunately this is not
sufficient, because these browsers have a default margin-top >0
additionally.

This seems to be a defect rather than an enhancement, but it is not
covered vy the Q-PCD.
Comment 15 bettina.haberer 2003-11-10 15:50:45 UTC
Hello Michael, thank you for quick response. So this issue is
considered as a defect. Could you please keep this defect on your
owner for fixing it for Office Later, thank you.
Comment 16 michael.brauer 2003-11-11 13:57:46 UTC
.
Comment 17 cgrasso 2004-06-10 02:37:27 UTC
I would consider this a P3 bug. The output is basically doubled spaced. There 
needs to be a top-margin default set just as there is already a bottom-margin 
being set (Word save-as HTML works properly in creating default margins).

It should be a simple fix is to add "top-margin" to the paragraph style that 
is being generated (these styles should also be configurable - enhancement).

Can we get a patch out for this sooner than later?

Comment 18 andreschnabel 2005-09-29 18:49:08 UTC
*** Issue 53807 has been marked as a duplicate of this issue. ***
Comment 19 oodenis 2008-03-20 17:45:36 UTC
When I export to HTML I have to do the following:
Change this:
P { margin-bottom: 0.08in}

To this:
P { margin-bottom: 0.08in;  margin-top: 0cm }

After that, all the single line spaced stuff in OOo IS single line spaced in Web
browsers. I've been manual fixing this for 5 years.