From 1990735206ce7569d42065288d3d05300866b1e4 Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Wed, 30 Oct 2002 13:44:03 +0000 Subject: [PATCH] Removed applicableProps, getEndElement() and getPropertyValue(). Extends FoRegionBeforeAfter/FoRegionStartEnd. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195378 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/fo/pagination/FoRegionAfter.java | 30 +------------------ .../fop/fo/pagination/FoRegionBefore.java | 30 +------------------ .../apache/fop/fo/pagination/FoRegionEnd.java | 29 +----------------- .../fop/fo/pagination/FoRegionStart.java | 30 +------------------ 4 files changed, 4 insertions(+), 115 deletions(-) diff --git a/src/org/apache/fop/fo/pagination/FoRegionAfter.java b/src/org/apache/fop/fo/pagination/FoRegionAfter.java index be9eada76..3131601e1 100644 --- a/src/org/apache/fop/fo/pagination/FoRegionAfter.java +++ b/src/org/apache/fop/fo/pagination/FoRegionAfter.java @@ -10,10 +10,6 @@ package org.apache.fop.fo.pagination; // FOP -import org.apache.fop.fo.FOAttributes; -import org.apache.fop.fo.PropNames; -import org.apache.fop.fo.FOPropertySets; -import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.FObjectNames; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTree; @@ -21,11 +17,6 @@ import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXMLEvent; import org.apache.fop.apps.FOPException; import org.apache.fop.datastructs.Tree; -import org.apache.fop.datatypes.PropertyValue; -import org.apache.fop.datatypes.Ints; - -import java.util.HashMap; -import java.util.BitSet; /** * Implements the fo:simple-page-master flow object @@ -35,11 +26,6 @@ public class FoRegionAfter extends FoRegionBeforeAfter { private static final String tag = "$Name$"; private static final String revision = "$Revision$"; - /** The array of applicable properties. Slots in this array are indexed - by values from the applicableProps HashMap. - It is effectively a sparse array of the set of properties. */ - private PropertyValue[] applicableProps; - /** * @param foTree the FO tree being built * @param parent the parent FONode of this node @@ -50,21 +36,7 @@ public class FoRegionAfter extends FoRegionBeforeAfter { throws Tree.TreeException, FOPException { super(foTree, FObjectNames.REGION_AFTER, parent, event); - applicableProps = new PropertyValue[numProps]; - FoXMLEvent ev = xmlevents.getEndElement(event); + makeSparsePropsSet(); } - /** - * Get a property value applying to this FO node. - * @param property - the int property index. - * @return the PropertyValue with the indicated property index. - */ - public PropertyValue getPropertyValue(int property) - throws PropertyException - { - return applicableProps[ - ((Integer) - (applicablePropsHash.get(Ints.consts.get(property)))).intValue() - ]; - } } diff --git a/src/org/apache/fop/fo/pagination/FoRegionBefore.java b/src/org/apache/fop/fo/pagination/FoRegionBefore.java index 09bdb29a2..dc45f8214 100644 --- a/src/org/apache/fop/fo/pagination/FoRegionBefore.java +++ b/src/org/apache/fop/fo/pagination/FoRegionBefore.java @@ -10,10 +10,6 @@ package org.apache.fop.fo.pagination; // FOP -import org.apache.fop.fo.FOAttributes; -import org.apache.fop.fo.PropNames; -import org.apache.fop.fo.FOPropertySets; -import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.FObjectNames; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTree; @@ -21,11 +17,6 @@ import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXMLEvent; import org.apache.fop.apps.FOPException; import org.apache.fop.datastructs.Tree; -import org.apache.fop.datatypes.PropertyValue; -import org.apache.fop.datatypes.Ints; - -import java.util.HashMap; -import java.util.BitSet; /** * Implements the fo:simple-page-master flow object @@ -35,11 +26,6 @@ public class FoRegionBefore extends FoRegionBeforeAfter { private static final String tag = "$Name$"; private static final String revision = "$Revision$"; - /** The array of applicable properties. Slots in this array are indexed - by values from the applicableProps HashMap. - It is effectively a sparse array of the set of properties. */ - private PropertyValue[] applicableProps; - /** * @param foTree the FO tree being built * @param parent the parent FONode of this node @@ -50,21 +36,7 @@ public class FoRegionBefore extends FoRegionBeforeAfter { throws Tree.TreeException, FOPException { super(foTree, FObjectNames.REGION_BEFORE, parent, event); - applicableProps = new PropertyValue[numProps]; - FoXMLEvent ev = xmlevents.getEndElement(event); + makeSparsePropsSet(); } - /** - * Get a property value applying to this FO node. - * @param property - the int property index. - * @return the PropertyValue with the indicated property index. - */ - public PropertyValue getPropertyValue(int property) - throws PropertyException - { - return applicableProps[ - ((Integer) - (applicablePropsHash.get(Ints.consts.get(property)))).intValue() - ]; - } } diff --git a/src/org/apache/fop/fo/pagination/FoRegionEnd.java b/src/org/apache/fop/fo/pagination/FoRegionEnd.java index 5cc95b255..7e653ff81 100644 --- a/src/org/apache/fop/fo/pagination/FoRegionEnd.java +++ b/src/org/apache/fop/fo/pagination/FoRegionEnd.java @@ -10,10 +10,6 @@ package org.apache.fop.fo.pagination; // FOP -import org.apache.fop.fo.FOAttributes; -import org.apache.fop.fo.PropNames; -import org.apache.fop.fo.FOPropertySets; -import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.FObjectNames; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTree; @@ -21,11 +17,7 @@ import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXMLEvent; import org.apache.fop.apps.FOPException; import org.apache.fop.datastructs.Tree; -import org.apache.fop.datatypes.PropertyValue; -import org.apache.fop.datatypes.Ints; -import java.util.HashMap; -import java.util.BitSet; /** * Implements the fo:simple-page-master flow object @@ -35,11 +27,6 @@ public class FoRegionEnd extends FoRegionStartEnd { private static final String tag = "$Name$"; private static final String revision = "$Revision$"; - /** The array of applicable properties. Slots in this array are indexed - by values from the applicableProps HashMap. - It is effectively a sparse array of the set of properties. */ - private PropertyValue[] applicableProps; - /** * @param foTree the FO tree being built * @param parent the parent FONode of this node @@ -50,21 +37,7 @@ public class FoRegionEnd extends FoRegionStartEnd { throws Tree.TreeException, FOPException { super(foTree, FObjectNames.REGION_END, parent, event); - applicableProps = new PropertyValue[numProps]; - FoXMLEvent ev = xmlevents.getEndElement(event); + makeSparsePropsSet(); } - /** - * Get a property value applying to this FO node. - * @param property - the int property index. - * @return the PropertyValue with the indicated property index. - */ - public PropertyValue getPropertyValue(int property) - throws PropertyException - { - return applicableProps[ - ((Integer) - (applicablePropsHash.get(Ints.consts.get(property)))).intValue() - ]; - } } diff --git a/src/org/apache/fop/fo/pagination/FoRegionStart.java b/src/org/apache/fop/fo/pagination/FoRegionStart.java index fb6f33c70..33aafa727 100644 --- a/src/org/apache/fop/fo/pagination/FoRegionStart.java +++ b/src/org/apache/fop/fo/pagination/FoRegionStart.java @@ -10,10 +10,6 @@ package org.apache.fop.fo.pagination; // FOP -import org.apache.fop.fo.FOAttributes; -import org.apache.fop.fo.PropNames; -import org.apache.fop.fo.FOPropertySets; -import org.apache.fop.fo.PropertySets; import org.apache.fop.fo.FObjectNames; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTree; @@ -21,11 +17,6 @@ import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.xml.FoXMLEvent; import org.apache.fop.apps.FOPException; import org.apache.fop.datastructs.Tree; -import org.apache.fop.datatypes.PropertyValue; -import org.apache.fop.datatypes.Ints; - -import java.util.HashMap; -import java.util.BitSet; /** * Implements the fo:simple-page-master flow object @@ -35,11 +26,6 @@ public class FoRegionStart extends FoRegionStartEnd { private static final String tag = "$Name$"; private static final String revision = "$Revision$"; - /** The array of applicable properties. Slots in this array are indexed - by values from the applicableProps HashMap. - It is effectively a sparse array of the set of properties. */ - private PropertyValue[] applicableProps; - /** * @param foTree the FO tree being built * @param parent the parent FONode of this node @@ -50,21 +36,7 @@ public class FoRegionStart extends FoRegionStartEnd { throws Tree.TreeException, FOPException { super(foTree, FObjectNames.REGION_START, parent, event); - applicableProps = new PropertyValue[numProps]; - FoXMLEvent ev = xmlevents.getEndElement(event); + makeSparsePropsSet(); } - /** - * Get a property value applying to this FO node. - * @param property - the int property index. - * @return the PropertyValue with the indicated property index. - */ - public PropertyValue getPropertyValue(int property) - throws PropertyException - { - return applicableProps[ - ((Integer) - (applicablePropsHash.get(Ints.consts.get(property)))).intValue() - ]; - } } -- 2.39.5