Luca Furini wrote:
JThe method startParagraphs dereferences only knuthParagraphs and textIndent, so maybe there is a missing line concerning their initialization.
I have proved that textIndent is definitely null when it is not specified on the block.
<snip/>
While textIndent is initialized in the TLM constructor (but this was already in the code, it's not a change of mine):
I assume you mean the LLM constructor?
... bTextAlignmentLast = blockProps.textAlignLast; textIndent = blockProps.firstIndent; /* here it is */ hyphProps = propMgr.getHyphenationProps(); ...
and if blockProps.firstIndent returns null? Which it appears to be if the user doesnt specify on a block.
I hope this can help you; thanks for testing my patch.
After adding an IF test around the code that uses textIndent to avoid NPE, I then get the following error:
25-May-2004 09:11:43 org.apache.fop.layoutmgr.LineLayoutManager getNextBreakPoss
WARNING: No set of breaking points found with maxAdjustment = 1.0 Exception in thread "main" java.lang.NullPointerException at org.apache.fop.layoutmgr.LineLayoutManager.getNextBreakPoss(LineLayou tManager.java:385) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextBreakPoss(BlockLay outManager.java:202) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextBreakPoss(FlowLayou tManager.java:81)
Thanks,
Chris