Apache OpenOffice (AOO) Bugzilla – Issue 14600
Generated HTML changes default spacing
Last modified: 2013-08-07 14:38:26 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.
Created attachment 6264 [details] Word file, OO-writer HTML conversion (all versions), Word conversion
Adding a style to set the margins of the <P> elements to zero would be another option.
Same problem with 1.1b. Paragraphs need to have their margins set to zero.
Created attachment 6281 [details] same, with v1.1b
Still happens with beta2.
Created attachment 7034 [details] 1.1 beta2
Reassigned to ES
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!
target to 0Oo 2.0
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>
NEW
*** Issue 19707 has been marked as a duplicate of this issue. ***
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.
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.
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.
.
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?
*** Issue 53807 has been marked as a duplicate of this issue. ***
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.