Apache OpenOffice (AOO) Bugzilla – Issue 18673
redundent <font> tags when saving Hebrew doc as HTML
Last modified: 2013-08-07 14:38:26 UTC
OO1.1RC running on win XP- Hebrew OO local, default HTMl export charset set as windows-1255. A simple document was created using styles- no ad-hoc formatting was done. Then the document was saved as HTML. Looking at the code, there are redundent font declarations: once in the style sheet in the head of the document, the other inline. I don't see any clear source for the inline font declaration. If there was no ad-hoc formatting done, OO should only use the font declaration in te head, and not add any additional inline font tags.
Created attachment 8761 [details] original oo document
Created attachment 8762 [details] resulting HTML document
DL->MIB: Would you please takeover?
Your original and resulting documents seem not to match. However, in the <style> section all used paragarph and text styles are exported. This is done to be able to restore the styles with the original settings on import. Since OOo has three sets of font attributes, one for latin, one for CJK and one for CTL languages, up to four CSS classes are exported for a single style. One contains the common attributes, the three others the font attributes. In the <body>, these styles are referenced. Dependent on the locale specified for OOo itself, either, the latin, the CJK or the CTL class is referenced here. This happens without looking into the text that actually is exported. If the class does not match to the font attributes that are actually applied to the text, additional font attributes are exported. Indeed, this looks very complicated, but it has the advantage that all style sttings are preserved without any non-standard HTML extensions. The only optimization that might be done is to check the contents of a paragraph, so that the class can be choosen that is applies to most of the characters. I will accept this issue as a possible oiptimization to the HTML code exported.
.
adding dina as cc