From: Andreas L. Delmelle Date: Sat, 18 Feb 2006 10:24:22 +0000 (+0000) Subject: Tweak: modified warning to occur only for non-inherited props where the parent fo... X-Git-Tag: fop-0_92-beta~112 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=33b349a91d8906450a61f981db34a9ae4d7d0716;p=xmlgraphics-fop.git 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 --- 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.