]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Tweak: modified warning to occur only for non-inherited props where the parent fo...
authorAndreas L. Delmelle <adelmelle@apache.org>
Sat, 18 Feb 2006 10:24:22 +0000 (10:24 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Sat, 18 Feb 2006 10:24:22 +0000 (10:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@378709 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/properties/PropertyMaker.java

index d46950a457bc815abc9d1d208fbd75878e58bd48..db6b4fb47e95a2c2a5b02f61c43c8e277c4b0898 100644 (file)
@@ -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.