DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26778>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26778

[PATCH] Support for percentages and table-units

           Summary: [PATCH] Support for percentages and table-units
           Product: Fop
           Version: 1.0dev
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: general
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


This patch add support for percentages and table-units in property values 
and for calculations that involves these values in property expressions.

The patch contain the follow changes to the property sub-system:

- Add a small interface: Numeric which describe the public 
  methods for all types of numerics.
- Make all the length subclasses implement Numeric and Length
- Clean out NumericProperty so it represent an absolute numeric.
- Add class RelativeNumericProperty which represent an exression tree which
  involve relative numeric operand(s).
- Adds a NumericOp class with static calculus methods that does the 
  calculation if the operand(s) are absolute or create an expression node
  so the evaluation will be done when getValue() or getNumericValue() is
  called.

And the following changes to the layout subsystem:

- Add getters for block and referenceArea dimensions and tableUnits to FObj.
- Override getter for block, referenceArea and tableUnits in the fo's
  that define new values for such areas.
- Make the LMs assign values for block, referenceArea and tableUnits 
  just before curLM.getNextBreakPoss() is called.
- Delay evaluation of the final call to Length.getValue() until
  layouting is in progress and the base value are available.

Please note that I'm a bit confused about the exact definition of the areas,
blocks and boxes that are described under 'percentage' for each property in
the spec so it is quite likely that the values assigned in the LMs are
incorrect and/or the properties uses the wrong area/block/box when resolving 
a relative length. I still hope that the patch shows a valid approach for
adding support for relative lengths.

It is likely that more getters must be defined in FObj, f.ex. for the 
padding area.

After applying the patch the following files should be removed:

src/java/org/apache/fop/fo/properties/LinearCombinationLength.java
src/java/org/apache/fop/fo/properties/MixedLength.java

Reply via email to