pbwest 2002/12/02 23:31:26
Modified: src/org/apache/fop/fo/declarations Tag:
FOP_0-20-0_Alt-Design FoColorProfile.java
FoDeclarations.java
Log:
sparsePropsMap changed from HashMap to int[].
Revision Changes Path
No revision
No revision
1.1.2.3 +6 -6
xml-fop/src/org/apache/fop/fo/declarations/Attic/FoColorProfile.java
Index: FoColorProfile.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/org/apache/fop/fo/declarations/Attic/FoColorProfile.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- FoColorProfile.java 22 Nov 2002 02:17:22 -0000 1.1.2.2
+++ FoColorProfile.java 3 Dec 2002 07:31:25 -0000 1.1.2.3
@@ -38,7 +38,7 @@
position in the <i>sparsePropsSet</i> array. See
{@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
*/
- private static final HashMap sparsePropsMap;
+ private static final int[] sparsePropsMap;
/** An <tt>int</tt> array of of the applicable property indices, in
property index order. */
@@ -59,7 +59,7 @@
// sparsePropsSet is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- sparsePropsMap = new HashMap();
+ sparsePropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
numProps = propsets.cardinality();
sparseIndices = new int[numProps];
int propx = 0;
@@ -67,8 +67,8 @@
next >= 0;
next = propsets.nextSetBit(next + 1)) {
sparseIndices[propx] = next;
- sparsePropsMap.put
- (Ints.consts.get(next), Ints.consts.get(propx++));
+ sparsePropsMap
+ [next] = propx++;
}
}
1.1.2.4 +8 -5
xml-fop/src/org/apache/fop/fo/declarations/Attic/FoDeclarations.java
Index: FoDeclarations.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/org/apache/fop/fo/declarations/Attic/FoDeclarations.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- FoDeclarations.java 1 Dec 2002 14:42:04 -0000 1.1.2.3
+++ FoDeclarations.java 3 Dec 2002 07:31:25 -0000 1.1.2.4
@@ -1,10 +1,12 @@
package org.apache.fop.fo.declarations;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.fop.apps.FOPException;
+import org.apache.fop.fo.PropNames;
import org.apache.fop.fo.FObjectNames;
import org.apache.fop.fo.FOTree;
import org.apache.fop.fo.FONode;
@@ -39,7 +41,7 @@
position in the <i>sparsePropsSet</i> array. See
{@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
*/
- private static final HashMap sparsePropsMap;
+ private static final int[] sparsePropsMap;
/** An <tt>int</tt> array of of the applicable property indices, in
property index order. */
@@ -53,7 +55,8 @@
// applicableProps is a HashMap containing the indicies of the
// sparsePropsSet array, indexed by the FO index of the FO slot
// in sparsePropsSet.
- sparsePropsMap = new HashMap(0);
+ sparsePropsMap = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+ Arrays.fill(sparsePropsMap, -1);
numProps = 0;
sparseIndices = new int[] {};
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]