diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2006-02-18 10:24:22 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2006-02-18 10:24:22 +0000 |
commit | 33b349a91d8906450a61f981db34a9ae4d7d0716 (patch) | |
tree | 36ab217205079a564bc71a6b6503332d48e30690 /src/java/org | |
parent | 7cc7cd7bee91277df98a8d92a87937e59e6e3496 (diff) | |
download | xmlgraphics-fop-33b349a91d8906450a61f981db34a9ae4d7d0716.tar.gz xmlgraphics-fop-33b349a91d8906450a61f981db34a9ae4d7d0716.zip |
Tweak: modified warning to occur only for non-inherited props where the parent fo doesn't have an explicit value
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@378709 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/fop/fo/properties/PropertyMaker.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/fo/properties/PropertyMaker.java b/src/java/org/apache/fop/fo/properties/PropertyMaker.java index d46950a45..db6b4fb47 100644 --- a/src/java/org/apache/fop/fo/properties/PropertyMaker.java +++ b/src/java/org/apache/fop/fo/properties/PropertyMaker.java @@ -413,11 +413,18 @@ public class PropertyMaker implements Cloneable { if ((propId & Constants.COMPOUND_MASK) != 0) { newProp = getSubprop(newProp, propId & Constants.COMPOUND_MASK); } - if (newProp.getString() == null) { - log.warn("Specified value of \"inherit\" for " - + FOPropertyMapping.getPropertyName(getPropId()) + " on " - + propertyList.getFObj().getName() + ", but no " - + "inherited or specified value found on the parent FO."); + if (!isInherited() && log.isWarnEnabled()) { + /* check whether explicit value is available on the parent + * (for inherited properties, an inherited value will always + * be available) + */ + Property parentExplicit = propertyList.getParentPropertyList() + .getExplicit(getPropId()); + if (parentExplicit == null) { + log.warn(FOPropertyMapping.getPropertyName(getPropId()) + + "=\"inherit\" on " + propertyList.getFObj().getName() + + ", but no explicit value found on the parent FO."); + } } } else { // Check for keyword shorthand values to be substituted. |