From 33b349a91d8906450a61f981db34a9ae4d7d0716 Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Sat, 18 Feb 2006 10:24:22 +0000 Subject: [PATCH] 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 --- .../apache/fop/fo/properties/PropertyMaker.java | 17 ++++++++++++----- 1 file 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. -- 2.39.5