diff options
-rw-r--r-- | src/java/org/apache/fop/fo/FOPropertyMapping.java | 7 | ||||
-rw-r--r-- | src/java/org/apache/fop/fo/properties/PropertyMaker.java | 14 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/fo/FOPropertyMapping.java b/src/java/org/apache/fop/fo/FOPropertyMapping.java index afa83e99c..476810715 100644 --- a/src/java/org/apache/fop/fo/FOPropertyMapping.java +++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java @@ -2640,30 +2640,35 @@ public class FOPropertyMapping implements Constants { // border-bottom m = new ListProperty.Maker(PR_BORDER_BOTTOM); m.setInherited(false); + m.setDefault(""); m.setDatatypeParser(new GenericShorthandParser()); addPropertyMaker("border-bottom", m); // border-color m = new ListProperty.Maker(PR_BORDER_COLOR); m.setInherited(false); + m.setDefault(""); m.setDatatypeParser(new BoxPropShorthandParser()); addPropertyMaker("border-color", m); // border-left m = new ListProperty.Maker(PR_BORDER_LEFT); m.setInherited(false); + m.setDefault(""); m.setDatatypeParser(new GenericShorthandParser()); addPropertyMaker("border-left", m); // border-right m = new ListProperty.Maker(PR_BORDER_RIGHT); m.setInherited(false); + m.setDefault(""); m.setDatatypeParser(new GenericShorthandParser()); addPropertyMaker("border-right", m); // border-style m = new ListProperty.Maker(PR_BORDER_STYLE); m.setInherited(false); + m.setDefault(""); m.setDatatypeParser(new BoxPropShorthandParser()); addPropertyMaker("border-style", m); @@ -2677,12 +2682,14 @@ public class FOPropertyMapping implements Constants { // border-top m = new ListProperty.Maker(PR_BORDER_TOP); m.setInherited(false); + m.setDefault(""); m.setDatatypeParser(new GenericShorthandParser()); addPropertyMaker("border-top", m); // border-width m = new ListProperty.Maker(PR_BORDER_WIDTH); m.setInherited(false); + m.setDefault(""); m.setDatatypeParser(new BoxPropShorthandParser()); addPropertyMaker("border-width", m); diff --git a/src/java/org/apache/fop/fo/properties/PropertyMaker.java b/src/java/org/apache/fop/fo/properties/PropertyMaker.java index caf9f87bb..d46950a45 100644 --- a/src/java/org/apache/fop/fo/properties/PropertyMaker.java +++ b/src/java/org/apache/fop/fo/properties/PropertyMaker.java @@ -413,6 +413,12 @@ 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."); + } } else { // Check for keyword shorthand values to be substituted. pvalue = checkValueKeywords(pvalue); @@ -477,13 +483,13 @@ public class PropertyMaker implements Cloneable { // If value is a name token, may be keyword or Enum String sval = prop.getNCname(); if (sval != null) { - log.debug("Convert shorthand ncname " + sval); + //log.debug("Convert shorthand ncname " + sval); pret = checkEnumValues(sval); if (pret == null) { /* Check for keyword shorthand values to be substituted. */ String pvalue = checkValueKeywords(sval); if (!pvalue.equals(sval)) { - log.debug("Convert shorthand keyword" + pvalue); + //log.debug("Convert shorthand keyword" + pvalue); // Substituted a value: must parse it Property p = PropertyParser.parse(pvalue, new PropertyInfo(this, @@ -525,8 +531,8 @@ public class PropertyMaker implements Cloneable { * file specifies a length value equivalent for these keywords, * such as "0.5pt" for "thin". * @param keyword the string value of property attribute. - * @return a String containing a parseable equivalent or null if - * the passed value isn't a keyword initializer for this Property. + * @return a String containing a parseable equivalent or null if + * the passed value isn't a keyword initializer for this Property */ protected String checkValueKeywords(String keyword) { if (keywords != null) { |