Issue 63545 - Style attributes don't override tag parameters
Summary: Style attributes don't override tag parameters
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: OOo 2.0.2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needmoreinfo, oooqa
Depends on:
Blocks:
 
Reported: 2006-03-23 18:55 UTC by ring0
Modified: 2013-08-07 14:38 UTC (History)
4 users (show)

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


Attachments
Test file illustrating problem with HTML export (11.59 KB, application/vnd.oasis.opendocument.text)
2006-03-24 06:41 UTC, ring0
no flags Details
A bugdoc, originally created with OOo2.3 and then edited with OOo2.4.1 (18.55 KB, application/vnd.oasis.opendocument.text)
2008-07-27 14:55 UTC, tora3
no flags Details
sample doc, no problem, prepared with OOo 2.4 from scratch (18.26 KB, application/vnd.oasis.opendocument.text)
2008-07-27 14:57 UTC, tora3
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description ring0 2006-03-23 18:55:11 UTC
There are a few issues concerning HTML export in Writer:
1. Formatting is sometimes lost during export.
I have a document in which text is generally formatted as "justify", but there 
are some paragraphs formatted as "center". After export, all browsers (IE, 
Opera, Firefox, Netscape) represents these paragraphs as "justify". When I 
looked into HTML code, I've found the following string:

<P CLASS="western" ALIGN=CENTER STYLE="font-variant: small-
caps"><B>something</B></P>

But stylesheet contains the following record:

P { direction: ltr; color: #000000; line-height: 150%; text-align: justify; 
widows: 2; orphans: 2 }

HTML specification says that style attributes override tag parameters, so the 
above "ALIGN=CENTER" has no effect.

2. Pictures are resized in a strange way (their real sizes are different from 
WIDTH and HEIGHT parameters of IMG tag). When IE (or Opera, or Firefox) 
shrinks them, they look ugly (these pictures are not photos, but diagrams). 
May be it would be better to resize pictures during export using proper 
interpolation algorithm.

Best regards,
 Alexey.
Comment 1 lars 2006-03-23 19:56:37 UTC
Hi, please attach a sample odt file which when exported exhibits problem 1.. 
Please file a seperate issue for 2. and attach a sample odt file there also. 
thanks, Lars
Comment 2 ring0 2006-03-24 06:41:48 UTC
Created attachment 35189 [details]
Test file illustrating problem with HTML export
Comment 3 michael.ruess 2006-03-24 08:42:17 UTC
Reassigned to ES.
Comment 4 eric.savary 2006-03-24 09:14:38 UTC
Reassigned
Comment 5 tino.rachui 2006-11-17 08:16:40 UTC
tra->mba: One for the writer team
Comment 6 Mathias_Bauer 2006-12-08 11:03:14 UTC
Frank, can you please shed some light on this?
Comment 7 tora3 2008-07-27 14:25:19 UTC
With OpenOffice.org 2.3 and 2.4, the following behaviors are observed.

(Type A) Beginning with File > New > HTML Document, then save-as in HTML format 

       <STYLE TYPE="text/css">
       <!--
               @page { size: 7.17in 10.12in }
               P { margin-bottom: 0.08in; direction: ltr; color: #000000;
text-align: left; widows: 0; orphans: 0 }
               P.western { font-family: "Times New Roman", serif; font-size:
12pt; so-language: en-US }
               P.cjk { font-family: "ï¼­ï¼³ P明æœ"; font-size: 12pt; so-language:
ja-JP }
               P.ctl { font-family: "Tahoma"; font-size: 12pt; so-language: zxx }
       -->
       </STYLE>

 <P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in">
  <FONT FACE="MS Pゴシック, monospace">
   <FONT SIZE=2 STYLE="font-size: 10pt">
    <B>ABC</B>
   </FONT>
  </FONT>
 </P>

The declaration "text-align: left;" seems to come from paragraph alignment of 
the default paragraph style. In the above case, "P { ... text-align: left; ...}" 
overrides <P ... ALIGN=CENTER ...>. 


(Type B) Beginning with File > New > Text Document, then save-as in HTML format 

       <STYLE TYPE="text/css">
       <!--
               @page { size: 8.5in 11in; margin: 0.79in }
               P { margin-bottom: 0.08in }
       -->
       </STYLE>

 <P ALIGN=CENTER STYLE="margin-bottom: 0in">
  <FONT COLOR="#000000">
   <FONT FACE="MS Pゴシック, monospace">
    <FONT SIZE=2 STYLE="font-size: 10pt">
     <B>ABC</B>
    </FONT>
   </FONT>
  </FONT>
 </P>

There seems no problem with paragraph alignment. 

References 
http://oooug.jp/faq/index.php?faq/4/1180 (Japanese) reported by Matsumoto.
Comment 8 tora3 2008-07-27 14:52:24 UTC
I probably misunderstood. 
The type A above seems not to be created with HTML Document, but Text Document. 

Attachments:
 Type A: ABC.odt provided by the reporter. 
 Type B: XYZ.odt prepared with OOo 2.4 Linux from scratch.
 
I am not sure what is a trigger that changes a type from B to A. 
Comment 9 tora3 2008-07-27 14:55:49 UTC
Created attachment 55390 [details]
A bugdoc, originally created with OOo2.3 and then edited with OOo2.4.1
Comment 10 tora3 2008-07-27 14:57:15 UTC
Created attachment 55391 [details]
sample doc, no problem, prepared with OOo 2.4 from scratch