TM->TMW conversion has no known bugs. Oddballs have been

comprehensively handled.
This commit is contained in:
dchandler 2003-06-29 03:03:07 +00:00
parent 689c1910aa
commit 7938648ca8
5 changed files with 40 additions and 6 deletions

View file

@ -1015,8 +1015,12 @@ private static final DuffCode TMW_tab = new DuffCode(1, '\t');
public static DuffCode mapTMtoTMW(int font, int ordinal, int suggestedFont) {
if (font < 0 || font > 4)
return null;
if (ordinal >= 255)
return getUnusualTMtoTMW(font, ordinal);
if (ordinal >= 255) {
DuffCode rv = getUnusualTMtoTMW(font, ordinal);
if (null != rv && !ThdlOptions.getBooleanOption("thdl.do.not.fix.rtf.hex.escapes"))
throw new Error("oddballs still found after fixing RTF hex escapes");
return rv;
}
if (ordinal < 32) {
if (ordinal == (int)'\r') {
if (0 == suggestedFont)