Page 1 of 1

Patch for JaxbXmlPart

PostPosted: Wed Sep 02, 2009 9:35 am
by holgerschlegel
Appended to this post is a Eclipse generated patch file for the JaxbXmlElement class. It adds a generic parameter for the jaxbElement property. Subclasses of that class has been changed to add a conrete class for that parameter. For example, the MainDocumentPart uses the org.docx4j.wml.Document class as parameter.
Some other classes referencing the changed property has been updated to remove compiler errors (mainly by adding casts). The changes samples has not been tested.

While creating this patch I also spoted (and corrected) an error in the iText based PDF conversion. In the inner class EndPage headerFooterPolicy.getHeader has been invoked were it should be getFooter.

Caused by my Eclipse settings, the import clauses of the modified classes may has been changed/reordered.

This patch is constributed on the basis of the document docx4j_IndividualContributor.docx provided in another post in this forum.


Re: Patch for JaxbXmlPart

PostPosted: Wed Sep 02, 2009 12:08 pm
by jason
Dear Holger

Thank you for this patch. I have applied it (revision 887).

I also altered the unmarshal methods:

Code: Select all
    public E unmarshal( is )
    public E unmarshal(org.w3c.dom.Element el)

cheers .. Jason