--- PropertyList.java 5 Jan 2004 00:44:59 -0000 1.19
+++ PropertyList.java 5 Jan 2004 01:31:09 -0000 1.20
@@ -184,20 +184,11 @@
*/
public Property getExplicitOrShorthand(int propId) {
/* Handle request for one part of a compound property */
- String propertyName = FOPropertyMapping.getPropertyName(propId);
-
- int sepchar = propertyName.indexOf('.');
- String baseName;
- if (sepchar > -1) {
- baseName = propertyName.substring(0, sepchar);
- } else {
- baseName = propertyName;
- }
- Property p = getExplicitBaseProp(baseName);
+ Property p = getExplicitBaseProp(propId & Constants.PROPERTY_MASK);
if (p == null) {
p = getShorthand(propId & Constants.PROPERTY_MASK);
}
- if (p != null && sepchar > -1) {
+ if (p != null && (propId & Constants.PROPERTY_MASK) != 0) {
return getSubpropValue(p, propId);
}
Glen, I think that the last 3 statements should read:
> + if (p != null && (propId & Constants.COMPOUND_MASK) != 0) {
> return getSubpropValue(p, propId);
> }after all, the subprop should only be retrived when the propId also includes a subproperty.
Also, there is a bit of a mixup wrt. the signature of the Maker.setSubprop() method. The generated makers (eg. GenericSpace) overrides setSubprop(Property, int, Property) while the base method in Property.Maker defines and calls: setSubprop(Propertu, String, Property)
Something along these lines will fix the setSubprop issue:
--- src/java/org/apache/fop/fo/Property.java 5 Jan 2004 00:44:59 -0000 1.9
+++ src/java/org/apache/fop/fo/Property.java 5 Jan 2004 13:33:43 -0000
@@ -192,7 +192,8 @@
if (spMaker != null) {
Property p = spMaker.make(propertyList, value, fo);
if (p != null) {
- return setSubprop(baseProp, partName, p);
+ int partId = FOPropertyMapping.getSubPropertyId(partName);
+ return setSubprop(baseProp, partId, p);
}
} else {
//getLogger().error("compound property component "
@@ -215,7 +216,7 @@
* component to be set.
* @return The modified compound property object.
*/
- protected Property setSubprop(Property baseProp, String partName,
+ protected Property setSubprop(Property baseProp, int parId,
Property subProp) {
return baseProp;
}