--to-acip-text and --to-wylie-text added; these get you text files,

not RTF files like --to-acip and --to-wylie do.  The GUI converter
doesn't yet allow you to get text files.
This commit is contained in:
dchandler 2003-09-04 05:16:47 +00:00
parent cc615f34df
commit 4abbf6db37
3 changed files with 49 additions and 9 deletions

View file

@ -129,6 +129,22 @@ public class TibetanDocument extends DefaultStyledDocument {
}
}
/** Saves the contents of this RTF document as text on out. If
* any TM or TMW is in the document, the output will be
* garbage. */
public void writeTextOutput(BufferedWriter out) throws IOException {
// DLC FIXME: try getting blocks of text; I bet it's a huge
// speedup.
try {
for (int i = 0; i < getLength(); i++) {
out.write(getText(i,1));
}
} catch (BadLocationException e) {
throw new Error("can't happen");
}
}
/**
* Inserts Tibetan text into the document. The font size is applied automatically,
* according to the current Tibetan font size.