xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adelme...@apache.org
Subject svn commit: r378709 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java
Date Sat, 18 Feb 2006 10:24:28 GMT
Author: adelmelle
Date: Sat Feb 18 02:24:22 2006
New Revision: 378709

URL: http://svn.apache.org/viewcvs?rev=378709&view=rev
Log:
Tweak: modified warning to occur only for non-inherited props where the parent fo doesn't
have an explicit value

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java?rev=378709&r1=378708&r2=378709&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java Sat Feb
18 02:24:22 2006
@@ -413,11 +413,18 @@
                 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. 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message