Page 1 of 1

Fix to be made in ListLevel.java for docx with listoverrides

PostPosted: Mon Dec 28, 2009 2:47 pm
by shyam.ramesh
SetOverrides(Lvl levelNode) method of ListLevel needs the following fixes..I get NPE when I convert docx with listoverrides.

Current Code

org.docx4j.wml.RFonts fontNode = levelNode.getRPr().getRFonts();
if (fontNode != null)
{
this.font = fontNode.getHAnsi();
}

Modified Code : Null Check to avoid NPE.

org.docx4j.wml.RFonts fontNode =null;
if (levelNode.getRPr() != null)
{

fontNode = levelNode.getRPr().getRFonts();
}
if (fontNode != null)
{
this.font = fontNode.getHAnsi();
}

regards,
krithi

Re: Fix to be made in ListLevel.java for docx with listoverrides

PostPosted: Sat Jan 02, 2010 3:34 am
by jason
Thanks Krithi

Fixed in changeset 982

Re: Fix to be made in ListLevel.java for docx with listoverrides

PostPosted: Tue Jan 05, 2010 8:48 am
by shyam.ramesh
Thanks for the quick response.When is the next release scheduled?.Just thought I can move to latest along with the fixes.


regards,
krithi

Re: Fix to be made in ListLevel.java for docx with listoverrides

PostPosted: Wed Jan 06, 2010 9:25 am
by jason
shyam.ramesh wrote:When is the next release scheduled?.Just thought I can move to latest along with the fixes.


You could use http://dev.plutext.org/docx4j/docx4j-nightly-20100103.jar