gmazza 2004/01/09 14:32:27
Modified: src/java/org/apache/fop/fo Property.java
Log:
Bug 25810 (Patch by Finn Bock) -- Support for inherit attribute value.
Revision Changes Path
1.14 +12 -8 xml-fop/src/java/org/apache/fop/fo/Property.java
Index: Property.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Property.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Property.java 7 Jan 2004 22:50:51 -0000 1.13
+++ Property.java 9 Jan 2004 22:32:27 -0000 1.14
@@ -234,26 +234,30 @@
public Property make(PropertyList propertyList, String value,
FObj fo) throws FOPException {
try {
- Property pret = null;
+ Property newProp = null;
String pvalue = value;
- pret = checkEnumValues(value);
- if (pret == null) {
+ if ("inherit".equals(value)) {
+ newProp = propertyList.getFromParent(this.propId);
+ } else {
+ newProp = checkEnumValues(value);
+ }
+ if (newProp == null) {
/* Check for keyword shorthand values to be substituted. */
pvalue = checkValueKeywords(value);
// Override parsePropertyValue in each subclass of
Property.Maker
Property p = PropertyParser.parse(pvalue,
new PropertyInfo(this,
propertyList, fo));
- pret = convertProperty(p, propertyList, fo);
+ newProp = convertProperty(p, propertyList, fo);
} else if (isCompoundMaker()) {
- pret = convertProperty(pret, propertyList, fo);
+ newProp = convertProperty(newProp, propertyList, fo);
}
- if (pret == null) {
+ if (newProp == null) {
throw new org.apache.fop.fo.expr.PropertyException("No
conversion defined");
} else if (inheritsSpecified()) {
- pret.setSpecifiedValue(pvalue);
+ newProp.setSpecifiedValue(pvalue);
}
- return pret;
+ return newProp;
} catch (org.apache.fop.fo.expr.PropertyException propEx) {
String propName = FOPropertyMapping.getPropertyName(this.propId);
throw new FOPException("Error in " + propName
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]