xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gad...@apache.org
Subject svn commit: r1296441 - in /xmlgraphics/fop/trunk: ./ src/codegen/unicode/java/org/apache/fop/hyphenation/ src/java/org/apache/fop/afp/goca/ src/java/org/apache/fop/complexscripts/fonts/ src/java/org/apache/fop/complexscripts/scripts/ src/java/org/apach...
Date Fri, 02 Mar 2012 20:40:09 GMT
Author: gadams
Date: Fri Mar  2 20:40:08 2012
New Revision: 1296441

URL: http://svn.apache.org/viewvc?rev=1296441&view=rev
Log:
enable OneStatementPerLine rule; fix violations

Modified:
    xmlgraphics/fop/trunk/checkstyle-5.5.xml
    xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphTable.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFUtil.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/XMLUtil.java

Modified: xmlgraphics/fop/trunk/checkstyle-5.5.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/checkstyle-5.5.xml?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/checkstyle-5.5.xml (original)
+++ xmlgraphics/fop/trunk/checkstyle-5.5.xml Fri Mar  2 20:40:08 2012
@@ -188,7 +188,7 @@
     <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
... ... ... ... ... -->
 
     <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
... ... ... ... ... -->
-    <!-- <module name="OneStatementPerLine"/> produces 43 new errors -->
+    <module name="OneStatementPerLine"/>
     <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
... ... ... ... ... -->
 
     <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
... ... ... ... ... -->

