Apache OpenOffice (AOO) Bugzilla – Issue 14602
Generated HTML poorly indents columns
Last modified: 2013-08-07 14:38:26 UTC
All output HTML versions poorly indent the page-format column in section 2.A. of the original document. The MS-Word generated HTML is able to match the original document, but I haven't been able to determine how it accomplishes this.
Created attachment 6266 [details] Word file, OO-writer HTML conversion (all versions), Word conversion
*** Issue 12758 has been marked as a duplicate of this issue. ***
This is the code that OO generates: <dl> <dl> <dl> <dl> <dl> <dl> <dd><p ALIGN=JUSTIFY><font FACE="Arial"><font SIZE=2>37 6F-1</font></font></dl> </dl> </dl> </dl> </dl> </dl> This indents the text very far, when '37' should be left justified and '6F-1' one tab over. MS Word uses a marginless paragraph and text justification: <p class=MsoNormal style='margin-left:0.5in;text-align:justify'><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt'>28<span style='mso-tab-count:1'> </span>3BB-2<o:p></o:p></span></p>
Version 1.1b HTML 3.2 still has the problem. Other 1.1b HTML outputs don't indent the item randomly, instead there is no indentation. MS-Word indents either correctly, or much closer to correct.
Created attachment 6282 [details] same, v1.1b
same for v1.1b2
Created attachment 7038 [details] v1.1b2
Reasigned to ES
MS uses an "mso-tab" tag which is not HTML standard. Tabs can't be export to HTML so only a space is diplayed. For this reason the space (not the "indent" or "columns") is not respected.
closed
There is an mso-tab-count style referenced in the HTML. I am using Mozilla and not IE, which ignores these style references. The indentation as described by my comment "MS-Word indents either correctly, or much closer to correct" was from observing the MS-Word HTML as rendered by Mozilla 1.3. Removing the mso-tab-count style attributes from the span did not affect the rendering of the MS-Word HTML (which is what would be expected if the sytle was ignored). The indentation was still indented correctly, or much closer to correct. I was able to simulate tabs by using level 1 CSS such as <span style='letter-spacing: 8em'> </span> whenever I wanted a tab. If you want a tab that simulates tab-stops instead of just eight spaces, you can either calculate how many EMs are needed, or better yet use <span style='white-space:pre'>(actual ASCII tab here)</span> which appears to work quite well in Mozilla. So my suggestion is to surround the tabs with a span that has a white-space style.
Ok. Could be a workaround... But it really makes no sense to work with tabs in HTML (much better with tables). If the client Browser displays a non fixed font or you swith to a non fixed font, those indents will look dirty anyway...
We do not plan to enhance our HTML Editor/export.
It's not an enhancement, it's a bug. The original document was indented, the code you generate has NO indention. I've even included a suggested fix for the bug, where you output the appropriate tabs or spacing by using the white-space or letter-spacing styles. We're trying to get our client to move from Word to OOo or Star Office, but this is a show-stopper for them, as well as for anyone else where the HTML output must be at least a reasonable facsimile of the original document.
As said before: There are no tabs in HTML, at least not such, that could be displayed in any browser. So we do not have them. But yes: If you EXPORT a Writer document (that allows tabs) into HTML those tabs get lost (that's why we throw an error message at the end about possible loss of data) If you want to crate a "clean" web page use Writer/WEB for this. There you plainly cannot use tabs at all.
Closed
Sigh. View my other comments. Tab equivalents ARE available in HTML that can be displayed in any browser. I've demonstrated this twice. MS Office can even do it, although in a convoluted fashion. Just say "we don't want to fix this because accurate page conversion isn't considered an issue." Perhaps I should refile and remove the word "TAB" and just call it paragraph indention?