On Tue, May 25, 2004 at 09:51:28AM +0100, Chris Bowditch wrote:
> 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.
> >  ...
> >  bTextAlignmentLast = blockProps.textAlignLast;
> >  textIndent = blockProps.firstIndent; /* here it is */
> >  hyphProps = propMgr.getHyphenationProps();
> >  ...

LineLayoutManager:
    protected void initProperties(PropertyManager propMgr) {
        BlockProps blockProps = propMgr.getBlockProps();
        textIndent = blockProps.firstIndent;
    }

blockProps is initialized in the constructor of LineLM.

PropertyManager:
    public BlockProps getBlockProps() {
        BlockProps props = new BlockProps();
        props.firstIndent = this.propertyList.get(PR_TEXT_INDENT).getLength();
        return props;
    }

If this.propertyList is not null, then get(PR_TEXT_INDENT) always
returns a value; if it is not specified by the user, the default value
is returned. This is true for all properties.

LengthProperty:
    public Length getLength() {
        return this;
    }

Property:
    public Length getLength() {
        return null;
    }

getLength(), however, may return a null value. It only returns a
non-null value if the property returned by get(PR_TEXT_INDENT) is a
LengthProperty. This should be true; I do not know a reason why it is
not true in your code.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.nl

Reply via email to