opensagres / xdocreport

XDocReport means XML Document reporting. It's Java API to merge XML document created with MS Office (docx) or OpenOffice (odt), LibreOffice (odt) with a Java model to generate report and convert it if you need to another format (PDF, XHTML...).
https://github.com/opensagres/xdocreport
1.21k stars 372 forks source link

XHTMLConverter - wrong CSS order #379

Open spellsleeper opened 5 years ago

spellsleeper commented 5 years ago

Wrong order of CSS styles in fr.opensagres.poi.xwpf.converter.xhtml.XHTMLConverter result

Im using currently the XHTMLConverter for a docx Preview. In the created styles-tag the specific header styles are before the common header styles. So the specific styles will be always overruled by span.Heading{...},p.Heading{...} span Heading

im using the version 2.0.2

angelozerr commented 5 years ago

Any PR are welcome!

spellsleeper commented 5 years ago

Bug not yet found but assumption supported `

    <w:basedOn w:val="Heading"/>
    <w:pPr>
        <w:spacing w:before="240" w:after="120"/>
        <w:outlineLvl w:val="0"/>
    </w:pPr>
    <w:rPr>
        <w:b/>
        <w:bCs/>
        <w:sz w:val="36"/>
        <w:szCs w:val="36"/>
    </w:rPr>
</w:style>`

from styles.xml