You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2007/12/05 18:36:13 UTC

svn commit: r601438 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontReader.java

Author: acumiskey
Date: Wed Dec  5 09:36:12 2007
New Revision: 601438

URL: http://svn.apache.org/viewvc?rev=601438&view=rev
Log:
Checkstyle fixes and cleanup

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontReader.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontReader.java?rev=601438&r1=601437&r2=601438&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontReader.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/fonts/AFPFontReader.java Wed Dec  5 09:36:12 2007
@@ -65,28 +65,28 @@
     private static final CharacterSetOrientation[] EMPTY_CSO_ARRAY = new CharacterSetOrientation[0];
 
     /** Codepage MO:DCA structured field. */
-    private static final byte[] CODEPAGE_SF = new byte[] { (byte) 0xD3,
-        (byte) 0xA8, (byte) 0x87 };
+    private static final byte[] CODEPAGE_SF = new byte[] {
+        (byte) 0xD3, (byte) 0xA8, (byte) 0x87};
 
     /** Character table MO:DCA structured field. */
-    private static final byte[] CHARACTER_TABLE_SF = new byte[] { (byte) 0xD3,
-        (byte) 0x8C, (byte) 0x87 };
+    private static final byte[] CHARACTER_TABLE_SF = new byte[] {
+        (byte) 0xD3, (byte) 0x8C, (byte) 0x87};
 
     /** Font control MO:DCA structured field. */
-    private static final byte[] FONT_CONTROL_SF = new byte[] { (byte) 0xD3,
-        (byte) 0xA7, (byte) 0x89 };
+    private static final byte[] FONT_CONTROL_SF = new byte[] {
+        (byte) 0xD3, (byte) 0xA7, (byte) 0x89 };
 
     /** Font orientation MO:DCA structured field. */
-    private static final byte[] FONT_ORIENTATION_SF = new byte[] { (byte) 0xD3,
-        (byte) 0xAE, (byte) 0x89 };
+    private static final byte[] FONT_ORIENTATION_SF = new byte[] {
+        (byte) 0xD3, (byte) 0xAE, (byte) 0x89 };
 
     /** Font position MO:DCA structured field. */
-    private static final byte[] FONT_POSITION_SF = new byte[] { (byte) 0xD3,
-        (byte) 0xAC, (byte) 0x89 };
+    private static final byte[] FONT_POSITION_SF = new byte[] {
+        (byte) 0xD3, (byte) 0xAC, (byte) 0x89 };
 
     /** Font index MO:DCA structured field. */
-    private static final byte[] FONT_INDEX_SF = new byte[] { (byte) 0xD3,
-        (byte) 0x8C, (byte) 0x89 };
+    private static final byte[] FONT_INDEX_SF = new byte[] {
+        (byte) 0xD3, (byte) 0x8C, (byte) 0x89 };
 
     /**
      * The conversion factor to millipoints for 240 dpi
@@ -111,7 +111,7 @@
     /**
      * The collection of code pages
      */
-    private HashMap _codePages = new HashMap();
+    private HashMap codePages = new HashMap();
 
     /**
      * Load the font details and metrics into the CharacterSetMetric object,
@@ -134,11 +134,11 @@
             String cp = new String(characterSet.getCodePage());
             String path = characterSet.getPath();
 
-            HashMap codepage = (HashMap) _codePages.get(cp);
+            HashMap codepage = (HashMap) codePages.get(cp);
 
             if (codepage == null) {
                 codepage = loadCodePage(cp, characterSet.getEncoding(), path);
-                _codePages.put(cp, codepage);
+                codePages.put(cp, codepage);
             }
 
             /**
@@ -243,7 +243,7 @@
      *            the encoding to use for the character decoding
      */
     private static HashMap loadCodePage(String codePage, String encoding,
-        String path) throws IOException, FileNotFoundException {
+        String path) throws IOException {
 
         // Create the HashMap to store code page information
         HashMap codepages = new HashMap();
@@ -271,7 +271,6 @@
                 log.error(msg);
                 throw new FileNotFoundException(msg);
             }
-
         }
 
         File directory = new File(url.getPath());
@@ -330,7 +329,7 @@
                 String gcgiString = new String(gcgiBytes,
                     AFPConstants.EBCIDIC_ENCODING);
                 String charString = new String(charBytes, encoding);
-                int value = charString.charAt(0);
+//                int value = charString.charAt(0);
                 codepages.put(gcgiString, charString);
             } else {
                 position++;
@@ -358,7 +357,7 @@
 
         byte[] fncData = sfr.getNext(FONT_CONTROL_SF);
 
-        int position = 0;
+//        int position = 0;
 
         FontControl fontControl = new AFPFontReader().new FontControl();
 
@@ -590,16 +589,16 @@
 
     private class FontControl {
 
-        private int _dpi;
+        private int dpi;
 
         private boolean isRelative = false;
 
         public int getDpi() {
-            return _dpi;
+            return dpi;
         }
 
         public void setDpi(int i) {
-            _dpi = i;
+            dpi = i;
         }
 
         public boolean isRelative() {



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org