aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2006-06-08 10:09:15 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2006-06-08 10:09:15 +0000
commit18339cc4341fb12e5988b531047c9a2259784003 (patch)
tree31ee80a2e9c624f4cc5d753089384eead62e77f1 /src/java/org/apache/fop
parent5ff1b803b56f09d4865704b16b7e58aff995077c (diff)
downloadxmlgraphics-fop-18339cc4341fb12e5988b531047c9a2259784003.tar.gz
xmlgraphics-fop-18339cc4341fb12e5988b531047c9a2259784003.zip
Bugfix: components of border-separation weren't set when using shorthand-mode, leading to an NPE being thrown (Bugzilla 39712)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@412714 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r--src/java/org/apache/fop/fo/FOPropertyMapping.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/fo/FOPropertyMapping.java b/src/java/org/apache/fop/fo/FOPropertyMapping.java
index c69f47f25..34c2591b5 100644
--- a/src/java/org/apache/fop/fo/FOPropertyMapping.java
+++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java
@@ -70,7 +70,7 @@ import org.apache.fop.fo.properties.WhiteSpaceShorthandParser;
*
* @todo Check multi-threading safety of the statics below
*/
-public class FOPropertyMapping implements Constants {
+public final class FOPropertyMapping implements Constants {
private static Map s_htPropNames = new HashMap();
private static Map s_htSubPropNames = new HashMap();
private static Map s_htPropIds = new HashMap();
@@ -247,7 +247,7 @@ public class FOPropertyMapping implements Constants {
* @param name name of the subproperty.
* @param id Id for the subproperty from CP_* in Constants.java.
*/
- public static void addSubpropMakerName(String name, int id) {
+ private static void addSubpropMakerName(String name, int id) {
s_htSubPropNames.put(name, new Integer(id));
s_htPropIds.put(new Integer(id), name);
}
@@ -1291,7 +1291,6 @@ public class FOPropertyMapping implements Constants {
PropertyMaker m;
LengthProperty.Maker l;
DimensionPropertyMaker pdim;
- CorrespondingPropertyMaker corr;
// block-progression-dimension
m = new LengthRangeProperty.Maker(PR_BLOCK_PROGRESSION_DIMENSION);
@@ -2258,11 +2257,13 @@ public class FOPropertyMapping implements Constants {
sub = new LengthProperty.Maker(CP_BLOCK_PROGRESSION_DIRECTION);
sub.setDefault("0pt");
+ sub.setByShorthand(true);
m.addSubpropMaker(sub);
sub = new LengthProperty.Maker(CP_INLINE_PROGRESSION_DIRECTION);
sub.setDefault("0pt");
m.addSubpropMaker(sub);
+ sub.setByShorthand(true);
addPropertyMaker("border-separation", m);
// border-start-precedence
@@ -2497,8 +2498,10 @@ public class FOPropertyMapping implements Constants {
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.addKeyword("center", "50% 50%");
+ m.addKeyword("top", "50% 0%");
+ m.addKeyword("bottom", "50% 100%");
m.setDefault("0% 0%");
m.setDatatypeParser(new BackgroundPositionShorthandParser());
addPropertyMaker("background-position", m);