summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--checkstyle-5.5.xml2
-rw-r--r--src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiClass.java6
-rw-r--r--src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java4
-rw-r--r--src/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java8
-rw-r--r--src/codegen/unicode/java/org/apache/fop/text/linebreak/GenerateLineBreakUtils.java3
-rw-r--r--src/java/org/apache/fop/apps/FOURIResolver.java3
-rw-r--r--src/java/org/apache/fop/apps/FopFactoryConfigurator.java4
-rw-r--r--src/java/org/apache/fop/area/CTM.java13
-rw-r--r--src/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java4
-rw-r--r--src/java/org/apache/fop/complexscripts/fonts/GlyphCoverageTable.java4
-rw-r--r--src/java/org/apache/fop/complexscripts/fonts/GlyphMappingTable.java8
-rw-r--r--src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java24
-rw-r--r--src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java30
-rw-r--r--src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java6
-rw-r--r--src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java13
-rw-r--r--src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java13
-rw-r--r--src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java13
-rw-r--r--src/java/org/apache/fop/complexscripts/util/GlyphSequence.java6
-rw-r--r--src/java/org/apache/fop/fo/expr/ICCColorFunction.java4
-rw-r--r--src/java/org/apache/fop/fo/expr/NamedColorFunction.java4
-rw-r--r--src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java3
-rw-r--r--src/java/org/apache/fop/fo/properties/PropertyCache.java3
-rw-r--r--src/java/org/apache/fop/fonts/AbstractCodePointMapping.java3
-rw-r--r--src/java/org/apache/fop/fonts/MultiByteFont.java6
-rw-r--r--src/java/org/apache/fop/fonts/autodetect/WindowsFontDirFinder.java3
-rw-r--r--src/java/org/apache/fop/hyphenation/HyphenationTree.java6
-rw-r--r--src/java/org/apache/fop/hyphenation/TernaryTree.java7
-rw-r--r--src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java3
-rw-r--r--src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java3
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java3
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java6
-rw-r--r--src/java/org/apache/fop/pdf/PDFDocument.java3
-rw-r--r--src/java/org/apache/fop/render/intermediate/IFRenderer.java6
-rw-r--r--src/java/org/apache/fop/render/txt/TXTRenderer.java9
-rw-r--r--src/java/org/apache/fop/svg/PDFGraphics2D.java12
-rw-r--r--src/java/org/apache/fop/tools/anttasks/FileCompare.java3
-rw-r--r--src/java/org/apache/fop/util/ColorUtil.java8
-rw-r--r--src/java/org/apache/fop/util/XMLResourceBundle.java4
38 files changed, 186 insertions, 77 deletions
diff --git a/checkstyle-5.5.xml b/checkstyle-5.5.xml
index da4cc32d1..0e361ba8b 100644
--- a/checkstyle-5.5.xml
+++ b/checkstyle-5.5.xml
@@ -169,7 +169,7 @@
<!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
<!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
- <!-- <module name="MultipleVariableDeclarations"/> produces 78 new errors -->
+ <module name="MultipleVariableDeclarations"/>
<!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
<!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
diff --git a/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiClass.java b/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiClass.java
index 616ac1cae..6b1222011 100644
--- a/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiClass.java
+++ b/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiClass.java
@@ -211,7 +211,8 @@ public final class GenerateBidiClass {
}
}
// compile interval search data
- int ivIndex = 0, niv = intervals.size();
+ int ivIndex = 0;
+ int niv = intervals.size();
bcS1 = new int [ niv ];
bcE1 = new int [ niv ];
bcC1 = new byte [ niv ];
@@ -226,7 +227,8 @@ public final class GenerateBidiClass {
}
private static int[] parseInterval ( String interval ) throws Exception {
- int s, e;
+ int s;
+ int e;
String[] fa = interval.split("\\.\\.");
if ( fa.length == 1 ) {
s = Integer.parseInt ( fa[0], 16 );
diff --git a/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java b/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java
index e2fab1d94..c78880c74 100644
--- a/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java
+++ b/src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/GenerateBidiTestData.java
@@ -715,7 +715,9 @@ public final class GenerateBidiTestData {
rm.put ( Integer.valueOf ( r[0] ), Integer.valueOf ( r[1] ) );
}
// add complement ranges save last
- int s, e, cs = 0;
+ int s;
+ int e;
+ int cs = 0;
List compRanges = new ArrayList ( rm.size() + 1 );
for ( Iterator it = rm.entrySet().iterator(); it.hasNext(); ) {
Map.Entry/*<Integer,Integer>*/ me = (Map.Entry/*<Integer,Integer>*/) it.next();
diff --git a/src/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java b/src/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java
index 8a5327a0e..14b1828af 100644
--- a/src/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java
+++ b/src/codegen/unicode/java/org/apache/fop/hyphenation/UnicodeClasses.java
@@ -258,7 +258,8 @@ public final class UnicodeClasses {
continue;
}
- int uppercode = -1, titlecode = -1;
+ int uppercode = -1;
+ int titlecode = -1;
if (!"".equals(fields[SIMPLE_UPPERCASE_MAPPING])) {
uppercode = Integer.parseInt(fields[SIMPLE_UPPERCASE_MAPPING], 16);
}
@@ -355,7 +356,10 @@ public final class UnicodeClasses {
* @throws URISyntaxException if the input URI is incorrect
*/
public static void main(String[] args) throws IOException, URISyntaxException {
- String type = "ucd", prefix = "--", infile = null, outfile = null;
+ String type = "ucd";
+ String prefix = "--";
+ String infile = null;
+ String outfile = null;
boolean hexcode = false;
int i;
for (i = 0; i < args.length && args[i].startsWith(prefix); ++i) {
diff --git a/src/codegen/unicode/java/org/apache/fop/text/linebreak/GenerateLineBreakUtils.java b/src/codegen/unicode/java/org/apache/fop/text/linebreak/GenerateLineBreakUtils.java
index f4af3d915..9541f16ea 100644
--- a/src/codegen/unicode/java/org/apache/fop/text/linebreak/GenerateLineBreakUtils.java
+++ b/src/codegen/unicode/java/org/apache/fop/text/linebreak/GenerateLineBreakUtils.java
@@ -558,7 +558,8 @@ public final class GenerateLineBreakUtils {
throw new Exception(lineBreakFileName + ':' + lineNumber + ": Unknown property value in " + line);
}
String codepoint = line.substring(0, idx);
- int low, high;
+ int low;
+ int high;
idx = codepoint.indexOf("..");
try {
if (idx >= 0) {
diff --git a/src/java/org/apache/fop/apps/FOURIResolver.java b/src/java/org/apache/fop/apps/FOURIResolver.java
index c7d564ea3..a1d7fd673 100644
--- a/src/java/org/apache/fop/apps/FOURIResolver.java
+++ b/src/java/org/apache/fop/apps/FOURIResolver.java
@@ -183,7 +183,8 @@ public class FOURIResolver implements javax.xml.transform.URIResolver {
if (source == null) {
URL absoluteURL = null;
int hashPos = href.indexOf('#');
- String fileURL, fragment;
+ String fileURL;
+ String fragment;
if (hashPos >= 0) {
fileURL = href.substring(0, hashPos);
fragment = href.substring(hashPos);
diff --git a/src/java/org/apache/fop/apps/FopFactoryConfigurator.java b/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
index 4ed59d0fe..c1555a7e7 100644
--- a/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
+++ b/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
@@ -168,7 +168,9 @@ public class FopFactoryConfigurator {
if (hyphPatConfig.length != 0) {
Map/*<String,String>*/ hyphPatNames = new HashMap/*<String,String>*/();
for (int i = 0; i < hyphPatConfig.length; ++i) {
- String lang, country, filename;
+ String lang;
+ String country;
+ String filename;
StringBuffer error = new StringBuffer();
String location = hyphPatConfig[i].getLocation();
diff --git a/src/java/org/apache/fop/area/CTM.java b/src/java/org/apache/fop/area/CTM.java
index c247e6b76..4b6adb9dc 100644
--- a/src/java/org/apache/fop/area/CTM.java
+++ b/src/java/org/apache/fop/area/CTM.java
@@ -41,7 +41,12 @@ public class CTM implements Serializable {
private static final long serialVersionUID = -8743287485623778341L;
- private double a, b, c, d, e, f;
+ private double a;
+ private double b;
+ private double c;
+ private double d;
+ private double e;
+ private double f;
private static final CTM CTM_LRTB = new CTM(1, 0, 0, 1, 0, 0);
private static final CTM CTM_RLTB = new CTM(1, 0, 0, 1, 0, 0);
@@ -175,7 +180,8 @@ public class CTM implements Serializable {
* @return CTM The result of rotating this CTM.
*/
public CTM rotate(double angle) {
- double cos, sin;
+ double cos;
+ double sin;
if (angle == 90.0 || angle == -270.0) {
cos = 0.0;
sin = 1.0;
@@ -286,7 +292,8 @@ public class CTM implements Serializable {
WritingMode writingMode,
Rectangle2D absVPrect,
FODimension reldims) {
- int width, height;
+ int width;
+ int height;
// We will use the absolute reference-orientation to set up the CTM.
// The value here is relative to its ancestor reference area.
if (absRefOrient % 180 == 0) {
diff --git a/src/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java b/src/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java
index 88478531e..60ba6f864 100644
--- a/src/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java
+++ b/src/java/org/apache/fop/complexscripts/fonts/GlyphClassTable.java
@@ -203,7 +203,9 @@ public final class GlyphClassTable extends GlyphMappingTable implements GlyphCla
}
}
// extract glyph class array
- int i = 0, n = entries.size() - 1, gcMax = -1;
+ int i = 0;
+ int n = entries.size() - 1;
+ int gcMax = -1;
int[] gca = new int [ n ];
while ( it.hasNext() ) {
Object o = it.next();
diff --git a/src/java/org/apache/fop/complexscripts/fonts/GlyphCoverageTable.java b/src/java/org/apache/fop/complexscripts/fonts/GlyphCoverageTable.java
index a9b0fc2b5..dea92d8c1 100644
--- a/src/java/org/apache/fop/complexscripts/fonts/GlyphCoverageTable.java
+++ b/src/java/org/apache/fop/complexscripts/fonts/GlyphCoverageTable.java
@@ -174,7 +174,9 @@ public final class GlyphCoverageTable extends GlyphMappingTable implements Glyph
return getMappedIndex ( gid );
}
private void populate ( List entries ) {
- int i = 0, n = entries.size(), gidMax = -1;
+ int i = 0;
+ int n = entries.size();
+ int gidMax = -1;
int[] map = new int [ n ];
for ( Iterator it = entries.iterator(); it.hasNext();) {
Object o = it.next();
diff --git a/src/java/org/apache/fop/complexscripts/fonts/GlyphMappingTable.java b/src/java/org/apache/fop/complexscripts/fonts/GlyphMappingTable.java
index a0791e8f6..e7d67ce6a 100644
--- a/src/java/org/apache/fop/complexscripts/fonts/GlyphMappingTable.java
+++ b/src/java/org/apache/fop/complexscripts/fonts/GlyphMappingTable.java
@@ -157,7 +157,8 @@ public class GlyphMappingTable {
}
/** {@inheritDoc} */
public int getMappedIndex ( int gid ) {
- int i, mi;
+ int i;
+ int mi;
if ( ( i = Arrays.binarySearch ( sa, gid ) ) >= 0 ) {
mi = getMappedIndex ( gid, sa [ i ], ma [ i ] ); // matches start of (some) range
} else if ( ( i = - ( i + 1 ) ) == 0 ) {
@@ -179,7 +180,10 @@ public class GlyphMappingTable {
*/
public abstract int getMappedIndex ( int gid, int s, int m );
private void populate ( List entries ) {
- int i = 0, n = entries.size(), gidMax = -1, miMax = -1;
+ int i = 0;
+ int n = entries.size();
+ int gidMax = -1;
+ int miMax = -1;
int[] sa = new int [ n ];
int[] ea = new int [ n ];
int[] ma = new int [ n ];
diff --git a/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java b/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java
index f8ac4e504..01f78d2f2 100644
--- a/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java
+++ b/src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningTable.java
@@ -258,7 +258,8 @@ public class GlyphPositioningTable extends GlyphTable {
}
/** {@inheritDoc} */
public boolean position ( GlyphPositioningState ps ) {
- int gi = ps.getGlyph(), ci;
+ int gi = ps.getGlyph();
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) < 0 ) {
return false;
} else {
@@ -396,7 +397,8 @@ public class GlyphPositioningTable extends GlyphTable {
/** {@inheritDoc} */
public boolean position ( GlyphPositioningState ps ) {
boolean applied = false;
- int gi = ps.getGlyph(0), ci;
+ int gi = ps.getGlyph(0);
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) >= 0 ) {
int[] counts = ps.getGlyphsAvailable ( 0 );
int nga = counts[0];
@@ -587,7 +589,8 @@ public class GlyphPositioningTable extends GlyphTable {
/** {@inheritDoc} */
public boolean position ( GlyphPositioningState ps ) {
boolean applied = false;
- int gi = ps.getGlyph(0), ci;
+ int gi = ps.getGlyph(0);
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) >= 0 ) {
int[] counts = ps.getGlyphsAvailable ( 0 );
int nga = counts[0];
@@ -703,7 +706,8 @@ public class GlyphPositioningTable extends GlyphTable {
/** {@inheritDoc} */
public boolean position ( GlyphPositioningState ps ) {
boolean applied = false;
- int giMark = ps.getGlyph(), ciMark;
+ int giMark = ps.getGlyph();
+ int ciMark;
if ( ( ciMark = getCoverageIndex ( giMark ) ) >= 0 ) {
MarkAnchor ma = getMarkAnchor ( ciMark, giMark );
if ( ma != null ) {
@@ -846,7 +850,8 @@ public class GlyphPositioningTable extends GlyphTable {
/** {@inheritDoc} */
public boolean position ( GlyphPositioningState ps ) {
boolean applied = false;
- int giMark = ps.getGlyph(), ciMark;
+ int giMark = ps.getGlyph();
+ int ciMark;
if ( ( ciMark = getCoverageIndex ( giMark ) ) >= 0 ) {
MarkAnchor ma = getMarkAnchor ( ciMark, giMark );
int mxc = getMaxComponentCount();
@@ -1004,7 +1009,8 @@ public class GlyphPositioningTable extends GlyphTable {
/** {@inheritDoc} */
public boolean position ( GlyphPositioningState ps ) {
boolean applied = false;
- int giMark1 = ps.getGlyph(), ciMark1;
+ int giMark1 = ps.getGlyph();
+ int ciMark1;
if ( ( ciMark1 = getCoverageIndex ( giMark1 ) ) >= 0 ) {
MarkAnchor ma = getMark1Anchor ( ciMark1, giMark1 );
if ( ma != null ) {
@@ -1134,7 +1140,8 @@ public class GlyphPositioningTable extends GlyphTable {
/** {@inheritDoc} */
public boolean position ( GlyphPositioningState ps ) {
boolean applied = false;
- int gi = ps.getGlyph(), ci;
+ int gi = ps.getGlyph();
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) >= 0 ) {
int[] rv = new int[1];
RuleLookup[] la = getLookups ( ci, gi, ps, rv );
@@ -1460,7 +1467,8 @@ public class GlyphPositioningTable extends GlyphTable {
/** {@inheritDoc} */
public boolean position ( GlyphPositioningState ps ) {
boolean applied = false;
- int gi = ps.getGlyph(), ci;
+ int gi = ps.getGlyph();
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) >= 0 ) {
int[] rv = new int[1];
RuleLookup[] la = getLookups ( ci, gi, ps, rv );
diff --git a/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java b/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java
index 1b724a63b..b6db2fb47 100644
--- a/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java
+++ b/src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionTable.java
@@ -246,7 +246,8 @@ public class GlyphSubstitutionTable extends GlyphTable {
}
/** {@inheritDoc} */
public boolean substitute ( GlyphSubstitutionState ss ) {
- int gi = ss.getGlyph(), ci;
+ int gi = ss.getGlyph();
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) < 0 ) {
return false;
} else {
@@ -341,7 +342,8 @@ public class GlyphSubstitutionTable extends GlyphTable {
}
}
private void populate ( List entries ) {
- int i = 0, n = entries.size();
+ int i = 0;
+ int n = entries.size();
int[] glyphs = new int [ n ];
for ( Iterator it = entries.iterator(); it.hasNext();) {
Object o = it.next();
@@ -376,7 +378,8 @@ public class GlyphSubstitutionTable extends GlyphTable {
}
/** {@inheritDoc} */
public boolean substitute ( GlyphSubstitutionState ss ) {
- int gi = ss.getGlyph(), ci;
+ int gi = ss.getGlyph();
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) < 0 ) {
return false;
} else {
@@ -461,7 +464,8 @@ public class GlyphSubstitutionTable extends GlyphTable {
}
/** {@inheritDoc} */
public boolean substitute ( GlyphSubstitutionState ss ) {
- int gi = ss.getGlyph(), ci;
+ int gi = ss.getGlyph();
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) < 0 ) {
return false;
} else {
@@ -523,7 +527,8 @@ public class GlyphSubstitutionTable extends GlyphTable {
}
}
private void populate ( List entries ) {
- int i = 0, n = entries.size();
+ int i = 0;
+ int n = entries.size();
int[][] gaa = new int [ n ][];
for ( Iterator it = entries.iterator(); it.hasNext();) {
Object o = it.next();
@@ -553,7 +558,8 @@ public class GlyphSubstitutionTable extends GlyphTable {
}
/** {@inheritDoc} */
public boolean substitute ( GlyphSubstitutionState ss ) {
- int gi = ss.getGlyph(), ci;
+ int gi = ss.getGlyph();
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) < 0 ) {
return false;
} else {
@@ -562,7 +568,8 @@ public class GlyphSubstitutionTable extends GlyphTable {
boolean reverse = false;
GlyphTester ignores = ss.getIgnoreDefault();
int[] counts = ss.getGlyphsAvailable ( 0, reverse, ignores );
- int nga = counts[0], ngi;
+ int nga = counts[0];
+ int ngi;
if ( nga > 1 ) {
int[] iga = ss.getGlyphs ( 0, nga, reverse, ignores, null, counts );
Ligature l = findLigature ( ls, iga );
@@ -653,7 +660,8 @@ public class GlyphSubstitutionTable extends GlyphTable {
}
}
private void populate ( List entries ) {
- int i = 0, n = entries.size();
+ int i = 0;
+ int n = entries.size();
LigatureSet[] ligatureSets = new LigatureSet [ n ];
for ( Iterator it = entries.iterator(); it.hasNext();) {
Object o = it.next();
@@ -683,7 +691,8 @@ public class GlyphSubstitutionTable extends GlyphTable {
}
/** {@inheritDoc} */
public boolean substitute ( GlyphSubstitutionState ss ) {
- int gi = ss.getGlyph(), ci;
+ int gi = ss.getGlyph();
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) < 0 ) {
return false;
} else {
@@ -1009,7 +1018,8 @@ public class GlyphSubstitutionTable extends GlyphTable {
}
/** {@inheritDoc} */
public boolean substitute ( GlyphSubstitutionState ss ) {
- int gi = ss.getGlyph(), ci;
+ int gi = ss.getGlyph();
+ int ci;
if ( ( ci = getCoverageIndex ( gi ) ) < 0 ) {
return false;
} else {
diff --git a/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java b/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
index c33cf140e..1de69c459 100644
--- a/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
+++ b/src/java/org/apache/fop/complexscripts/fonts/OTFAdvancedTypographicTableReader.java
@@ -1678,7 +1678,11 @@ public final class OTFAdvancedTypographicTableReader {
int es = in.readTTFUShort();
// read delta format
int df = in.readTTFUShort();
- int s1, m1, dm, dd, s2;
+ int s1;
+ int m1;
+ int dm;
+ int dd;
+ int s2;
if ( df == 1 ) {
s1 = 14;
m1 = 0x3;
diff --git a/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java b/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
index f3f366ff3..58bfae734 100644
--- a/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
+++ b/src/java/org/apache/fop/complexscripts/scripts/DevanagariScriptProcessor.java
@@ -238,8 +238,10 @@ public class DevanagariScriptProcessor extends IndicScriptProcessor {
if ( s < 0 ) {
return -1;
} else {
- int c, i = 0;
- int nc = 0, nh = 0;
+ int c;
+ int i = 0;
+ int nc = 0;
+ int nh = 0;
do {
// C
if ( ( s + i ) < e ) {
@@ -277,8 +279,11 @@ public class DevanagariScriptProcessor extends IndicScriptProcessor {
if ( s < 0 ) {
return -1;
} else {
- int c, i = 0;
- int nc = 0, nv = 0, nx = 0;
+ int c;
+ int i = 0;
+ int nc = 0;
+ int nv = 0;
+ int nx = 0;
do {
// C
if ( ( s + i ) < e ) {
diff --git a/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java b/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
index aba4caabb..7d1af5366 100644
--- a/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
+++ b/src/java/org/apache/fop/complexscripts/scripts/GujaratiScriptProcessor.java
@@ -238,8 +238,10 @@ public class GujaratiScriptProcessor extends IndicScriptProcessor {
if ( s < 0 ) {
return -1;
} else {
- int c, i = 0;
- int nc = 0, nh = 0;
+ int c;
+ int i = 0;
+ int nc = 0;
+ int nh = 0;
do {
// C
if ( ( s + i ) < e ) {
@@ -277,8 +279,11 @@ public class GujaratiScriptProcessor extends IndicScriptProcessor {
if ( s < 0 ) {
return -1;
} else {
- int c, i = 0;
- int nc = 0, nv = 0, nx = 0;
+ int c;
+ int i = 0;
+ int nc = 0;
+ int nv = 0;
+ int nx = 0;
do {
// C
if ( ( s + i ) < e ) {
diff --git a/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java b/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
index 479f8d152..f5be626a0 100644
--- a/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
+++ b/src/java/org/apache/fop/complexscripts/scripts/GurmukhiScriptProcessor.java
@@ -239,8 +239,10 @@ public class GurmukhiScriptProcessor extends IndicScriptProcessor {
if ( s < 0 ) {
return -1;
} else {
- int c, i = 0;
- int nc = 0, nh = 0;
+ int c;
+ int i = 0;
+ int nc = 0;
+ int nh = 0;
do {
// C
if ( ( s + i ) < e ) {
@@ -278,8 +280,11 @@ public class GurmukhiScriptProcessor extends IndicScriptProcessor {
if ( s < 0 ) {
return -1;
} else {
- int c, i = 0;
- int nc = 0, nv = 0, nx = 0;
+ int c;
+ int i = 0;
+ int nc = 0;
+ int nv = 0;
+ int nx = 0;
do {
// C
if ( ( s + i ) < e ) {
diff --git a/src/java/org/apache/fop/complexscripts/util/GlyphSequence.java b/src/java/org/apache/fop/complexscripts/util/GlyphSequence.java
index 0e256241d..e4316d596 100644
--- a/src/java/org/apache/fop/complexscripts/util/GlyphSequence.java
+++ b/src/java/org/apache/fop/complexscripts/util/GlyphSequence.java
@@ -1033,7 +1033,11 @@ public class GlyphSequence implements Cloneable {
*/
private static int[] mergeIntervals ( int[] ia ) {
int ni = ia.length;
- int i, n, nm, is, ie;
+ int i;
+ int n;
+ int nm;
+ int is;
+ int ie;
// count merged sub-intervals
for ( i = 0, n = ni, nm = 0, is = ie = -1; i < n; i += 2 ) {
int s = ia [ i + 0 ];
diff --git a/src/java/org/apache/fop/fo/expr/ICCColorFunction.java b/src/java/org/apache/fop/fo/expr/ICCColorFunction.java
index eaf932961..756de1b20 100644
--- a/src/java/org/apache/fop/fo/expr/ICCColorFunction.java
+++ b/src/java/org/apache/fop/fo/expr/ICCColorFunction.java
@@ -79,7 +79,9 @@ class ICCColorFunction extends FunctionBase {
}
String src = (cp != null ? cp.getSrc() : "");
- float red = 0, green = 0, blue = 0;
+ float red = 0;
+ float green = 0;
+ float blue = 0;
red = args[0].getNumber().floatValue();
green = args[1].getNumber().floatValue();
blue = args[2].getNumber().floatValue();
diff --git a/src/java/org/apache/fop/fo/expr/NamedColorFunction.java b/src/java/org/apache/fop/fo/expr/NamedColorFunction.java
index e4f8bc643..f2ff19ef1 100644
--- a/src/java/org/apache/fop/fo/expr/NamedColorFunction.java
+++ b/src/java/org/apache/fop/fo/expr/NamedColorFunction.java
@@ -66,7 +66,9 @@ class NamedColorFunction extends FunctionBase {
throw pe;
}
- float red = 0, green = 0, blue = 0;
+ float red = 0;
+ float green = 0;
+ float blue = 0;
red = args[0].getNumber().floatValue();
green = args[1].getNumber().floatValue();
blue = args[2].getNumber().floatValue();
diff --git a/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java b/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
index 883070056..10fde01b6 100644
--- a/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
+++ b/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
@@ -223,7 +223,8 @@ public class RelativeNumericProperty extends Property implements Length {
* specification.
*/
public double getTableUnits() {
- double tu1 = 0.0, tu2 = 0.0;
+ double tu1 = 0.0;
+ double tu2 = 0.0;
if (op1 instanceof RelativeNumericProperty) {
tu1 = ((RelativeNumericProperty) op1).getTableUnits();
} else if (op1 instanceof TableColLength) {
diff --git a/src/java/org/apache/fop/fo/properties/PropertyCache.java b/src/java/org/apache/fop/fo/properties/PropertyCache.java
index 920125796..8bd1d847f 100644
--- a/src/java/org/apache/fop/fo/properties/PropertyCache.java
+++ b/src/java/org/apache/fop/fo/properties/PropertyCache.java
@@ -263,7 +263,8 @@ public final class PropertyCache {
CacheEntry[] newTable = new CacheEntry[newLength];
- int hash, idx;
+ int hash;
+ int idx;
Object o;
newLength--;
for (int i = table.length; --i >= 0;) {
diff --git a/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java b/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java
index cc9909135..903fe56ec 100644
--- a/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java
+++ b/src/java/org/apache/fop/fonts/AbstractCodePointMapping.java
@@ -125,7 +125,8 @@ public class AbstractCodePointMapping implements SingleByteEncoding {
return latin1;
}
}
- int bot = 0, top = characters.length - 1;
+ int bot = 0;
+ int top = characters.length - 1;
while (top >= bot) {
int mid = (bot + top) / 2;
char mc = characters[mid];
diff --git a/src/java/org/apache/fop/fonts/MultiByteFont.java b/src/java/org/apache/fop/fonts/MultiByteFont.java
index 3b15662dc..73ef7c228 100644
--- a/src/java/org/apache/fop/fonts/MultiByteFont.java
+++ b/src/java/org/apache/fop/fonts/MultiByteFont.java
@@ -489,7 +489,8 @@ public class MultiByteFont extends CIDFont implements Substitutable, Positionabl
private GlyphSequence mapCharsToGlyphs ( CharSequence cs ) {
IntBuffer cb = IntBuffer.allocate ( cs.length() );
IntBuffer gb = IntBuffer.allocate ( cs.length() );
- int gi, giMissing = findGlyphIndex ( Typeface.NOT_FOUND );
+ int gi;
+ int giMissing = findGlyphIndex ( Typeface.NOT_FOUND );
for ( int i = 0, n = cs.length(); i < n; i++ ) {
int cc = cs.charAt ( i );
if ( ( cc >= 0xD800 ) && ( cc < 0xDC00 ) ) {
@@ -548,7 +549,8 @@ public class MultiByteFont extends CIDFont implements Substitutable, Positionabl
+ (char) cc + "'");
}
if ( cc > 0x00FFFF ) {
- int sh, sl;
+ int sh;
+ int sl;
cc -= 0x10000;
sh = ( ( cc >> 10 ) & 0x3FF ) + 0xD800;
sl = ( ( cc >> 0 ) & 0x3FF ) + 0xDC00;
diff --git a/src/java/org/apache/fop/fonts/autodetect/WindowsFontDirFinder.java b/src/java/org/apache/fop/fonts/autodetect/WindowsFontDirFinder.java
index d9773a026..53b076073 100644
--- a/src/java/org/apache/fop/fonts/autodetect/WindowsFontDirFinder.java
+++ b/src/java/org/apache/fop/fonts/autodetect/WindowsFontDirFinder.java
@@ -67,7 +67,8 @@ public class WindowsFontDirFinder implements FontDirFinder {
// should continue if this fails
}
}
- File osFontsDir = null, psFontsDir = null;
+ File osFontsDir = null;
+ File psFontsDir = null;
if (windir != null) {
// remove any trailing '/'
if (windir.endsWith("/")) {
diff --git a/src/java/org/apache/fop/hyphenation/HyphenationTree.java b/src/java/org/apache/fop/hyphenation/HyphenationTree.java
index fa7d218d9..fba51fdf8 100644
--- a/src/java/org/apache/fop/hyphenation/HyphenationTree.java
+++ b/src/java/org/apache/fop/hyphenation/HyphenationTree.java
@@ -84,7 +84,8 @@ public class HyphenationTree extends TernaryTree
* are stored.
*/
protected int packValues(String values) {
- int i, n = values.length();
+ int i;
+ int n = values.length();
int m = (n & 1) == 1 ? (n >> 1) + 2 : (n >> 1) + 1;
int offset = vspace.alloc(m);
byte[] va = vspace.getArray();
@@ -247,7 +248,8 @@ public class HyphenationTree extends TernaryTree
protected void searchPatterns(char[] word, int index, byte[] il) {
byte[] values;
int i = index;
- char p, q;
+ char p;
+ char q;
char sp = word[i];
p = root;
diff --git a/src/java/org/apache/fop/hyphenation/TernaryTree.java b/src/java/org/apache/fop/hyphenation/TernaryTree.java
index 206b81f3f..2734c0385 100644
--- a/src/java/org/apache/fop/hyphenation/TernaryTree.java
+++ b/src/java/org/apache/fop/hyphenation/TernaryTree.java
@@ -271,7 +271,9 @@ public class TernaryTree implements Cloneable, Serializable {
* @return an integer
*/
public static int strcmp(String str, char[] a, int start) {
- int i, d, len = str.length();
+ int i;
+ int d;
+ int len = str.length();
for (i = 0; i < len; i++) {
d = (int)str.charAt(i) - a[start + i];
if (d != 0) {
@@ -448,7 +450,8 @@ public class TernaryTree implements Cloneable, Serializable {
public void balance() {
// System.out.print("Before root splitchar = "); System.out.println(sc[root]);
- int i = 0, n = length;
+ int i = 0;
+ int n = length;
String[] k = new String[n];
char[] v = new char[n];
Iterator iter = new Iterator();
diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
index 205fac0f2..aab505d8b 100644
--- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
@@ -423,7 +423,8 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
boolean bpDirectionChanges = blockProgressionDirectionChanges();
Point offset = getAbsOffset();
- int allocBPD, allocIPD;
+ int allocBPD;
+ int allocIPD;
if (height.getEnum() == EN_AUTO
|| (!height.isAbsolute() && getAncestorBlockAreaBPD() <= 0)) {
//auto height when height="auto" or "if that dimension is not specified explicitly
diff --git a/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java b/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java
index 81df3c992..684977b9c 100644
--- a/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java
+++ b/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java
@@ -70,7 +70,8 @@ public class InlineKnuthSequence extends KnuthSequence {
return false;
}
// does the first element of the first paragraph add to an existing word?
- ListElement lastOldElement, firstNewElement;
+ ListElement lastOldElement;
+ ListElement firstNewElement;
lastOldElement = getLast();
firstNewElement = sequence.getElement(0);
if (firstNewElement.isBox() && !((KnuthElement) firstNewElement).isAuxiliary()
diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
index f57b9367a..3b2f11ea2 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
@@ -1231,7 +1231,8 @@ public class LineLayoutManager extends InlineStackingLayoutManager
ListIterator currParIterator = currPar.listIterator(currPar.ignoreAtStart);
// list of TLM involved in hyphenation
List updateList = new LinkedList();
- KnuthElement firstElement, nextElement;
+ KnuthElement firstElement;
+ KnuthElement nextElement;
// current InlineLevelLayoutManager
InlineLevelLayoutManager currLM = null;
// number of KnuthBox elements containing word fragments
diff --git a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
index 1ac206ee8..4010777ad 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
@@ -1320,7 +1320,8 @@ public class TextLayoutManager extends LeafNodeLayoutManager {
// Find the first and last positions in oldList that point to an AreaInfo
// (i.e. getLeafPos() != -1)
- LeafPosition startPos = null, endPos = null;
+ LeafPosition startPos = null;
+ LeafPosition endPos = null;
ListIterator oldListIter;
for (oldListIter = oldList.listIterator(); oldListIter.hasNext();) {
Position pos = ((KnuthElement) oldListIter.next()).getPosition();
@@ -1346,7 +1347,8 @@ public class TextLayoutManager extends LeafNodeLayoutManager {
int areaInfosRemoved = 0;
if (!changeList.isEmpty()) {
- int oldIndex = -1, changeIndex;
+ int oldIndex = -1;
+ int changeIndex;
PendingChange currChange;
ListIterator changeListIterator = changeList.listIterator();
while (changeListIterator.hasNext()) {
diff --git a/src/java/org/apache/fop/pdf/PDFDocument.java b/src/java/org/apache/fop/pdf/PDFDocument.java
index 256efd658..e9206a1bb 100644
--- a/src/java/org/apache/fop/pdf/PDFDocument.java
+++ b/src/java/org/apache/fop/pdf/PDFDocument.java
@@ -1025,7 +1025,8 @@ public class PDFDocument {
pdf.append(this.objectcount + 1);
pdf.append("\n0000000000 65535 f \n");
- String s, loc;
+ String s;
+ String loc;
for (int count = 0; count < this.location.size(); count++) {
final String padding = "0000000000";
s = this.location.get(count).toString();
diff --git a/src/java/org/apache/fop/render/intermediate/IFRenderer.java b/src/java/org/apache/fop/render/intermediate/IFRenderer.java
index 2987a4be8..64633bfab 100644
--- a/src/java/org/apache/fop/render/intermediate/IFRenderer.java
+++ b/src/java/org/apache/fop/render/intermediate/IFRenderer.java
@@ -1146,8 +1146,10 @@ public class IFRenderer extends AbstractPathOrientedRenderer {
private int[][] dp = new int[INITIAL_BUFFER_SIZE][4];
// private int lastDPPos = 0; // TBD - not yet used
private final StringBuffer text = new StringBuffer();
- private int startx, starty;
- private int tls, tws;
+ private int startx;
+ private int starty;
+ private int tls;
+ private int tws;
private final boolean combined = false;
void addChar(char ch) {
diff --git a/src/java/org/apache/fop/render/txt/TXTRenderer.java b/src/java/org/apache/fop/render/txt/TXTRenderer.java
index eecb6a623..d20ca3bed 100644
--- a/src/java/org/apache/fop/render/txt/TXTRenderer.java
+++ b/src/java/org/apache/fop/render/txt/TXTRenderer.java
@@ -508,7 +508,8 @@ public class TXTRenderer extends AbstractPathOrientedRenderer {
int borderStartX = bm.getStartX();
int borderStartY = bm.getStartY();
- int x, y;
+ int x;
+ int y;
if (horz && startOrBefore) { // BEFORE
x = borderStartX;
y = borderStartY;
@@ -523,7 +524,11 @@ public class TXTRenderer extends AbstractPathOrientedRenderer {
y = borderStartY;
}
- int dx, dy, length, startType, endType;
+ int dx;
+ int dy;
+ int length;
+ int startType;
+ int endType;
if (horz) {
length = borderWidth;
dx = 1;
diff --git a/src/java/org/apache/fop/svg/PDFGraphics2D.java b/src/java/org/apache/fop/svg/PDFGraphics2D.java
index 429a1ea35..018653dbb 100644
--- a/src/java/org/apache/fop/svg/PDFGraphics2D.java
+++ b/src/java/org/apache/fop/svg/PDFGraphics2D.java
@@ -1064,7 +1064,8 @@ public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHand
preparePainting();
Shape clip = getClip();
- Rectangle2D usrClipBounds, usrBounds;
+ Rectangle2D usrClipBounds;
+ Rectangle2D usrBounds;
usrBounds = shape.getBounds2D();
if (clip != null) {
usrClipBounds = clip.getBounds2D();
@@ -1078,7 +1079,9 @@ public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHand
double usrW = usrBounds.getWidth();
double usrH = usrBounds.getHeight();
- Rectangle devShapeBounds, devClipBounds, devBounds;
+ Rectangle devShapeBounds;
+ Rectangle devClipBounds;
+ Rectangle devBounds;
AffineTransform at = getTransform();
devShapeBounds = at.createTransformedShape(shape).getBounds();
if (clip != null) {
@@ -1117,7 +1120,10 @@ public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHand
final byte[] rgb = new byte[devW * devH * 3];
final int[] line = new int[devW];
final byte[] mask;
- int x, y, val, rgbIdx = 0;
+ int x;
+ int y;
+ int val;
+ int rgbIdx = 0;
if (pcm.hasAlpha()) {
mask = new byte[devW * devH];
diff --git a/src/java/org/apache/fop/tools/anttasks/FileCompare.java b/src/java/org/apache/fop/tools/anttasks/FileCompare.java
index 83b0aa896..a50f9801e 100644
--- a/src/java/org/apache/fop/tools/anttasks/FileCompare.java
+++ b/src/java/org/apache/fop/tools/anttasks/FileCompare.java
@@ -38,7 +38,8 @@ import java.text.DateFormat;
public class FileCompare {
- private String referenceDirectory, testDirectory;
+ private String referenceDirectory;
+ private String testDirectory;
private String[] filenameList;
private String filenames;
diff --git a/src/java/org/apache/fop/util/ColorUtil.java b/src/java/org/apache/fop/util/ColorUtil.java
index 14042029e..09e9dd50b 100644
--- a/src/java/org/apache/fop/util/ColorUtil.java
+++ b/src/java/org/apache/fop/util/ColorUtil.java
@@ -183,7 +183,9 @@ public final class ColorUtil {
*/
private static Color parseAsJavaAWTColor(String value)
throws PropertyException {
- float red = 0.0f, green = 0.0f, blue = 0.0f;
+ float red = 0.0f;
+ float green = 0.0f;
+ float blue = 0.0f;
int poss = value.indexOf("[");
int pose = value.indexOf("]");
try {
@@ -315,7 +317,9 @@ public final class ColorUtil {
} else {
alpha = 0xFF;
}
- int red = 0, green = 0, blue = 0;
+ int red = 0;
+ int green = 0;
+ int blue = 0;
if ((len == 4) || (len == 5)) {
//multiply by 0x11 = 17 = 255/15
red = Integer.parseInt(value.substring(1, 2), 16) * 0x11;
diff --git a/src/java/org/apache/fop/util/XMLResourceBundle.java b/src/java/org/apache/fop/util/XMLResourceBundle.java
index 268ce1eed..a7444147c 100644
--- a/src/java/org/apache/fop/util/XMLResourceBundle.java
+++ b/src/java/org/apache/fop/util/XMLResourceBundle.java
@@ -227,7 +227,9 @@ public class XMLResourceBundle extends ResourceBundle {
}
private void setLocale(String name) {
- String language = "", country = "", variant = "";
+ String language = "";
+ String country = "";
+ String variant = "";
if (name.length() > 1) {
int nextIndex = name.indexOf('_', 1);
if (nextIndex == -1) {