aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-01-09 22:32:27 +0000
committerGlen Mazza <gmazza@apache.org>2004-01-09 22:32:27 +0000
commitcc20e916526085d34f300e31206abd9fad269cdb (patch)
tree29f60ced0e9fcb795cc01614f4aa28899f431081 /src
parente07fab303c25efbbd9954f934c37e9aa428a7da9 (diff)
downloadxmlgraphics-fop-cc20e916526085d34f300e31206abd9fad269cdb.tar.gz
xmlgraphics-fop-cc20e916526085d34f300e31206abd9fad269cdb.zip
Bug 25810 (Patch by Finn Bock) -- Support for inherit attribute value.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197151 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/fo/Property.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/fo/Property.java b/src/java/org/apache/fop/fo/Property.java
index 11c12205a..700615e67 100644
--- a/src/java/org/apache/fop/fo/Property.java
+++ b/src/java/org/apache/fop/fo/Property.java
@@ -234,26 +234,30 @@ public class Property {
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