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 vh...@apache.org on 2013/05/07 18:23:17 UTC
svn commit: r1479969 [16/16] - in /xmlgraphics/fop/trunk: ./
src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/
src/codegen/unicode/java/org/apache/fop/hyphenation/
src/java/org/apache/fop/afp/ src/java/org/apache/fop/afp/modca/
src/java/org/...
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFileTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFileTestCase.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFileTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFileTestCase.java Tue May 7 16:23:13 2013
@@ -41,10 +41,10 @@ public class TTXFileTestCase {
public void testTTXFiles() throws Exception {
for (String tfn : ttxFiles) {
try {
- TTXFile tf = TTXFile.getFromCache (ttxFilesRoot + File.separator + tfn);
- assertTrue (tf != null);
+ TTXFile tf = TTXFile.getFromCache(ttxFilesRoot + File.separator + tfn);
+ assertTrue(tf != null);
} catch (Exception e) {
- fail (e.getMessage());
+ fail(e.getMessage());
}
}
}
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/scripts/arabic/ArabicTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/scripts/arabic/ArabicTestCase.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/scripts/arabic/ArabicTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/scripts/arabic/ArabicTestCase.java Tue May 7 16:23:13 2013
@@ -54,58 +54,58 @@ public class ArabicTestCase implements A
public void testArabicWordForms() {
for (String sfn : srcFiles) {
try {
- processWordForms (new File (datFilesDir));
+ processWordForms(new File(datFilesDir));
} catch (Exception e) {
- fail (e.getMessage());
+ fail(e.getMessage());
}
}
}
- private void processWordForms (File dfd) {
- String[] files = listWordFormFiles (dfd);
+ private void processWordForms(File dfd) {
+ String[] files = listWordFormFiles(dfd);
for (String fn : files) {
- File dff = new File (dfd, fn);
- processWordForms (dff.getAbsolutePath());
+ File dff = new File(dfd, fn);
+ processWordForms(dff.getAbsolutePath());
}
}
- private String[] listWordFormFiles (File dfd) {
- return dfd.list (new FilenameFilter() {
- public boolean accept (File f, String name) {
- return hasPrefixFrom (name, srcFiles) && hasExtension (name, WF_FILE_DAT_EXT);
+ private String[] listWordFormFiles(File dfd) {
+ return dfd.list(new FilenameFilter() {
+ public boolean accept(File f, String name) {
+ return hasPrefixFrom(name, srcFiles) && hasExtension(name, WF_FILE_DAT_EXT);
}
- private boolean hasPrefixFrom (String name, String[] prefixes) {
+ private boolean hasPrefixFrom(String name, String[] prefixes) {
for (String p : prefixes) {
- if (name.startsWith (p)) {
+ if (name.startsWith(p)) {
return true;
}
}
return false;
}
- private boolean hasExtension (String name, String extension) {
- return name.endsWith ("." + extension);
+ private boolean hasExtension(String name, String extension) {
+ return name.endsWith("." + extension);
}
});
}
- private void processWordForms (String dpn) {
+ private void processWordForms(String dpn) {
FileInputStream fis = null;
try {
- fis = new FileInputStream (dpn);
+ fis = new FileInputStream(dpn);
if (fis != null) {
- ObjectInputStream ois = new ObjectInputStream (fis);
+ ObjectInputStream ois = new ObjectInputStream(fis);
List<Object[]> data = (List<Object[]>) ois.readObject();
if (data != null) {
- processWordForms (data);
+ processWordForms(data);
}
ois.close();
}
} catch (FileNotFoundException e) {
- throw new RuntimeException (e.getMessage(), e);
+ throw new RuntimeException(e.getMessage(), e);
} catch (IOException e) {
- throw new RuntimeException (e.getMessage(), e);
+ throw new RuntimeException(e.getMessage(), e);
} catch (Exception e) {
- throw new RuntimeException (e.getMessage(), e);
+ throw new RuntimeException(e.getMessage(), e);
} finally {
if (fis != null) {
try { fis.close(); } catch (Exception e) {}
@@ -113,7 +113,7 @@ public class ArabicTestCase implements A
}
}
- private void processWordForms (List<Object[]> data) {
+ private void processWordForms(List<Object[]> data) {
assert data != null;
assert data.size() > 0;
String script = null;
@@ -129,14 +129,14 @@ public class ArabicTestCase implements A
script = (String) d[0];
language = (String) d[1];
tfn = (String) d[3];
- tf = TTXFile.getFromCache (ttxFontsDir + File.separator + tfn);
- assertTrue (tf != null);
+ tf = TTXFile.getFromCache(ttxFontsDir + File.separator + tfn);
+ assertTrue(tf != null);
gsub = tf.getGSUB();
- assertTrue (gsub != null);
+ assertTrue(gsub != null);
gpos = tf.getGPOS();
- assertTrue (gpos != null);
+ assertTrue(gpos != null);
widths = tf.getWidths();
- assertTrue (widths != null);
+ assertTrue(widths != null);
} else {
assert tf != null;
assert gsub != null;
@@ -147,48 +147,48 @@ public class ArabicTestCase implements A
int[] iga = (int[]) d[1];
int[] oga = (int[]) d[2];
int[][] paa = (int[][]) d[3];
- GlyphSequence tigs = tf.mapCharsToGlyphs (wf);
- assertSameGlyphs (iga, getGlyphs (tigs), "input glyphs", wf, tfn);
- GlyphSequence togs = gsub.substitute (tigs, script, language);
- assertSameGlyphs (oga, getGlyphs (togs), "output glyphs", wf, tfn);
+ GlyphSequence tigs = tf.mapCharsToGlyphs(wf);
+ assertSameGlyphs(iga, getGlyphs(tigs), "input glyphs", wf, tfn);
+ GlyphSequence togs = gsub.substitute(tigs, script, language);
+ assertSameGlyphs(oga, getGlyphs(togs), "output glyphs", wf, tfn);
int[][] tpaa = new int [ togs.getGlyphCount() ] [ 4 ];
- if (gpos.position (togs, script, language, 1000, widths, tpaa)) {
- assertSameAdjustments (paa, tpaa, wf, tfn);
+ if (gpos.position(togs, script, language, 1000, widths, tpaa)) {
+ assertSameAdjustments(paa, tpaa, wf, tfn);
} else if (paa != null) {
- assertEquals ("unequal adjustment count, word form(" + wf + "), font (" + tfn + ")", paa.length, 0);
+ assertEquals("unequal adjustment count, word form(" + wf + "), font (" + tfn + ")", paa.length, 0);
}
}
}
}
- private void assertSameGlyphs (int[] expected, int[] actual, String label, String wf, String tfn) {
- assertEquals (label + ": unequal glyph count, word form(" + wf + "), font (" + tfn + ")", expected.length, actual.length);
+ private void assertSameGlyphs(int[] expected, int[] actual, String label, String wf, String tfn) {
+ assertEquals(label + ": unequal glyph count, word form(" + wf + "), font (" + tfn + ")", expected.length, actual.length);
for (int i = 0, n = expected.length; i < n; i++) {
int e = expected[i];
int a = actual[i];
- assertEquals (label + ": unequal glyphs[" + i + "], word form(" + wf + "), font (" + tfn + ")", e, a);
+ assertEquals(label + ": unequal glyphs[" + i + "], word form(" + wf + "), font (" + tfn + ")", e, a);
}
}
- private void assertSameAdjustments (int[][] expected, int[][] actual, String wf, String tfn) {
- assertEquals ("unequal adjustment count, word form(" + wf + "), font (" + tfn + ")", expected.length, actual.length);
+ private void assertSameAdjustments(int[][] expected, int[][] actual, String wf, String tfn) {
+ assertEquals("unequal adjustment count, word form(" + wf + "), font (" + tfn + ")", expected.length, actual.length);
for (int i = 0, n = expected.length; i < n; i++) {
int[] ea = expected[i];
int[] aa = actual[i];
- assertEquals ("bad adjustments length, word form(" + wf + "), font (" + tfn + ")", ea.length, aa.length);
+ assertEquals("bad adjustments length, word form(" + wf + "), font (" + tfn + ")", ea.length, aa.length);
for (int k = 0; k < 4; k++) {
int e = ea[k];
int a = aa[k];
- assertEquals ("unequal adjustment[" + i + "][" + k + "], word form(" + wf + "), font (" + tfn + ")", e, a);
+ assertEquals("unequal adjustment[" + i + "][" + k + "], word form(" + wf + "), font (" + tfn + ")", e, a);
}
}
}
- private static int[] getGlyphs (GlyphSequence gs) {
+ private static int[] getGlyphs(GlyphSequence gs) {
IntBuffer gb = gs.getGlyphs();
int[] ga = new int [ gb.limit() ];
gb.rewind();
- gb.get (ga);
+ gb.get(ga);
return ga;
}
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/scripts/arabic/GenerateArabicTestData.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/scripts/arabic/GenerateArabicTestData.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/scripts/arabic/GenerateArabicTestData.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/scripts/arabic/GenerateArabicTestData.java Tue May 7 16:23:13 2013
@@ -42,7 +42,7 @@ import org.apache.fop.complexscripts.uti
*/
public class GenerateArabicTestData implements ArabicTestConstants {
- public static void main (String[] args) {
+ public static void main(String[] args) {
boolean compile = false;
boolean help = false;
for (String a : args) {
@@ -62,63 +62,63 @@ public class GenerateArabicTestData impl
private static void help() {
StringBuffer sb = new StringBuffer();
- sb.append ("org.apache.fop.complexscripts.arabic.ArabicTestCase");
- sb.append (" [-compile]");
- sb.append (" [-?]");
- System.out.println (sb.toString());
+ sb.append("org.apache.fop.complexscripts.arabic.ArabicTestCase");
+ sb.append(" [-compile]");
+ sb.append(" [-?]");
+ System.out.println(sb.toString());
}
private static void compile() {
for (String sfn : srcFiles) {
try {
String spn = srcFilesDir + File.separator + sfn + "." + WF_FILE_SRC_EXT;
- compile (WF_FILE_SCRIPT, WF_FILE_LANGUAGE, spn);
+ compile(WF_FILE_SCRIPT, WF_FILE_LANGUAGE, spn);
} catch (Exception e) {
- System.err.println (e.getMessage());
+ System.err.println(e.getMessage());
}
}
}
- private static void compile (String script, String language, String spn) {
+ private static void compile(String script, String language, String spn) {
int fno = 0;
for (String tfn : ttxFonts) {
- TTXFile tf = TTXFile.getFromCache (ttxFontsDir + File.separator + tfn);
+ TTXFile tf = TTXFile.getFromCache(ttxFontsDir + File.separator + tfn);
assert tf != null;
- List data = compile (script, language, spn, tfn, tf);
- output (makeDataPathName (spn, fno++), data);
+ List data = compile(script, language, spn, tfn, tf);
+ output(makeDataPathName(spn, fno++), data);
}
}
- private static List compile (String script, String language, String spn, String tfn, TTXFile tf) {
+ private static List compile(String script, String language, String spn, String tfn, TTXFile tf) {
List<Object[]> data = new ArrayList<Object[]>();
- data.add (new Object[] { script, language, spn, tfn });
+ data.add(new Object[] { script, language, spn, tfn });
GlyphSubstitutionTable gsub = tf.getGSUB();
GlyphPositioningTable gpos = tf.getGPOS();
int[] widths = tf.getWidths();
if ((gsub != null) && (gpos != null)) {
FileInputStream fis = null;
try {
- fis = new FileInputStream (spn);
+ fis = new FileInputStream(spn);
if (fis != null) {
- LineNumberReader lr = new LineNumberReader (new InputStreamReader (fis, Charset.forName ("UTF-8")));
+ LineNumberReader lr = new LineNumberReader(new InputStreamReader(fis, Charset.forName("UTF-8")));
String wf;
while ((wf = lr.readLine()) != null) {
- GlyphSequence igs = tf.mapCharsToGlyphs (wf);
- GlyphSequence ogs = gsub.substitute (igs, script, language);
+ GlyphSequence igs = tf.mapCharsToGlyphs(wf);
+ GlyphSequence ogs = gsub.substitute(igs, script, language);
int[][] paa = new int [ ogs.getGlyphCount() ] [ 4 ];
- if (! gpos.position (ogs, script, language, 1000, widths, paa)) {
+ if (! gpos.position(ogs, script, language, 1000, widths, paa)) {
paa = null;
}
- data.add (new Object[] { wf, getGlyphs (igs), getGlyphs (ogs), paa });
+ data.add(new Object[] { wf, getGlyphs(igs), getGlyphs(ogs), paa });
}
lr.close();
}
} catch (FileNotFoundException e) {
- throw new RuntimeException (e.getMessage(), e);
+ throw new RuntimeException(e.getMessage(), e);
} catch (IOException e) {
- throw new RuntimeException (e.getMessage(), e);
+ throw new RuntimeException(e.getMessage(), e);
} catch (Exception e) {
- throw new RuntimeException (e.getMessage(), e);
+ throw new RuntimeException(e.getMessage(), e);
} finally {
if (fis != null) {
try { fis.close(); } catch (Exception e) {}
@@ -128,47 +128,47 @@ public class GenerateArabicTestData impl
assert gsub != null;
assert gpos != null;
}
- System.err.println ("compiled " + (data.size() - 1) + " word forms using font " + tfn);
+ System.err.println("compiled " + (data.size() - 1) + " word forms using font " + tfn);
return data;
}
- private static int[] getGlyphs (GlyphSequence gs) {
+ private static int[] getGlyphs(GlyphSequence gs) {
IntBuffer gb = gs.getGlyphs();
int[] ga = new int [ gb.limit() ];
gb.rewind();
- gb.get (ga);
+ gb.get(ga);
return ga;
}
- private static String makeDataPathName (String spn, int fno) {
- File f = new File (spn);
- return datFilesDir + File.separator + stripExtension (f.getName()) + "-f" + fno + "." + WF_FILE_DAT_EXT;
+ private static String makeDataPathName(String spn, int fno) {
+ File f = new File(spn);
+ return datFilesDir + File.separator + stripExtension(f.getName()) + "-f" + fno + "." + WF_FILE_DAT_EXT;
}
- private static String stripExtension (String s) {
- int i = s.lastIndexOf ('.');
+ private static String stripExtension(String s) {
+ int i = s.lastIndexOf('.');
if (i >= 0) {
- return s.substring (0, i);
+ return s.substring(0, i);
} else {
return s;
}
}
- private static void output (String dpn, List<Object[]> data) {
+ private static void output(String dpn, List<Object[]> data) {
FileOutputStream fos = null;
try {
- fos = new FileOutputStream (dpn);
+ fos = new FileOutputStream(dpn);
if (fos != null) {
- ObjectOutputStream oos = new ObjectOutputStream (fos);
- oos.writeObject (data);
+ ObjectOutputStream oos = new ObjectOutputStream(fos);
+ oos.writeObject(data);
oos.close();
}
} catch (FileNotFoundException e) {
- throw new RuntimeException (e.getMessage(), e);
+ throw new RuntimeException(e.getMessage(), e);
} catch (IOException e) {
- throw new RuntimeException (e.getMessage(), e);
+ throw new RuntimeException(e.getMessage(), e);
} catch (Exception e) {
- throw new RuntimeException (e.getMessage(), e);
+ throw new RuntimeException(e.getMessage(), e);
} finally {
if (fos != null) {
try { fos.close(); } catch (Exception e) {}
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/util/NumberConverterTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/util/NumberConverterTestCase.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/util/NumberConverterTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/complexscripts/util/NumberConverterTestCase.java Tue May 7 16:23:13 2013
@@ -1329,10 +1329,10 @@ public class NumberConverterTestCase {
*/
@Test
public void testFormatDecimal() throws Exception {
- performConversions (formatDecimal);
- performConversions (formatDecimalPadded);
- performConversions (formatDecimalGrouped);
- performConversions (formatDecimalGroupedPadded);
+ performConversions(formatDecimal);
+ performConversions(formatDecimalPadded);
+ performConversions(formatDecimalGrouped);
+ performConversions(formatDecimalGroupedPadded);
}
/**
@@ -1341,10 +1341,10 @@ public class NumberConverterTestCase {
*/
@Test
public void testFormatDecimalArabic() throws Exception {
- performConversions (formatDecimalArabic);
- performConversions (formatDecimalArabicPadded);
- performConversions (formatDecimalArabicGrouped);
- performConversions (formatDecimalArabicGroupedPadded);
+ performConversions(formatDecimalArabic);
+ performConversions(formatDecimalArabicPadded);
+ performConversions(formatDecimalArabicGrouped);
+ performConversions(formatDecimalArabicGroupedPadded);
}
/**
@@ -1353,8 +1353,8 @@ public class NumberConverterTestCase {
*/
@Test
public void testFormatDecimalThai() throws Exception {
- performConversions (formatDecimalThai);
- performConversions (formatDecimalThaiPadded);
+ performConversions(formatDecimalThai);
+ performConversions(formatDecimalThaiPadded);
}
/**
@@ -1363,12 +1363,12 @@ public class NumberConverterTestCase {
*/
@Test
public void testFormatRoman() throws Exception {
- performConversions (formatRomanLower);
- performConversions (formatRomanUpper);
- performConversions (formatRomanLargeLower);
- performConversions (formatRomanLargeUpper);
- performConversions (formatRomanNumberFormsLower);
- performConversions (formatRomanNumberFormsUpper);
+ performConversions(formatRomanLower);
+ performConversions(formatRomanUpper);
+ performConversions(formatRomanLargeLower);
+ performConversions(formatRomanLargeUpper);
+ performConversions(formatRomanNumberFormsLower);
+ performConversions(formatRomanNumberFormsUpper);
}
/**
@@ -1377,8 +1377,8 @@ public class NumberConverterTestCase {
*/
@Test
public void testAlphabeticLatin() throws Exception {
- performConversions (formatAlphabeticLatinLower);
- performConversions (formatAlphabeticLatinUpper);
+ performConversions(formatAlphabeticLatinLower);
+ performConversions(formatAlphabeticLatinUpper);
}
/**
@@ -1387,8 +1387,8 @@ public class NumberConverterTestCase {
*/
@Test
public void testAlphabeticArabic() throws Exception {
- performConversions (formatAlphabeticArabicHijai);
- performConversions (formatAlphabeticArabicAbjadi);
+ performConversions(formatAlphabeticArabicHijai);
+ performConversions(formatAlphabeticArabicAbjadi);
}
/**
@@ -1397,7 +1397,7 @@ public class NumberConverterTestCase {
*/
@Test
public void testAlphabeticHebrew() throws Exception {
- performConversions (formatAlphabeticHebrew);
+ performConversions(formatAlphabeticHebrew);
}
/**
@@ -1406,7 +1406,7 @@ public class NumberConverterTestCase {
*/
@Test
public void testAlphabeticThai() throws Exception {
- performConversions (formatAlphabeticThai);
+ performConversions(formatAlphabeticThai);
}
/**
@@ -1415,7 +1415,7 @@ public class NumberConverterTestCase {
*/
@Test
public void testNumeralArabic() throws Exception {
- performConversions (formatNumeralArabicAbjadi);
+ performConversions(formatNumeralArabicAbjadi);
}
/**
@@ -1424,7 +1424,7 @@ public class NumberConverterTestCase {
*/
@Test
public void testNumeralHebrew() throws Exception {
- performConversions (formatNumeralHebrewGematria);
+ performConversions(formatNumeralHebrewGematria);
}
/**
@@ -1433,9 +1433,9 @@ public class NumberConverterTestCase {
*/
@Test
public void testWordEnglish() throws Exception {
- performConversions (formatWordEnglishLower);
- performConversions (formatWordEnglishUpper);
- performConversions (formatWordEnglishTitle);
+ performConversions(formatWordEnglishLower);
+ performConversions(formatWordEnglishUpper);
+ performConversions(formatWordEnglishTitle);
}
/**
@@ -1444,9 +1444,9 @@ public class NumberConverterTestCase {
*/
@Test
public void testWordSpanish() throws Exception {
- performConversions (formatWordSpanishLower);
- performConversions (formatWordSpanishUpper);
- performConversions (formatWordSpanishTitle);
+ performConversions(formatWordSpanishLower);
+ performConversions(formatWordSpanishUpper);
+ performConversions(formatWordSpanishTitle);
}
/**
@@ -1455,16 +1455,16 @@ public class NumberConverterTestCase {
*/
@Test
public void testWordFrench() throws Exception {
- performConversions (formatWordFrenchLower);
- performConversions (formatWordFrenchUpper);
- performConversions (formatWordFrenchTitle);
+ performConversions(formatWordFrenchLower);
+ performConversions(formatWordFrenchUpper);
+ performConversions(formatWordFrenchTitle);
}
/**
* Perform conversions according to test specification.
* @param ts test specification
*/
- private void performConversions (String[][] ts) {
+ private void performConversions(String[][] ts) {
assert ts != null;
assert ts.length >= 2;
String[] args = ts[0];
@@ -1487,7 +1487,7 @@ public class NumberConverterTestCase {
if (args.length > 2) {
String s = args[2];
if ((s != null) && (s.length() > 0)) {
- groupingSize = Integer.parseInt (s);
+ groupingSize = Integer.parseInt(s);
} else {
groupingSize = 0;
}
@@ -1545,7 +1545,7 @@ public class NumberConverterTestCase {
} else {
country = null;
}
- NumberConverter nc = new NumberConverter (format, groupingSeparator, groupingSize, letterValue, features, language, country);
+ NumberConverter nc = new NumberConverter(format, groupingSeparator, groupingSize, letterValue, features, language, country);
for (int i = 1, nt = ts.length; i < nt; i++) {
String[] sa = ts[i];
assert sa != null;
@@ -1553,11 +1553,11 @@ public class NumberConverterTestCase {
List<Long> numbers = new ArrayList<Long>();
for (int k = 0, nn = sa.length - 1; k < nn; k++) {
String s = sa[k];
- numbers.add (Long.valueOf (s));
+ numbers.add(Long.valueOf(s));
}
String expected = sa [ sa.length - 1 ];
- String actual = nc.convert (numbers);
- assertEquals (expected, actual);
+ String actual = nc.convert(numbers);
+ assertEquals(expected, actual);
}
}
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java Tue May 7 16:23:13 2013
@@ -57,22 +57,22 @@ public class BasicLink extends TestDocum
* @throws IOException for I/O Errors
*/
protected void generateDocument(RtfDocumentArea rda, RtfSection sect) throws IOException {
- RtfParagraph p = sect.newParagraph ();
+ RtfParagraph p = sect.newParagraph();
p.newLineBreak();
p.newLineBreak();
p.newLineBreak();
- p.newText ("external link: ");
- RtfHyperLink link = p.newHyperLink ("click here to go to the hompage", null);
- link.setExternalURL ("http://www.skynamics.com");
+ p.newText("external link: ");
+ RtfHyperLink link = p.newHyperLink("click here to go to the hompage", null);
+ link.setExternalURL("http://www.skynamics.com");
p.close();
- p = sect.newParagraph ();
+ p = sect.newParagraph();
p.newLineBreak();
- p.newText ("here we will demonstrate internal link to a bookmark");
+ p.newText("here we will demonstrate internal link to a bookmark");
p.newLineBreak();
- p.newText ("internal link: ");
- link = p.newHyperLink ("click here to go to the bookmark", null);
- link.setInternalURL ("testBookmark");
+ p.newText("internal link: ");
+ link = p.newHyperLink("click here to go to the bookmark", null);
+ link.setInternalURL("testBookmark");
p.close();
p = sect.newParagraph();
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java Tue May 7 16:23:13 2013
@@ -48,65 +48,65 @@ class ExternalGraphic extends TestDocume
/**
* Default constructor.
*/
- public ExternalGraphic () {
+ public ExternalGraphic() {
}
/** generate the body of the test document */
- protected void generateDocument (RtfDocumentArea rda, RtfSection sect) throws IOException {
- RtfParagraph p = sect.newParagraph ();
+ protected void generateDocument(RtfDocumentArea rda, RtfSection sect) throws IOException {
+ RtfParagraph p = sect.newParagraph();
p.newLineBreak();
p.newLineBreak();
p.newLineBreak();
- p.newText ("EMF image with 150 % height");
+ p.newText("EMF image with 150 % height");
p.newLineBreak();
- RtfExternalGraphic imageA = p.newImage ();
- imageA.setURL (file + "emf");
- imageA.setHeight ("150%");
+ RtfExternalGraphic imageA = p.newImage();
+ imageA.setURL(file + "emf");
+ imageA.setHeight("150%");
p.newLineBreak();
p.close();
p = sect.newParagraph();
p.newLineBreak();
- p.newText ("PNG image with 150 % width");
+ p.newText("PNG image with 150 % width");
p.newLineBreak();
- RtfExternalGraphic imageB = sect.newImage ();
- imageB.setURL (file + "png");
- imageB.setWidth ("150%");
+ RtfExternalGraphic imageB = sect.newImage();
+ imageB.setURL(file + "png");
+ imageB.setWidth("150%");
p.newLineBreak();
p.close();
p = sect.newParagraph();
p.newLineBreak();
p.newLineBreak();
- p.newText ("JPG image with width = 200px and height = 20 px");
+ p.newText("JPG image with width = 200px and height = 20 px");
p.newLineBreak();
- RtfExternalGraphic imageC = sect.newImage ();
- imageC.setURL (file + "jpg");
- imageC.setWidth ("200");
- imageC.setHeight ("20");
+ RtfExternalGraphic imageC = sect.newImage();
+ imageC.setURL(file + "jpg");
+ imageC.setWidth("200");
+ imageC.setHeight("20");
p.newLineBreak();
p.close();
p = sect.newParagraph();
p.newLineBreak();
p.newLineBreak();
- p.newText ("GIF image with width = 200px and scaling = 'uniform', that means the image "
+ p.newText("GIF image with width = 200px and scaling = 'uniform', that means the image "
+ "size will adjusted automatically");
p.newLineBreak();
- RtfExternalGraphic imageD = sect.newImage ();
- imageD.setURL (file + "gif");
- imageD.setWidth ("200");
- imageD.setScaling ("uniform");
+ RtfExternalGraphic imageD = sect.newImage();
+ imageD.setURL(file + "gif");
+ imageD.setWidth("200");
+ imageD.setScaling("uniform");
p.newLineBreak();
p.close();
p = sect.newParagraph();
p.newLineBreak();
p.newLineBreak();
- p.newText ("GIF image");
+ p.newText("GIF image");
p.newLineBreak();
- RtfExternalGraphic imageE = sect.newImage ();
- imageE.setURL (file + "gif");
+ RtfExternalGraphic imageE = sect.newImage();
+ imageE.setURL(file + "gif");
p.newLineBreak();
p.close();
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java Tue May 7 16:23:13 2013
@@ -111,8 +111,8 @@ class MergedTableCells extends TestDocum
// fifth row, just one cell
{
RtfTableRow r = tbl.newTableRow();
- r.newTableCell(160 * MM_TO_TWIPS).newParagraph().newText
- ("cell 4,0, width 160mm, only cell in this row");
+ r.newTableCell(160 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 4,0, width 160mm, only cell in this row");
}
}
}
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java Tue May 7 16:23:13 2013
@@ -78,8 +78,8 @@ class NestedTable extends TestDocument {
// second row contains nested table
{
RtfTableRow r = tbl.newTableRow();
- r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText
- ("cell 1,0, width 40mm, to the left of nested table.");
+ r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 1,0, width 40mm, to the left of nested table.");
final RtfTableCell c = r.newTableCell(80 * MM_TO_TWIPS);
c.newParagraph().newText("cell 1,1, width 80mm, this text is "
@@ -88,17 +88,17 @@ class NestedTable extends TestDocument {
fillNestedTable(c.newTable(new DummyTableColumnsInfo()), 1);
c.newParagraph().newText("AFTER NESTED TABLE");
- r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText
- ("cell 1,2, width 40mm, to the right of nested table.");
+ r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 1,2, width 40mm, to the right of nested table.");
}
// third row, normal
{
RtfTableRow r = tbl.newTableRow();
- r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText
- ("cell 2,0, width 80mm, this row has two cells.");
- r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText
- ("cell 2,1, width 80mm, last cell.");
+ r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 2,0, width 80mm, this row has two cells.");
+ r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 2,1, width 80mm, last cell.");
}
}
@@ -118,8 +118,8 @@ class NestedTable extends TestDocument {
// second row contains nested table
{
RtfTableRow r = tbl.newTableRow();
- r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText
- ("cell 1,0, width 40mm, to the left of nested tables.");
+ r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 1,0, width 40mm, to the left of nested tables.");
final RtfTableCell c = r.newTableCell(80 * MM_TO_TWIPS);
c.newParagraph().newText("cell 1,1, width 80mm, this text is "
@@ -130,17 +130,17 @@ class NestedTable extends TestDocument {
fillNestedTable(c.newTable(new DummyTableColumnsInfo()), 3);
c.newParagraph().newText("AFTER");
- r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText
- ("cell 1,2, width 40mm, to the right of nested table.");
+ r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 1,2, width 40mm, to the right of nested table.");
}
// third row, normal
{
RtfTableRow r = tbl.newTableRow();
- r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText
- ("cell 2,0, width 80mm, this row has two cells.");
- r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText
- ("cell 2,1, width 80mm, last cell.");
+ r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 2,0, width 80mm, this row has two cells.");
+ r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 2,1, width 80mm, last cell.");
}
}
@@ -162,8 +162,8 @@ class NestedTable extends TestDocument {
// second row contains nested table
{
RtfTableRow r = tbl.newTableRow();
- r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText
- ("cell 1,0, width 40mm, to the left of nested tables.");
+ r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 1,0, width 40mm, to the left of nested tables.");
final RtfTableCell c = r.newTableCell(80 * MM_TO_TWIPS);
c.newParagraph().newText("cell 1,1, width 80mm, this text is "
@@ -174,17 +174,17 @@ class NestedTable extends TestDocument {
fillNestedTable(c.newTable(new DummyTableColumnsInfo()), 6);
c.newParagraph().newText("AFTER");
- r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText
- ("cell 1,2, width 40mm, to the right of nested table.");
+ r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 1,2, width 40mm, to the right of nested table.");
}
// third row, normal
{
RtfTableRow r = tbl.newTableRow();
- r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText
- ("cell 2,0, width 80mm, this row has two cells.");
- r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText
- ("cell 2,1, width 80mm, last cell.");
+ r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 2,0, width 80mm, this row has two cells.");
+ r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText(
+ "cell 2,1, width 80mm, last cell.");
}
}
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java Tue May 7 16:23:13 2013
@@ -52,28 +52,28 @@ public class ParagraphAlignment extends
*/
protected void generateDocument(RtfDocumentArea rda, RtfSection sect) throws java.io.IOException
{
- RtfAttributes attr = new RtfAttributes ();
+ RtfAttributes attr = new RtfAttributes();
attr.set(RtfText.ALIGN_CENTER);
- RtfParagraph p = sect.newParagraph (attr);
+ RtfParagraph p = sect.newParagraph(attr);
p.newLineBreak();
p.newLineBreak();
- p.newText ("Centered title");
+ p.newText("Centered title");
p.newLineBreak();
p.close();
- attr = new RtfAttributes ();
+ attr = new RtfAttributes();
attr.set(RtfText.ALIGN_LEFT);
- p = sect.newParagraph (attr);
+ p = sect.newParagraph(attr);
p.newLineBreak();
- p.newText ("This is the left aligned text.");
+ p.newText("This is the left aligned text.");
p.newLineBreak();
p.close();
- attr = new RtfAttributes ();
+ attr = new RtfAttributes();
attr.set(RtfText.ALIGN_RIGHT);
- p = sect.newParagraph (attr);
+ p = sect.newParagraph(attr);
p.newLineBreak();
- p.newText ("This is the right aligned text.");
+ p.newText("This is the right aligned text.");
p.newLineBreak();
p.close();
}
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java Tue May 7 16:23:13 2013
@@ -48,8 +48,8 @@ class SimpleTable extends TestDocument {
protected void generateDocument(RtfDocumentArea rda, RtfSection sect)
throws IOException {
final RtfTable tbl = sect.newTable(new DummyTableColumnsInfo());
- tbl.newTableRow().newTableCell(C1W * INCH_TO_TWIPS).newParagraph().newText
- ("Here's a table row with just one cell, width " + C1W + "''");
+ tbl.newTableRow().newTableCell(C1W * INCH_TO_TWIPS).newParagraph().newText(
+ "Here's a table row with just one cell, width " + C1W + "''");
for (int row = 0; row < MAX_ROW; row++) {
final RtfTableRow r = tbl.newTableRow();
Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/visual/BitmapComparator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/visual/BitmapComparator.java?rev=1479969&r1=1479968&r2=1479969&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/visual/BitmapComparator.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/visual/BitmapComparator.java Tue May 7 16:23:13 2013
@@ -83,8 +83,8 @@ public class BitmapComparator {
int [] refPix = null;
int [] genPix = null;
for (y = 0; y < h; y++) {
- refPix = refWR.getPixels (0, y, w, 1, refPix);
- genPix = genWR.getPixels (0, y, w, 1, genPix);
+ refPix = refWR.getPixels (0, y, w, 1, refPix);
+ genPix = genWR.getPixels (0, y, w, 1, genPix);
for (i = 0; i < refPix.length; i++) {
// val = ((genPix[i] - refPix[i]) * 5) + 128;
val = ((refPix[i] - genPix[i]) * 10) + 128;
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org