xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <grm7...@yahoo.com>
Subject Re: cvs commit: xml-fop/src/java/org/apache/fop/render/rtf TextAttributesConverter.java
Date Mon, 30 Aug 2004 14:19:35 GMT
Thanks--I'll add a comment to that effect.

Glen

--- Finn Bock <bckfnn@worldonline.dk> wrote:

> gmazza@apache.org wrote:
> 
> >   Log:
> >   Convenience method fobj.getPropLength() added to
> simplify some of the code.
> 
> >   --- FObj.java	20 Aug 2004 09:38:21 -0000	1.69
> >   +++ FObj.java	29 Aug 2004 20:17:34 -0000	1.70
> >   @@ -196,6 +196,17 @@
> >         */
> >        public String getPropString(int propId) {
> >            return
> propertyList.get(propId).getString();
> >   +    }
> >   +
> >   +    /**
> >   +     * Convenience method to quickly obtain the
> length value of a property
> >   +     * for this FO, without querying for the
> propertyList first.
> >   +     * Meaningful only for properties having a
> length representation
> >   +     * @param propId - the Constants ID of the
> desired property to obtain
> >   +     * @return the length value of the property
> value
> >   +     */
> >   +    public int getPropLength(int propId) {
> >   +        return
> propertyList.get(propId).getLength().getValue();
> >        }
> 
> 
> Careful here. The final getValue() call can not be
> performed during 
> addProperties() because no base values has yet been
> assigned to resolve 
> relative percentages against.
> 
> The getValue() method can only be called from the 
> LayoutManager.getNextBreakPoss() loop.
> 
> The code you changed in the FO classes was also
> wrong before, luckily 
> the resulting values was never used (I hope).
> 
> regards,
> finn
> 


Mime
View raw message