From 92052e54ca7ead14a80359efccf13e42b560d482 Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Tue, 17 Sep 2002 09:28:59 +0000 Subject: [PATCH] updated to java2 collections git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195206 13f79535-47bb-0310-9956-ffa450edef68 --- src/codegen/code-point-mapping.xsl | 8 +++++--- src/codegen/foproperties.xml | 13 +++++++++++-- src/codegen/properties.xsl | 6 +++--- src/codegen/t1font-file.xsl | 10 +++++----- src/codegen/ttffontfile.xsl | 10 +++++----- 5 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/codegen/code-point-mapping.xsl b/src/codegen/code-point-mapping.xsl index ab4f26da9..32fc7cf9d 100644 --- a/src/codegen/code-point-mapping.xsl +++ b/src/codegen/code-point-mapping.xsl @@ -6,7 +6,9 @@ package org.apache.fop.render.pdf; -import java.util.Hashtable; +import java.util.Map; +import java.util.HashMap; +import java.util.Collections; public class CodePointMapping { private char[] latin1Map; @@ -61,9 +63,9 @@ public class CodePointMapping { } } - private static Hashtable mappings; + private static Map mappings; static { - mappings = new Hashtable(); + mappings = Collections.synchronizedMap(new HashMap()); } public static CodePointMapping getMapping(String encoding) { CodePointMapping mapping = (CodePointMapping) mappings.get(encoding); diff --git a/src/codegen/foproperties.xml b/src/codegen/foproperties.xml index a9253de3d..f245124bd 100644 --- a/src/codegen/foproperties.xml +++ b/src/codegen/foproperties.xml @@ -233,7 +233,6 @@ auto fixed absolute - inherit auto @@ -1848,7 +1847,17 @@ caption-side true - ToBeImplemented + Enum + + before + after + start + end + top + bottom + left + right + before diff --git a/src/codegen/properties.xsl b/src/codegen/properties.xsl index 62d2440c9..fb7e65be0 100644 --- a/src/codegen/properties.xsl +++ b/src/codegen/properties.xsl @@ -56,9 +56,9 @@ // Initialize hashtable of keywords - static Hashtable s_htKeywords; + static HashMap s_htKeywords; static { - s_htKeywords = new Hashtable(); + s_htKeywords = new HashMap(); s_htKeywords.put("", ""); @@ -207,7 +207,7 @@ package org.apache.fop.fo.properties; -import java.util.Hashtable; +import java.util.HashMap; import org.apache.fop.datatypes.*; import org.apache.fop.fo.*; import org.apache.fop.apps.FOPException; diff --git a/src/codegen/t1font-file.xsl b/src/codegen/t1font-file.xsl index 27896d898..7f306fb07 100644 --- a/src/codegen/t1font-file.xsl +++ b/src/codegen/t1font-file.xsl @@ -27,7 +27,7 @@ import org.apache.fop.pdf.PDFT1Stream; import java.io.InputStream; import java.io.FileInputStream; import java.io.BufferedInputStream; -import java.util.Hashtable; +import java.util.HashMap; public class extends Font implements FontDescriptor { private final static String fontName = ""; @@ -51,24 +51,24 @@ public class extends Font implements FontDes private final static int firstChar = ; private final static int lastChar = ; private final static int[] width; - private final static Hashtable kerning=new Hashtable(); + private final static HashMap kerning=new HashMap(); static { width = new int[256]; width[] = ; - Hashtable tmptable; + HashMap tmptable; - tmptable=new Hashtable(); + tmptable=new HashMap(); tmptable.put(Glyphs.glyphToString(""), new Integer()); kerning.put(Glyphs.glyphToString(""), tmptable); } public final boolean hasKerningInfo() {return kerning.isEmpty();} - public final java.util.Hashtable getKerningInfo() {return kerning;} + public final java.util.HashMap getKerningInfo() {return kerning;} public byte getSubType() {return org.apache.fop.pdf.PDFFont.TYPE1;} public boolean isEmbeddable() { diff --git a/src/codegen/ttffontfile.xsl b/src/codegen/ttffontfile.xsl index 06930b8c9..5842d43dc 100644 --- a/src/codegen/ttffontfile.xsl +++ b/src/codegen/ttffontfile.xsl @@ -27,7 +27,7 @@ import org.apache.fop.pdf.PDFTTFStream; import java.io.InputStream; import java.io.FileInputStream; import java.io.BufferedInputStream; -import java.util.Hashtable; +import java.util.HashMap; public class extends Font implements FontDescriptor { private final static String fontName = ""; @@ -52,24 +52,24 @@ public class extends Font implements FontDes private final static int firstChar = ; private final static int lastChar = ; private final static int[] width; - private final static Hashtable kerning=new Hashtable(); + private final static HashMap kerning=new HashMap(); static { width = new int[256]; width[] = ; - Hashtable tmptable; + HashMap tmptable; - tmptable=new Hashtable(); + tmptable=new HashMap(); tmptable.put(Glyphs.glyphToString(""), new Integer()); kerning.put(Glyphs.glyphToString(""), tmptable); } public final boolean hasKerningInfo() {return kerning.isEmpty();} - public final java.util.Hashtable getKerningInfo() {return kerning;} + public final java.util.HashMap getKerningInfo() {return kerning;} public byte getSubType() {return org.apache.fop.pdf.PDFFont.TRUETYPE;} public boolean isEmbeddable() { -- 2.39.5