On Sun, Feb 15, 2004 at 04:41:46PM -0000, [EMAIL PROTECTED] wrote:
> ------- Additional Comments From [EMAIL PROTECTED]  2004-02-15 16:41 -------
> Good catch Simon, thanks for taking time to look at it. The NPE is due to a 
> missing implementation of getNumeric() in RelativeNumericProperty (which should 
> contain "return this;").
> I would guess that your example are using margins in a page context, so I have 
> made it return 20% of the page width. But margin-[top,bottom] also used page-
> width but they should be using page-height as their base and that isn't handled 
> correctly yet.
> I'll attach a new patch which fixes the bugs you found and also merges the 
> different getters in FObj into a single getLayoutDimension().

I like the patch and the way RelativeNumericProperty holds and
evaluates an expression tree (except my different preference for
storing layout information, as discussed). This is really nice and
works well:

          v = "(((0mpt +(4000mpt +20.0%)) +0mpt) +0mpt)"

I found a few things that may need modification:

In LengthBase.java:

    /** array of valid percent-based length types */
    public static final int[] PERCENT_BASED_LENGTH_TYPES
                CONTAINING_REFAREA } ;


(Is this variable used anywhere?)

Block, BlockContainer, Table, Region, PageLayoutManager: getters and
setters should be removed again?

In LineLayoutManager.java:

    private Length iTextIndent;

remove the i from the name; it stands for int.

Simon Pepping

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

Reply via email to