Modified: xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java
(original)
+++ xmlgraphics/fop/trunk/src/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java
Fri Mar  2 20:40:08 2012
@@ -151,8 +151,12 @@ public final class UnicodeClasses {
     /**
      * The column numbers in the UCD file
      */
-    public static final int UNICODE = 0, GENERAL_CATEGORY = 2, SIMPLE_UPPERCASE_MAPPING =
12,
-    SIMPLE_LOWERCASE_MAPPING = 13, SIMPLE_TITLECASE_MAPPING = 14, NUM_FIELDS = 15;
+    public static final int UNICODE = 0;
+    public static final int GENERAL_CATEGORY = 2;
+    public static final int SIMPLE_UPPERCASE_MAPPING = 12;
+    public static final int SIMPLE_LOWERCASE_MAPPING = 13;
+    public static final int SIMPLE_TITLECASE_MAPPING = 14;
+    public static final int NUM_FIELDS = 15;
 
     /**
      * Generate classes.xml from Unicode Character Database files

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java Fri
Mar  2 20:40:08 2012
@@ -44,7 +44,9 @@ public class GraphicsSetProcessColor ext
      * X'08' CIELAB
      * X'40' Standard OCA color space
      */
-    private static final byte RGB = 0x01, CMYK = 0x04, CIELAB = 0x08;
+    private static final byte RGB = 0x01;
+    private static final byte CMYK = 0x04;
+    private static final byte CIELAB = 0x08;
 
     private final Color color;
     private final int componentsSize;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java
Fri Mar  2 20:40:08 2012
@@ -256,7 +256,8 @@ public class GlyphProcessingState {
             if ( consumed == 0 ) {
                 consumed = 1;
             }
-            index += consumed; consumed = 0;
+            index += consumed;
+            consumed = 0;
             if ( index > indexLast ) {
                 index = indexLast;
             }
@@ -297,7 +298,8 @@ public class GlyphProcessingState {
             if ( consumed == 0 ) {
                 consumed = 1;
             }
-            index -= consumed; consumed = 0;
+            index -= consumed;
+            consumed = 0;
             if ( index < 0 ) {
                 index = 0;
             }
@@ -452,7 +454,8 @@ public class GlyphProcessingState {
             } else {
                 if ( ( ignoreTester == null ) || ! ignoreTester.test ( gi, getLookupFlags()
) ) {
                     if ( k < count ) {
-                        glyphs [ k++ ] = gi; counted++;
+                        glyphs [ k++ ] = gi;
+                        counted++;
                     } else {
                         break;
                     }
@@ -478,7 +481,8 @@ public class GlyphProcessingState {
             } else {
                 if ( ( ignoreTester == null ) || ! ignoreTester.test ( gi, getLookupFlags()
) ) {
                     if ( k < count ) {
-                        glyphs [ k++ ] = gi; counted++;
+                        glyphs [ k++ ] = gi;
+                        counted++;
                     } else {
                         break;
                     }
@@ -698,7 +702,8 @@ public class GlyphProcessingState {
             } else {
                 if ( ( ignoreTester == null ) || ! ignoreTester.test ( gi, getLookupFlags()
) ) {
                     if ( k < count ) {
-                        associations [ k++ ] = getAssociation ( i - index ); counted++;
+                        associations [ k++ ] = getAssociation ( i - index );
+                        counted++;
                     } else {
                         break;
                     }
@@ -725,7 +730,8 @@ public class GlyphProcessingState {
             } else {
                 if ( ( ignoreTester == null ) || ! ignoreTester.test ( gi, getLookupFlags()
) ) {
                     if ( k < count ) {
-                        associations [ k++ ] = getAssociation ( i - index ); counted++;
+                        associations [ k++ ] = getAssociation ( i - index );
+                        counted++;
                     } else {
                         break;
                     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphTable.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphTable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/GlyphTable.java Fri
Mar  2 20:40:08 2012
@@ -516,7 +516,8 @@ public class GlyphTable {
                     added = true;
                 } else if ( d == 0 ) {
                     // duplicate entry is ignored
-                    added = false; subtable = null;
+                    added = false;
+                    subtable = null;
                 }
             }
             // append at end of list

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
Fri Mar  2 20:40:08 2012
@@ -1680,11 +1680,23 @@ public final class OTFAdvancedTypographi
         int df = in.readTTFUShort();
         int s1, m1, dm, dd, s2;
         if ( df == 1 ) {
-            s1 = 14; m1 = 0x3; dm = 1; dd = 4; s2 = 2;
+            s1 = 14;
+            m1 = 0x3;
+            dm = 1;
+            dd = 4;
+            s2 = 2;
         } else if ( df == 2 ) {
-            s1 = 12; m1 = 0xF; dm = 7; dd = 16; s2 = 4;
+            s1 = 12;
+            m1 = 0xF;
+            dm = 7;
+            dd = 16;
+            s2 = 4;
         } else if ( df == 3 ) {
-            s1 = 8; m1 = 0xFF; dm = 127; dd = 256; s2 = 8;
+            s1 = 8;
+            m1 = 0xFF;
+            dm = 127;
+            dd = 256;
+            s2 = 8;
         } else {
             log.debug ( "unsupported device table delta format: " + df + ", ignoring device
table" );
             return null;
@@ -3760,7 +3772,9 @@ public final class OTFAdvancedTypographi
 
     private void resetATStateAll() {
         resetATState();
-        gdef = null; gsub = null; gpos = null;
+        gdef = null;
+        gsub = null;
+        gpos = null;
     }
 
     /** helper method for formatting an integer array for output */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DefaultScriptProcessor.java
Fri Mar  2 20:40:08 2012
@@ -105,27 +105,34 @@ public class DefaultScriptProcessor exte
                 int[] pa = ( gpa != null ) ? gpa [ i ] : null;
                 GlyphSequence.CharAssociation ca = aa [ i ];
                 if ( gdef.isGlyphClass ( gid, GlyphDefinitionTable.GLYPH_CLASS_MARK ) ) {
-                    nga [ k ] = gid; naa [ k ] = ca;
+                    nga [ k ] = gid;
+                    naa [ k ] = ca;
                     if ( npa != null ) {
                         npa [ k ] = pa;
                     }
                     k++;
                 } else {
                     if ( bg != -1 ) {
-                        nga [ k ] = bg; naa [ k ] = ba;
+                        nga [ k ] = bg;
+                        naa [ k ] = ba;
                         if ( npa != null ) {
                             npa [ k ] = bpa;
                         }
                         k++;
-                        bg = -1; ba = null; bpa = null;
+                        bg = -1;
+                        ba = null;
+                        bpa = null;
                     }
                     if ( bg == -1 ) {
-                        bg = gid; ba = ca; bpa = pa;
+                        bg = gid;
+                        ba = ca;
+                        bpa = pa;
                     }
                 }
             }
             if ( bg != -1 ) {
-                nga [ k ] = bg; naa [ k ] = ba;
+                nga [ k ] = bg;
+                naa [ k ] = ba;
                 if ( npa != null ) {
                     npa [ k ] = bpa;
                 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
Fri Mar  2 20:40:08 2012
@@ -222,11 +222,13 @@ public class DevanagariScriptProcessor e
                 int i;
                 // consume dead consonants
                 while ( ( i = isDeadConsonant ( ca, s, e ) ) > s ) {
-                    s = i; nd++;
+                    s = i;
+                    nd++;
                 }
                 // consume zero or one live consonant
                 if ( ( i = isLiveConsonant ( ca, s, e ) ) > s ) {
-                    s = i; nl++;
+                    s = i;
+                    nl++;
                 }
                 return ( ( nd > 0 ) || ( nl > 0 ) ) ? s : -1;
             }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
Fri Mar  2 20:40:08 2012
@@ -222,11 +222,13 @@ public class GujaratiScriptProcessor ext
                 int i;
                 // consume dead consonants
                 while ( ( i = isDeadConsonant ( ca, s, e ) ) > s ) {
-                    s = i; nd++;
+                    s = i;
+                    nd++;
                 }
                 // consume zero or one live consonant
                 if ( ( i = isLiveConsonant ( ca, s, e ) ) > s ) {
-                    s = i; nl++;
+                    s = i;
+                    nl++;
                 }
                 return ( ( nd > 0 ) || ( nl > 0 ) ) ? s : -1;
             }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
Fri Mar  2 20:40:08 2012
@@ -223,11 +223,13 @@ public class GurmukhiScriptProcessor ext
                 int i;
                 // consume dead consonants
                 while ( ( i = isDeadConsonant ( ca, s, e ) ) > s ) {
-                    s = i; nd++;
+                    s = i;
+                    nd++;
                 }
                 // consume zero or one live consonant
                 if ( ( i = isLiveConsonant ( ca, s, e ) ) > s ) {
-                    s = i; nl++;
+                    s = i;
+                    nl++;
                 }
                 return ( ( nd > 0 ) || ( nl > 0 ) ) ? s : -1;
             }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/complexscripts/util/CharScript.java Fri
Mar  2 20:40:08 2012
@@ -758,7 +758,8 @@ public final class CharScript {
                     assert v != null;
                     int c = v.intValue();
                     if ( c > cMax ) {
-                        cMax = c; sMax = s;
+                        cMax = c;
+                        sMax = s;
                     }
                     break;
                 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
Fri Mar  2 20:40:08 2012
@@ -712,7 +712,8 @@ public class TextLayoutManager extends L
                             for ( int k = 0; k < 4; k++ ) {
                                 int a = wpa2 [ k ];
                                 if ( a != 0 ) {
-                                    wpa1 [ k ] += a; adjusted = true;
+                                    wpa1 [ k ] += a;
+                                    adjusted = true;
                                 }
                             }
                         }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFUtil.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFUtil.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFUtil.java Fri Mar
 2 20:40:08 2012
@@ -345,7 +345,8 @@ public final class IFUtil {
      */
     public static void adjustPA ( int[] paDst, int[] paSrc ) {
         if ( ( paDst != null ) && ( paSrc != null ) ) {
-            assert paDst.length == 4; assert paSrc.length == 4;
+            assert paDst.length == 4;
+            assert paSrc.length == 4;
             for ( int i = 0; i < 4; i++ ) {
                 paDst[i] += paSrc[i];
             }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/util/XMLUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/XMLUtil.java?rev=1296441&r1=1296440&r2=1296441&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/util/XMLUtil.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/util/XMLUtil.java Fri Mar  2 20:40:08 2012
@@ -197,7 +197,8 @@ public final class XMLUtil implements XM
             for ( int k = 0; k < 4; k++ ) {
                 int a = pa [ k ];
                 if ( a != 0 ) {
-                    encodeNextAdjustment ( sb, nz, a ); nz = 0;
+                    encodeNextAdjustment ( sb, nz, a );
+                    nz = 0;
                 } else {
                     nz++;
                 }



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


Mime
View raw message