aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/complexscripts/fonts
diff options
context:
space:
mode:
authorGlenn Adams <gadams@apache.org>2012-03-02 21:34:30 +0000
committerGlenn Adams <gadams@apache.org>2012-03-02 21:34:30 +0000
commit9826acf1e8c3552abc295ba34384292ae6db51b3 (patch)
treefcca84f17d36fa77846b3d5313a73820cae01366 /src/java/org/apache/fop/complexscripts/fonts
parent5494cc056a64aa2c66727087435cad880a896486 (diff)
downloadxmlgraphics-fop-9826acf1e8c3552abc295ba34384292ae6db51b3.tar.gz
xmlgraphics-fop-9826acf1e8c3552abc295ba34384292ae6db51b3.zip
enable MultipleVariableDeclarations rule; fix violations
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1296483 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/complexscripts/fonts')
-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
6 files changed, 53 insertions, 23 deletions
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;