From a451826fa5cc43b87ae977c42c362cbf11e1faed Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Wed, 15 Feb 2006 13:07:57 +0000 Subject: [PATCH] Added default empty String to the border shorthand. Avoids NPE mentioned in Bugzilla 38648. Still need to add a warning, since property now silently falls back to the default(s). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@378003 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/FOPropertyMapping.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/java/org/apache/fop/fo/FOPropertyMapping.java b/src/java/org/apache/fop/fo/FOPropertyMapping.java index 0e8a21f80..afa83e99c 100644 --- a/src/java/org/apache/fop/fo/FOPropertyMapping.java +++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java @@ -2623,6 +2623,9 @@ public class FOPropertyMapping implements Constants { // background-position m = new ListProperty.Maker(PR_BACKGROUND_POSITION); m.setInherited(false); + m.addKeyword("left", "0% 50%"); + m.addKeyword("center", "50% 50%"); + m.addKeyword("right", "100% 50%"); m.setDefault("0% 0%"); m.setDatatypeParser(new BackgroundPositionShorthandParser()); addPropertyMaker("background-position", m); @@ -2630,6 +2633,7 @@ public class FOPropertyMapping implements Constants { // border m = new ListProperty.Maker(PR_BORDER); m.setInherited(false); + m.setDefault(""); m.setDatatypeParser(new GenericShorthandParser()); addPropertyMaker("border", m); -- 2.39.5