1 17 18 19 20 21 27 28 package org.apache.fop.render.rtf.rtflib.testdocs; 29 30 import java.io.IOException ; 31 32 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfDocumentArea; 33 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfSection; 34 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfParagraph; 35 36 39 40 class Whitespace extends TestDocument { 41 42 protected void generateDocument(RtfDocumentArea rda, RtfSection sect) 43 throws IOException { 44 final RtfParagraph p1 = sect.newParagraph(); 45 p1.newText("\t Each word of this paragraph must be " 46 + "separated\tfrom\t\n\tthe next word with exactly\t \tone"); 47 p1.newText(" space."); 48 49 final RtfParagraph p2 = sect.newParagraph(); 50 p2.newText(""); 51 p2.newText("In this"); 52 p2.newText(" paragraph "); 53 p2.newText("as well,"); 54 p2.newText(" there must\tbe \t"); 55 p2.newText("exactly"); 56 p2.newText(" one space "); 57 p2.newText("between each\tword and the next, and no spaces at the " 58 + "beginning or end of the paragraph."); 59 60 final RtfParagraph p3 = sect.newParagraph(); 61 p3.newText("The word 'boomerang' must be written after this with no funny spacing: "); 62 p3.newText("boo"); 63 p3.newText("me"); 64 p3.newText("r"); 65 p3.newText("a"); 66 p3.newText("ng."); 67 } 68 } | Popular Tags |