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=26096>.
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=26096

subproperty="inherit" does not find inherited value.

           Summary: subproperty="inherit" does not find inherited value.
           Product: Fop
           Version: 1.0dev
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: general
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


My recently applied patch 25810 which add support for "inherit" values doesn't 
work for subproperties.

This is because the subproperty maker doesn't know which base maker it is 
attached to. So for keep-with-next.within-line="inherit" the propId for 
the 'within-line' maker is CP_WITHIN_LINE and the getFromParent(propId) can't 
find the specified parent value.

Unfortunately the subprop makers for the within-* subprops are created as 
static instances in GenericKeep so they can't easily have the base propId or'ed 
in.

The issue can the solved with a hack like this to Property.java:

@@ -193,6 +194,8 @@
             Maker spMaker = getSubpropMaker(subpropId);

             if (spMaker != null) {
+                spMaker.propId =
+                    (spMaker.propId & Constants.COMPOUND_MASK) | this.propId;
                 Property p = spMaker.make(propertyList, value, fo);
                 if (p != null) {
                     return setSubprop(baseProp, subpropId, p);


but changing the static singleton makers like that every time they are about to 
get used, is too ugly to even consider <wink>.

Reply via email to