From: Peter Bernard West Date: Tue, 12 Nov 2002 01:39:42 +0000 (+0000) Subject: FONode arg added to getMappedLength calls. X-Git-Tag: Alt-Design_pre_src-java-org~140 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=66bb082995efadcc78d4d64aca24069052a258b7;p=xmlgraphics-fop.git FONode arg added to getMappedLength calls. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195503 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/fo/properties/BorderAfterWidth.java b/src/org/apache/fop/fo/properties/BorderAfterWidth.java index c4956427b..f058d86ff 100644 --- a/src/org/apache/fop/fo/properties/BorderAfterWidth.java +++ b/src/org/apache/fop/fo/properties/BorderAfterWidth.java @@ -5,6 +5,7 @@ import org.apache.fop.datatypes.Length; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.properties.BorderCommonWidth; public class BorderAfterWidth extends BorderCommonWidth { @@ -21,13 +22,13 @@ public class BorderAfterWidth extends BorderCommonWidth { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(MEDIUM); + return getMappedLength(null, MEDIUM); } - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { - return getMappedLength (PropNames.BORDER_AFTER_WIDTH, enum); + return getMappedLength(node, PropNames.BORDER_AFTER_WIDTH, enum); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderAfterWidthLength.java b/src/org/apache/fop/fo/properties/BorderAfterWidthLength.java index c215d3ed6..9a5442c3e 100644 --- a/src/org/apache/fop/fo/properties/BorderAfterWidthLength.java +++ b/src/org/apache/fop/fo/properties/BorderAfterWidthLength.java @@ -13,7 +13,7 @@ public class BorderAfterWidthLength extends BorderCommonWidth { throws PropertyException { return getMappedLength - (PropNames.BORDER_AFTER_WIDTH_LENGTH, MEDIUM); + (null, PropNames.BORDER_AFTER_WIDTH_LENGTH, MEDIUM); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderBeforeWidth.java b/src/org/apache/fop/fo/properties/BorderBeforeWidth.java index 65b1a2f07..3e89283ff 100644 --- a/src/org/apache/fop/fo/properties/BorderBeforeWidth.java +++ b/src/org/apache/fop/fo/properties/BorderBeforeWidth.java @@ -4,6 +4,7 @@ import org.apache.fop.datatypes.Numeric; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.properties.BorderCommonWidth; public class BorderBeforeWidth extends BorderCommonWidth { @@ -14,13 +15,13 @@ public class BorderBeforeWidth extends BorderCommonWidth { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(MEDIUM); + return getMappedLength(null, MEDIUM); } - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { - return getMappedLength(PropNames.BORDER_BEFORE_WIDTH, enum); + return getMappedLength(node, PropNames.BORDER_BEFORE_WIDTH, enum); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderBeforeWidthLength.java b/src/org/apache/fop/fo/properties/BorderBeforeWidthLength.java index a82855447..261f1c581 100644 --- a/src/org/apache/fop/fo/properties/BorderBeforeWidthLength.java +++ b/src/org/apache/fop/fo/properties/BorderBeforeWidthLength.java @@ -13,7 +13,7 @@ public class BorderBeforeWidthLength extends BorderCommonWidth { throws PropertyException { return getMappedLength - (PropNames.BORDER_BEFORE_WIDTH_LENGTH, MEDIUM); + (null, PropNames.BORDER_BEFORE_WIDTH_LENGTH, MEDIUM); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderBottomWidth.java b/src/org/apache/fop/fo/properties/BorderBottomWidth.java index a284cc021..5bf51c7cd 100644 --- a/src/org/apache/fop/fo/properties/BorderBottomWidth.java +++ b/src/org/apache/fop/fo/properties/BorderBottomWidth.java @@ -4,6 +4,7 @@ import org.apache.fop.datatypes.Numeric; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.properties.BorderCommonWidth; public class BorderBottomWidth extends BorderCommonWidth { @@ -13,13 +14,13 @@ public class BorderBottomWidth extends BorderCommonWidth { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(MEDIUM); + return getMappedLength(null, MEDIUM); } - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { - return getMappedLength(PropNames.BORDER_BOTTOM_WIDTH, enum); + return getMappedLength(node, PropNames.BORDER_BOTTOM_WIDTH, enum); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderCommonWidth.java b/src/org/apache/fop/fo/properties/BorderCommonWidth.java index 76990cd95..308b4acd4 100644 --- a/src/org/apache/fop/fo/properties/BorderCommonWidth.java +++ b/src/org/apache/fop/fo/properties/BorderCommonWidth.java @@ -3,6 +3,7 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.properties.Property; import org.apache.fop.datatypes.Length; import org.apache.fop.datatypes.Numeric; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.expr.PropertyException; /** @@ -37,7 +38,7 @@ public class BorderCommonWidth extends Property { * @return Numeric[] containing the values corresponding * to the MappedNumeric enumeration constants for border width */ - public Numeric getMappedLength(int property, int enum) + public Numeric getMappedLength(FONode node, int property, int enum) throws PropertyException { return diff --git a/src/org/apache/fop/fo/properties/BorderEndWidth.java b/src/org/apache/fop/fo/properties/BorderEndWidth.java index bd1e3e449..a0ee95e79 100644 --- a/src/org/apache/fop/fo/properties/BorderEndWidth.java +++ b/src/org/apache/fop/fo/properties/BorderEndWidth.java @@ -4,6 +4,7 @@ import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.datatypes.Numeric; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.properties.BorderCommonWidth; public class BorderEndWidth extends BorderCommonWidth { @@ -14,13 +15,13 @@ public class BorderEndWidth extends BorderCommonWidth { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(MEDIUM); + return getMappedLength(null, MEDIUM); } - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { - return getMappedLength(PropNames.BORDER_END_WIDTH, enum); + return getMappedLength(node, PropNames.BORDER_END_WIDTH, enum); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderEndWidthLength.java b/src/org/apache/fop/fo/properties/BorderEndWidthLength.java index dd48d0365..fb09fa44f 100644 --- a/src/org/apache/fop/fo/properties/BorderEndWidthLength.java +++ b/src/org/apache/fop/fo/properties/BorderEndWidthLength.java @@ -13,7 +13,7 @@ public class BorderEndWidthLength extends BorderCommonWidth { throws PropertyException { return getMappedLength - (PropNames.BORDER_END_WIDTH_LENGTH, MEDIUM); + (null, PropNames.BORDER_END_WIDTH_LENGTH, MEDIUM); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderLeftWidth.java b/src/org/apache/fop/fo/properties/BorderLeftWidth.java index 265fb2794..c372dfce8 100644 --- a/src/org/apache/fop/fo/properties/BorderLeftWidth.java +++ b/src/org/apache/fop/fo/properties/BorderLeftWidth.java @@ -4,6 +4,7 @@ import org.apache.fop.datatypes.Numeric; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.properties.BorderCommonWidth; public class BorderLeftWidth extends BorderCommonWidth { @@ -13,13 +14,13 @@ public class BorderLeftWidth extends BorderCommonWidth { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(MEDIUM); + return getMappedLength(null, MEDIUM); } - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { - return getMappedLength(PropNames.BORDER_LEFT_WIDTH, enum); + return getMappedLength(node, PropNames.BORDER_LEFT_WIDTH, enum); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderRightWidth.java b/src/org/apache/fop/fo/properties/BorderRightWidth.java index b8682d1cf..953cd5e6d 100644 --- a/src/org/apache/fop/fo/properties/BorderRightWidth.java +++ b/src/org/apache/fop/fo/properties/BorderRightWidth.java @@ -4,6 +4,7 @@ import org.apache.fop.datatypes.Numeric; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.properties.BorderCommonWidth; public class BorderRightWidth extends BorderCommonWidth { @@ -13,13 +14,13 @@ public class BorderRightWidth extends BorderCommonWidth { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(MEDIUM); + return getMappedLength(null, MEDIUM); } - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { - return getMappedLength(PropNames.BORDER_RIGHT_WIDTH, enum); + return getMappedLength(node, PropNames.BORDER_RIGHT_WIDTH, enum); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderStartWidth.java b/src/org/apache/fop/fo/properties/BorderStartWidth.java index ef5082bc7..99b5328b6 100644 --- a/src/org/apache/fop/fo/properties/BorderStartWidth.java +++ b/src/org/apache/fop/fo/properties/BorderStartWidth.java @@ -4,6 +4,7 @@ import org.apache.fop.datatypes.Numeric; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.properties.BorderCommonWidth; public class BorderStartWidth extends BorderCommonWidth { @@ -14,13 +15,13 @@ public class BorderStartWidth extends BorderCommonWidth { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(MEDIUM); + return getMappedLength(null, MEDIUM); } - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { - return getMappedLength(PropNames.BORDER_START_WIDTH, enum); + return getMappedLength(node, PropNames.BORDER_START_WIDTH, enum); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderStartWidthLength.java b/src/org/apache/fop/fo/properties/BorderStartWidthLength.java index 8f194c3c6..bcf65dc1e 100644 --- a/src/org/apache/fop/fo/properties/BorderStartWidthLength.java +++ b/src/org/apache/fop/fo/properties/BorderStartWidthLength.java @@ -13,7 +13,7 @@ public class BorderStartWidthLength extends BorderCommonWidth { throws PropertyException { return getMappedLength - (PropNames.BORDER_START_WIDTH_LENGTH, MEDIUM); + (null, PropNames.BORDER_START_WIDTH_LENGTH, MEDIUM); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderTopWidth.java b/src/org/apache/fop/fo/properties/BorderTopWidth.java index 4525b8078..3c0630636 100644 --- a/src/org/apache/fop/fo/properties/BorderTopWidth.java +++ b/src/org/apache/fop/fo/properties/BorderTopWidth.java @@ -4,6 +4,7 @@ import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.datatypes.Numeric; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.properties.BorderCommonWidth; public class BorderTopWidth extends BorderCommonWidth { @@ -13,13 +14,14 @@ public class BorderTopWidth extends BorderCommonWidth { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(MEDIUM); + System.out.println("In BorderTopWidth geInitialValue."); + return getMappedLength(null, MEDIUM); } - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { - return getMappedLength(PropNames.BORDER_TOP_WIDTH, enum); + return getMappedLength(node, PropNames.BORDER_TOP_WIDTH, enum); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/WordSpacing.java b/src/org/apache/fop/fo/properties/WordSpacing.java index c10409279..6414a4ed1 100644 --- a/src/org/apache/fop/fo/properties/WordSpacing.java +++ b/src/org/apache/fop/fo/properties/WordSpacing.java @@ -6,6 +6,7 @@ import org.apache.fop.datastructs.ROStringArray; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.properties.WordSpacingCommon; public class WordSpacing extends WordSpacingCommon { @@ -16,11 +17,11 @@ public class WordSpacing extends WordSpacingCommon { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(NORMAL); //normal + return getMappedLength(null, NORMAL); //null imples initial value } public static final int inherited = NO; - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { if (enum != NORMAL) diff --git a/src/org/apache/fop/fo/properties/WordSpacingMaximum.java b/src/org/apache/fop/fo/properties/WordSpacingMaximum.java index e6afe838c..cc1c3bfce 100644 --- a/src/org/apache/fop/fo/properties/WordSpacingMaximum.java +++ b/src/org/apache/fop/fo/properties/WordSpacingMaximum.java @@ -2,6 +2,7 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.datatypes.Numeric; import org.apache.fop.datatypes.Length; @@ -14,11 +15,11 @@ public class WordSpacingMaximum extends WordSpacingCommon { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(NORMAL); + return getMappedLength(null, NORMAL); // null implies initial value } public static final int inherited = COMPUTED; - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { if (enum != NORMAL) diff --git a/src/org/apache/fop/fo/properties/WordSpacingMinimum.java b/src/org/apache/fop/fo/properties/WordSpacingMinimum.java index dd428e73b..384366e21 100644 --- a/src/org/apache/fop/fo/properties/WordSpacingMinimum.java +++ b/src/org/apache/fop/fo/properties/WordSpacingMinimum.java @@ -2,6 +2,7 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.datatypes.Numeric; import org.apache.fop.datatypes.Length; @@ -14,11 +15,11 @@ public class WordSpacingMinimum extends WordSpacingCommon { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(WordSpacing.NORMAL); + return getMappedLength(null, NORMAL); // null implies initial value } public static final int inherited = COMPUTED; - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { if (enum != NORMAL) diff --git a/src/org/apache/fop/fo/properties/WordSpacingOptimum.java b/src/org/apache/fop/fo/properties/WordSpacingOptimum.java index 00e1fa426..9b0d60821 100644 --- a/src/org/apache/fop/fo/properties/WordSpacingOptimum.java +++ b/src/org/apache/fop/fo/properties/WordSpacingOptimum.java @@ -2,6 +2,7 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.FONode; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.datatypes.Numeric; import org.apache.fop.datatypes.Length; @@ -14,11 +15,11 @@ public class WordSpacingOptimum extends WordSpacingCommon { public PropertyValue getInitialValue(int property) throws PropertyException { - return getMappedLength(WordSpacing.NORMAL); + return getMappedLength(null, NORMAL); // null implies initial value } public static final int inherited = COMPUTED; - public Numeric getMappedLength(int enum) + public Numeric getMappedLength(FONode node, int enum) throws PropertyException { if (enum != NORMAL)