riched20: Store the RTF key hash separately from the keys
Dmitry Timoshkov
dmitry at codeweavers.com
Wed Nov 29 04:06:02 CST 2006
Hello,
Changelog:
riched20: Store the RTF key hash separately from the keys.

dlls/riched20/reader.c  1502 ++++++++++++++++++++++++
1 files changed, 756 insertions(+), 746 deletions()
diff git a/dlls/riched20/reader.c b/dlls/riched20/reader.c
index 99431e8..26f1e2f 100644
 a/dlls/riched20/reader.c
+++ b/dlls/riched20/reader.c
@@ 1403,7 +1403,6 @@ struct RTFKey
int rtfKMajor; /* major number */
int rtfKMinor; /* minor number */
const char *rtfKStr; /* symbol name */
 int rtfKHash; /* symbol name hash value */
};
/*
@@ 1411,907 +1410,908 @@ struct RTFKey
* (all valid minor numbers are >= 0).
*/
static RTFKey rtfKey[] =
+static const RTFKey rtfKey[] =
{
/*
* Special characters
*/
 { rtfSpecialChar, rtfIIntVersion, "vern", 0 },
 { rtfSpecialChar, rtfICreateTime, "creatim", 0 },
 { rtfSpecialChar, rtfIRevisionTime, "revtim", 0 },
 { rtfSpecialChar, rtfIPrintTime, "printim", 0 },
 { rtfSpecialChar, rtfIBackupTime, "buptim", 0 },
 { rtfSpecialChar, rtfIEditTime, "edmins", 0 },
 { rtfSpecialChar, rtfIYear, "yr", 0 },
 { rtfSpecialChar, rtfIMonth, "mo", 0 },
 { rtfSpecialChar, rtfIDay, "dy", 0 },
 { rtfSpecialChar, rtfIHour, "hr", 0 },
 { rtfSpecialChar, rtfIMinute, "min", 0 },
 { rtfSpecialChar, rtfISecond, "sec", 0 },
 { rtfSpecialChar, rtfINPages, "nofpages", 0 },
 { rtfSpecialChar, rtfINWords, "nofwords", 0 },
 { rtfSpecialChar, rtfINChars, "nofchars", 0 },
 { rtfSpecialChar, rtfIIntID, "id", 0 },

 { rtfSpecialChar, rtfCurHeadDate, "chdate", 0 },
 { rtfSpecialChar, rtfCurHeadDateLong, "chdpl", 0 },
 { rtfSpecialChar, rtfCurHeadDateAbbrev, "chdpa", 0 },
 { rtfSpecialChar, rtfCurHeadTime, "chtime", 0 },
 { rtfSpecialChar, rtfCurHeadPage, "chpgn", 0 },
 { rtfSpecialChar, rtfSectNum, "sectnum", 0 },
 { rtfSpecialChar, rtfCurFNote, "chftn", 0 },
 { rtfSpecialChar, rtfCurAnnotRef, "chatn", 0 },
 { rtfSpecialChar, rtfFNoteSep, "chftnsep", 0 },
 { rtfSpecialChar, rtfFNoteCont, "chftnsepc", 0 },
 { rtfSpecialChar, rtfCell, "cell", 0 },
 { rtfSpecialChar, rtfRow, "row", 0 },
 { rtfSpecialChar, rtfPar, "par", 0 },
+ { rtfSpecialChar, rtfIIntVersion, "vern" },
+ { rtfSpecialChar, rtfICreateTime, "creatim" },
+ { rtfSpecialChar, rtfIRevisionTime, "revtim" },
+ { rtfSpecialChar, rtfIPrintTime, "printim" },
+ { rtfSpecialChar, rtfIBackupTime, "buptim" },
+ { rtfSpecialChar, rtfIEditTime, "edmins" },
+ { rtfSpecialChar, rtfIYear, "yr" },
+ { rtfSpecialChar, rtfIMonth, "mo" },
+ { rtfSpecialChar, rtfIDay, "dy" },
+ { rtfSpecialChar, rtfIHour, "hr" },
+ { rtfSpecialChar, rtfIMinute, "min" },
+ { rtfSpecialChar, rtfISecond, "sec" },
+ { rtfSpecialChar, rtfINPages, "nofpages" },
+ { rtfSpecialChar, rtfINWords, "nofwords" },
+ { rtfSpecialChar, rtfINChars, "nofchars" },
+ { rtfSpecialChar, rtfIIntID, "id" },
+
+ { rtfSpecialChar, rtfCurHeadDate, "chdate" },
+ { rtfSpecialChar, rtfCurHeadDateLong, "chdpl" },
+ { rtfSpecialChar, rtfCurHeadDateAbbrev, "chdpa" },
+ { rtfSpecialChar, rtfCurHeadTime, "chtime" },
+ { rtfSpecialChar, rtfCurHeadPage, "chpgn" },
+ { rtfSpecialChar, rtfSectNum, "sectnum" },
+ { rtfSpecialChar, rtfCurFNote, "chftn" },
+ { rtfSpecialChar, rtfCurAnnotRef, "chatn" },
+ { rtfSpecialChar, rtfFNoteSep, "chftnsep" },
+ { rtfSpecialChar, rtfFNoteCont, "chftnsepc" },
+ { rtfSpecialChar, rtfCell, "cell" },
+ { rtfSpecialChar, rtfRow, "row" },
+ { rtfSpecialChar, rtfPar, "par" },
/* newline and carriage return are synonyms for */
/* \par when they are preceded by a \ character */
 { rtfSpecialChar, rtfPar, "\n", 0 },
 { rtfSpecialChar, rtfPar, "\r", 0 },
 { rtfSpecialChar, rtfSect, "sect", 0 },
 { rtfSpecialChar, rtfPage, "page", 0 },
 { rtfSpecialChar, rtfColumn, "column", 0 },
 { rtfSpecialChar, rtfLine, "line", 0 },
 { rtfSpecialChar, rtfSoftPage, "softpage", 0 },
 { rtfSpecialChar, rtfSoftColumn, "softcol", 0 },
 { rtfSpecialChar, rtfSoftLine, "softline", 0 },
 { rtfSpecialChar, rtfSoftLineHt, "softlheight", 0 },
 { rtfSpecialChar, rtfTab, "tab", 0 },
 { rtfSpecialChar, rtfEmDash, "emdash", 0 },
 { rtfSpecialChar, rtfEnDash, "endash", 0 },
 { rtfSpecialChar, rtfEmSpace, "emspace", 0 },
 { rtfSpecialChar, rtfEnSpace, "enspace", 0 },
 { rtfSpecialChar, rtfBullet, "bullet", 0 },
 { rtfSpecialChar, rtfLQuote, "lquote", 0 },
 { rtfSpecialChar, rtfRQuote, "rquote", 0 },
 { rtfSpecialChar, rtfLDblQuote, "ldblquote", 0 },
 { rtfSpecialChar, rtfRDblQuote, "rdblquote", 0 },
 { rtfSpecialChar, rtfFormula, "", 0 },
 { rtfSpecialChar, rtfNoBrkSpace, "~", 0 },
 { rtfSpecialChar, rtfNoReqHyphen, "", 0 },
 { rtfSpecialChar, rtfNoBrkHyphen, "_", 0 },
 { rtfSpecialChar, rtfOptDest, "*", 0 },
 { rtfSpecialChar, rtfLTRMark, "ltrmark", 0 },
 { rtfSpecialChar, rtfRTLMark, "rtlmark", 0 },
 { rtfSpecialChar, rtfNoWidthJoiner, "zwj", 0 },
 { rtfSpecialChar, rtfNoWidthNonJoiner, "zwnj", 0 },
+ { rtfSpecialChar, rtfPar, "\n" },
+ { rtfSpecialChar, rtfPar, "\r" },
+ { rtfSpecialChar, rtfSect, "sect" },
+ { rtfSpecialChar, rtfPage, "page" },
+ { rtfSpecialChar, rtfColumn, "column" },
+ { rtfSpecialChar, rtfLine, "line" },
+ { rtfSpecialChar, rtfSoftPage, "softpage" },
+ { rtfSpecialChar, rtfSoftColumn, "softcol" },
+ { rtfSpecialChar, rtfSoftLine, "softline" },
+ { rtfSpecialChar, rtfSoftLineHt, "softlheight" },
+ { rtfSpecialChar, rtfTab, "tab" },
+ { rtfSpecialChar, rtfEmDash, "emdash" },
+ { rtfSpecialChar, rtfEnDash, "endash" },
+ { rtfSpecialChar, rtfEmSpace, "emspace" },
+ { rtfSpecialChar, rtfEnSpace, "enspace" },
+ { rtfSpecialChar, rtfBullet, "bullet" },
+ { rtfSpecialChar, rtfLQuote, "lquote" },
+ { rtfSpecialChar, rtfRQuote, "rquote" },
+ { rtfSpecialChar, rtfLDblQuote, "ldblquote" },
+ { rtfSpecialChar, rtfRDblQuote, "rdblquote" },
+ { rtfSpecialChar, rtfFormula, "" },
+ { rtfSpecialChar, rtfNoBrkSpace, "~" },
+ { rtfSpecialChar, rtfNoReqHyphen, "" },
+ { rtfSpecialChar, rtfNoBrkHyphen, "_" },
+ { rtfSpecialChar, rtfOptDest, "*" },
+ { rtfSpecialChar, rtfLTRMark, "ltrmark" },
+ { rtfSpecialChar, rtfRTLMark, "rtlmark" },
+ { rtfSpecialChar, rtfNoWidthJoiner, "zwj" },
+ { rtfSpecialChar, rtfNoWidthNonJoiner, "zwnj" },
/* is this valid? */
 { rtfSpecialChar, rtfCurHeadPict, "chpict", 0 },
 { rtfSpecialChar, rtfUnicode, "u", 0 },
+ { rtfSpecialChar, rtfCurHeadPict, "chpict" },
+ { rtfSpecialChar, rtfUnicode, "u" },
/*
* Character formatting attributes
*/
 { rtfCharAttr, rtfPlain, "plain", 0 },
 { rtfCharAttr, rtfBold, "b", 0 },
 { rtfCharAttr, rtfAllCaps, "caps", 0 },
 { rtfCharAttr, rtfDeleted, "deleted", 0 },
 { rtfCharAttr, rtfSubScript, "dn", 0 },
 { rtfCharAttr, rtfSubScrShrink, "sub", 0 },
 { rtfCharAttr, rtfNoSuperSub, "nosupersub", 0 },
 { rtfCharAttr, rtfExpand, "expnd", 0 },
 { rtfCharAttr, rtfExpandTwips, "expndtw", 0 },
 { rtfCharAttr, rtfKerning, "kerning", 0 },
 { rtfCharAttr, rtfFontNum, "f", 0 },
 { rtfCharAttr, rtfFontSize, "fs", 0 },
 { rtfCharAttr, rtfItalic, "i", 0 },
 { rtfCharAttr, rtfOutline, "outl", 0 },
 { rtfCharAttr, rtfRevised, "revised", 0 },
 { rtfCharAttr, rtfRevAuthor, "revauth", 0 },
 { rtfCharAttr, rtfRevDTTM, "revdttm", 0 },
 { rtfCharAttr, rtfSmallCaps, "scaps", 0 },
 { rtfCharAttr, rtfShadow, "shad", 0 },
 { rtfCharAttr, rtfStrikeThru, "strike", 0 },
 { rtfCharAttr, rtfUnderline, "ul", 0 },
 { rtfCharAttr, rtfDotUnderline, "uld", 0 },
 { rtfCharAttr, rtfDbUnderline, "uldb", 0 },
 { rtfCharAttr, rtfNoUnderline, "ulnone", 0 },
 { rtfCharAttr, rtfWordUnderline, "ulw", 0 },
 { rtfCharAttr, rtfSuperScript, "up", 0 },
 { rtfCharAttr, rtfSuperScrShrink, "super", 0 },
 { rtfCharAttr, rtfInvisible, "v", 0 },
 { rtfCharAttr, rtfForeColor, "cf", 0 },
 { rtfCharAttr, rtfBackColor, "cb", 0 },
 { rtfCharAttr, rtfRTLChar, "rtlch", 0 },
 { rtfCharAttr, rtfLTRChar, "ltrch", 0 },
 { rtfCharAttr, rtfCharStyleNum, "cs", 0 },
 { rtfCharAttr, rtfCharCharSet, "cchs", 0 },
 { rtfCharAttr, rtfLanguage, "lang", 0 },
+ { rtfCharAttr, rtfPlain, "plain" },
+ { rtfCharAttr, rtfBold, "b" },
+ { rtfCharAttr, rtfAllCaps, "caps" },
+ { rtfCharAttr, rtfDeleted, "deleted" },
+ { rtfCharAttr, rtfSubScript, "dn" },
+ { rtfCharAttr, rtfSubScrShrink, "sub" },
+ { rtfCharAttr, rtfNoSuperSub, "nosupersub" },
+ { rtfCharAttr, rtfExpand, "expnd" },
+ { rtfCharAttr, rtfExpandTwips, "expndtw" },
+ { rtfCharAttr, rtfKerning, "kerning" },
+ { rtfCharAttr, rtfFontNum, "f" },
+ { rtfCharAttr, rtfFontSize, "fs" },
+ { rtfCharAttr, rtfItalic, "i" },
+ { rtfCharAttr, rtfOutline, "outl" },
+ { rtfCharAttr, rtfRevised, "revised" },
+ { rtfCharAttr, rtfRevAuthor, "revauth" },
+ { rtfCharAttr, rtfRevDTTM, "revdttm" },
+ { rtfCharAttr, rtfSmallCaps, "scaps" },
+ { rtfCharAttr, rtfShadow, "shad" },
+ { rtfCharAttr, rtfStrikeThru, "strike" },
+ { rtfCharAttr, rtfUnderline, "ul" },
+ { rtfCharAttr, rtfDotUnderline, "uld" },
+ { rtfCharAttr, rtfDbUnderline, "uldb" },
+ { rtfCharAttr, rtfNoUnderline, "ulnone" },
+ { rtfCharAttr, rtfWordUnderline, "ulw" },
+ { rtfCharAttr, rtfSuperScript, "up" },
+ { rtfCharAttr, rtfSuperScrShrink, "super" },
+ { rtfCharAttr, rtfInvisible, "v" },
+ { rtfCharAttr, rtfForeColor, "cf" },
+ { rtfCharAttr, rtfBackColor, "cb" },
+ { rtfCharAttr, rtfRTLChar, "rtlch" },
+ { rtfCharAttr, rtfLTRChar, "ltrch" },
+ { rtfCharAttr, rtfCharStyleNum, "cs" },
+ { rtfCharAttr, rtfCharCharSet, "cchs" },
+ { rtfCharAttr, rtfLanguage, "lang" },
/* this has disappeared from spec 1.2 */
 { rtfCharAttr, rtfGray, "gray", 0 },
 { rtfCharAttr, rtfUnicodeLength, "uc", 0 },
+ { rtfCharAttr, rtfGray, "gray" },
+ { rtfCharAttr, rtfUnicodeLength, "uc" },
/*
* Paragraph formatting attributes
*/
 { rtfParAttr, rtfParDef, "pard", 0 },
 { rtfParAttr, rtfStyleNum, "s", 0 },
 { rtfParAttr, rtfHyphenate, "hyphpar", 0 },
 { rtfParAttr, rtfInTable, "intbl", 0 },
 { rtfParAttr, rtfKeep, "keep", 0 },
 { rtfParAttr, rtfNoWidowControl, "nowidctlpar", 0 },
 { rtfParAttr, rtfKeepNext, "keepn", 0 },
 { rtfParAttr, rtfOutlineLevel, "level", 0 },
 { rtfParAttr, rtfNoLineNum, "noline", 0 },
 { rtfParAttr, rtfPBBefore, "pagebb", 0 },
 { rtfParAttr, rtfSideBySide, "sbys", 0 },
 { rtfParAttr, rtfQuadLeft, "ql", 0 },
 { rtfParAttr, rtfQuadRight, "qr", 0 },
 { rtfParAttr, rtfQuadJust, "qj", 0 },
 { rtfParAttr, rtfQuadCenter, "qc", 0 },
 { rtfParAttr, rtfFirstIndent, "fi", 0 },
 { rtfParAttr, rtfLeftIndent, "li", 0 },
 { rtfParAttr, rtfRightIndent, "ri", 0 },
 { rtfParAttr, rtfSpaceBefore, "sb", 0 },
 { rtfParAttr, rtfSpaceAfter, "sa", 0 },
 { rtfParAttr, rtfSpaceBetween, "sl", 0 },
 { rtfParAttr, rtfSpaceMultiply, "slmult", 0 },

 { rtfParAttr, rtfSubDocument, "subdocument", 0 },

 { rtfParAttr, rtfRTLPar, "rtlpar", 0 },
 { rtfParAttr, rtfLTRPar, "ltrpar", 0 },

 { rtfParAttr, rtfTabPos, "tx", 0 },
+ { rtfParAttr, rtfParDef, "pard" },
+ { rtfParAttr, rtfStyleNum, "s" },
+ { rtfParAttr, rtfHyphenate, "hyphpar" },
+ { rtfParAttr, rtfInTable, "intbl" },
+ { rtfParAttr, rtfKeep, "keep" },
+ { rtfParAttr, rtfNoWidowControl, "nowidctlpar" },
+ { rtfParAttr, rtfKeepNext, "keepn" },
+ { rtfParAttr, rtfOutlineLevel, "level" },
+ { rtfParAttr, rtfNoLineNum, "noline" },
+ { rtfParAttr, rtfPBBefore, "pagebb" },
+ { rtfParAttr, rtfSideBySide, "sbys" },
+ { rtfParAttr, rtfQuadLeft, "ql" },
+ { rtfParAttr, rtfQuadRight, "qr" },
+ { rtfParAttr, rtfQuadJust, "qj" },
+ { rtfParAttr, rtfQuadCenter, "qc" },
+ { rtfParAttr, rtfFirstIndent, "fi" },
+ { rtfParAttr, rtfLeftIndent, "li" },
+ { rtfParAttr, rtfRightIndent, "ri" },
+ { rtfParAttr, rtfSpaceBefore, "sb" },
+ { rtfParAttr, rtfSpaceAfter, "sa" },
+ { rtfParAttr, rtfSpaceBetween, "sl" },
+ { rtfParAttr, rtfSpaceMultiply, "slmult" },
+
+ { rtfParAttr, rtfSubDocument, "subdocument" },
+
+ { rtfParAttr, rtfRTLPar, "rtlpar" },
+ { rtfParAttr, rtfLTRPar, "ltrpar" },
+
+ { rtfParAttr, rtfTabPos, "tx" },
/*
* FrameMaker writes \tql (to mean leftjustified tab, apparently)
* although it's not in the spec. It's also redundant, since lj
* tabs are the default.
*/
 { rtfParAttr, rtfTabLeft, "tql", 0 },
 { rtfParAttr, rtfTabRight, "tqr", 0 },
 { rtfParAttr, rtfTabCenter, "tqc", 0 },
 { rtfParAttr, rtfTabDecimal, "tqdec", 0 },
 { rtfParAttr, rtfTabBar, "tb", 0 },
 { rtfParAttr, rtfLeaderDot, "tldot", 0 },
 { rtfParAttr, rtfLeaderHyphen, "tlhyph", 0 },
 { rtfParAttr, rtfLeaderUnder, "tlul", 0 },
 { rtfParAttr, rtfLeaderThick, "tlth", 0 },
 { rtfParAttr, rtfLeaderEqual, "tleq", 0 },

 { rtfParAttr, rtfParLevel, "pnlvl", 0 },
 { rtfParAttr, rtfParBullet, "pnlvlblt", 0 },
 { rtfParAttr, rtfParSimple, "pnlvlbody", 0 },
 { rtfParAttr, rtfParNumCont, "pnlvlcont", 0 },
 { rtfParAttr, rtfParNumOnce, "pnnumonce", 0 },
 { rtfParAttr, rtfParNumAcross, "pnacross", 0 },
 { rtfParAttr, rtfParHangIndent, "pnhang", 0 },
 { rtfParAttr, rtfParNumRestart, "pnrestart", 0 },
 { rtfParAttr, rtfParNumCardinal, "pncard", 0 },
 { rtfParAttr, rtfParNumDecimal, "pndec", 0 },
 { rtfParAttr, rtfParNumULetter, "pnucltr", 0 },
 { rtfParAttr, rtfParNumURoman, "pnucrm", 0 },
 { rtfParAttr, rtfParNumLLetter, "pnlcltr", 0 },
 { rtfParAttr, rtfParNumLRoman, "pnlcrm", 0 },
 { rtfParAttr, rtfParNumOrdinal, "pnord", 0 },
 { rtfParAttr, rtfParNumOrdinalText, "pnordt", 0 },
 { rtfParAttr, rtfParNumBold, "pnb", 0 },
 { rtfParAttr, rtfParNumItalic, "pni", 0 },
 { rtfParAttr, rtfParNumAllCaps, "pncaps", 0 },
 { rtfParAttr, rtfParNumSmallCaps, "pnscaps", 0 },
 { rtfParAttr, rtfParNumUnder, "pnul", 0 },
 { rtfParAttr, rtfParNumDotUnder, "pnuld", 0 },
 { rtfParAttr, rtfParNumDbUnder, "pnuldb", 0 },
 { rtfParAttr, rtfParNumNoUnder, "pnulnone", 0 },
 { rtfParAttr, rtfParNumWordUnder, "pnulw", 0 },
 { rtfParAttr, rtfParNumStrikethru, "pnstrike", 0 },
 { rtfParAttr, rtfParNumForeColor, "pncf", 0 },
 { rtfParAttr, rtfParNumFont, "pnf", 0 },
 { rtfParAttr, rtfParNumFontSize, "pnfs", 0 },
 { rtfParAttr, rtfParNumIndent, "pnindent", 0 },
 { rtfParAttr, rtfParNumSpacing, "pnsp", 0 },
 { rtfParAttr, rtfParNumInclPrev, "pnprev", 0 },
 { rtfParAttr, rtfParNumCenter, "pnqc", 0 },
 { rtfParAttr, rtfParNumLeft, "pnql", 0 },
 { rtfParAttr, rtfParNumRight, "pnqr", 0 },
 { rtfParAttr, rtfParNumStartAt, "pnstart", 0 },

 { rtfParAttr, rtfBorderTop, "brdrt", 0 },
 { rtfParAttr, rtfBorderBottom, "brdrb", 0 },
 { rtfParAttr, rtfBorderLeft, "brdrl", 0 },
 { rtfParAttr, rtfBorderRight, "brdrr", 0 },
 { rtfParAttr, rtfBorderBetween, "brdrbtw", 0 },
 { rtfParAttr, rtfBorderBar, "brdrbar", 0 },
 { rtfParAttr, rtfBorderBox, "box", 0 },
 { rtfParAttr, rtfBorderSingle, "brdrs", 0 },
 { rtfParAttr, rtfBorderThick, "brdrth", 0 },
 { rtfParAttr, rtfBorderShadow, "brdrsh", 0 },
 { rtfParAttr, rtfBorderDouble, "brdrdb", 0 },
 { rtfParAttr, rtfBorderDot, "brdrdot", 0 },
 { rtfParAttr, rtfBorderDot, "brdrdash", 0 },
 { rtfParAttr, rtfBorderHair, "brdrhair", 0 },
 { rtfParAttr, rtfBorderWidth, "brdrw", 0 },
 { rtfParAttr, rtfBorderColor, "brdrcf", 0 },
 { rtfParAttr, rtfBorderSpace, "brsp", 0 },

 { rtfParAttr, rtfShading, "shading", 0 },
 { rtfParAttr, rtfBgPatH, "bghoriz", 0 },
 { rtfParAttr, rtfBgPatV, "bgvert", 0 },
 { rtfParAttr, rtfFwdDiagBgPat, "bgfdiag", 0 },
 { rtfParAttr, rtfBwdDiagBgPat, "bgbdiag", 0 },
 { rtfParAttr, rtfHatchBgPat, "bgcross", 0 },
 { rtfParAttr, rtfDiagHatchBgPat, "bgdcross", 0 },
 { rtfParAttr, rtfDarkBgPatH, "bgdkhoriz", 0 },
 { rtfParAttr, rtfDarkBgPatV, "bgdkvert", 0 },
 { rtfParAttr, rtfFwdDarkBgPat, "bgdkfdiag", 0 },
 { rtfParAttr, rtfBwdDarkBgPat, "bgdkbdiag", 0 },
 { rtfParAttr, rtfDarkHatchBgPat, "bgdkcross", 0 },
 { rtfParAttr, rtfDarkDiagHatchBgPat, "bgdkdcross", 0 },
 { rtfParAttr, rtfBgPatLineColor, "cfpat", 0 },
 { rtfParAttr, rtfBgPatColor, "cbpat", 0 },
+ { rtfParAttr, rtfTabLeft, "tql" },
+ { rtfParAttr, rtfTabRight, "tqr" },
+ { rtfParAttr, rtfTabCenter, "tqc" },
+ { rtfParAttr, rtfTabDecimal, "tqdec" },
+ { rtfParAttr, rtfTabBar, "tb" },
+ { rtfParAttr, rtfLeaderDot, "tldot" },
+ { rtfParAttr, rtfLeaderHyphen, "tlhyph" },
+ { rtfParAttr, rtfLeaderUnder, "tlul" },
+ { rtfParAttr, rtfLeaderThick, "tlth" },
+ { rtfParAttr, rtfLeaderEqual, "tleq" },
+
+ { rtfParAttr, rtfParLevel, "pnlvl" },
+ { rtfParAttr, rtfParBullet, "pnlvlblt" },
+ { rtfParAttr, rtfParSimple, "pnlvlbody" },
+ { rtfParAttr, rtfParNumCont, "pnlvlcont" },
+ { rtfParAttr, rtfParNumOnce, "pnnumonce" },
+ { rtfParAttr, rtfParNumAcross, "pnacross" },
+ { rtfParAttr, rtfParHangIndent, "pnhang" },
+ { rtfParAttr, rtfParNumRestart, "pnrestart" },
+ { rtfParAttr, rtfParNumCardinal, "pncard" },
+ { rtfParAttr, rtfParNumDecimal, "pndec" },
+ { rtfParAttr, rtfParNumULetter, "pnucltr" },
+ { rtfParAttr, rtfParNumURoman, "pnucrm" },
+ { rtfParAttr, rtfParNumLLetter, "pnlcltr" },
+ { rtfParAttr, rtfParNumLRoman, "pnlcrm" },
+ { rtfParAttr, rtfParNumOrdinal, "pnord" },
+ { rtfParAttr, rtfParNumOrdinalText, "pnordt" },
+ { rtfParAttr, rtfParNumBold, "pnb" },
+ { rtfParAttr, rtfParNumItalic, "pni" },
+ { rtfParAttr, rtfParNumAllCaps, "pncaps" },
+ { rtfParAttr, rtfParNumSmallCaps, "pnscaps" },
+ { rtfParAttr, rtfParNumUnder, "pnul" },
+ { rtfParAttr, rtfParNumDotUnder, "pnuld" },
+ { rtfParAttr, rtfParNumDbUnder, "pnuldb" },
+ { rtfParAttr, rtfParNumNoUnder, "pnulnone" },
+ { rtfParAttr, rtfParNumWordUnder, "pnulw" },
+ { rtfParAttr, rtfParNumStrikethru, "pnstrike" },
+ { rtfParAttr, rtfParNumForeColor, "pncf" },
+ { rtfParAttr, rtfParNumFont, "pnf" },
+ { rtfParAttr, rtfParNumFontSize, "pnfs" },
+ { rtfParAttr, rtfParNumIndent, "pnindent" },
+ { rtfParAttr, rtfParNumSpacing, "pnsp" },
+ { rtfParAttr, rtfParNumInclPrev, "pnprev" },
+ { rtfParAttr, rtfParNumCenter, "pnqc" },
+ { rtfParAttr, rtfParNumLeft, "pnql" },
+ { rtfParAttr, rtfParNumRight, "pnqr" },
+ { rtfParAttr, rtfParNumStartAt, "pnstart" },
+
+ { rtfParAttr, rtfBorderTop, "brdrt" },
+ { rtfParAttr, rtfBorderBottom, "brdrb" },
+ { rtfParAttr, rtfBorderLeft, "brdrl" },
+ { rtfParAttr, rtfBorderRight, "brdrr" },
+ { rtfParAttr, rtfBorderBetween, "brdrbtw" },
+ { rtfParAttr, rtfBorderBar, "brdrbar" },
+ { rtfParAttr, rtfBorderBox, "box" },
+ { rtfParAttr, rtfBorderSingle, "brdrs" },
+ { rtfParAttr, rtfBorderThick, "brdrth" },
+ { rtfParAttr, rtfBorderShadow, "brdrsh" },
+ { rtfParAttr, rtfBorderDouble, "brdrdb" },
+ { rtfParAttr, rtfBorderDot, "brdrdot" },
+ { rtfParAttr, rtfBorderDot, "brdrdash" },
+ { rtfParAttr, rtfBorderHair, "brdrhair" },
+ { rtfParAttr, rtfBorderWidth, "brdrw" },
+ { rtfParAttr, rtfBorderColor, "brdrcf" },
+ { rtfParAttr, rtfBorderSpace, "brsp" },
+
+ { rtfParAttr, rtfShading, "shading" },
+ { rtfParAttr, rtfBgPatH, "bghoriz" },
+ { rtfParAttr, rtfBgPatV, "bgvert" },
+ { rtfParAttr, rtfFwdDiagBgPat, "bgfdiag" },
+ { rtfParAttr, rtfBwdDiagBgPat, "bgbdiag" },
+ { rtfParAttr, rtfHatchBgPat, "bgcross" },
+ { rtfParAttr, rtfDiagHatchBgPat, "bgdcross" },
+ { rtfParAttr, rtfDarkBgPatH, "bgdkhoriz" },
+ { rtfParAttr, rtfDarkBgPatV, "bgdkvert" },
+ { rtfParAttr, rtfFwdDarkBgPat, "bgdkfdiag" },
+ { rtfParAttr, rtfBwdDarkBgPat, "bgdkbdiag" },
+ { rtfParAttr, rtfDarkHatchBgPat, "bgdkcross" },
+ { rtfParAttr, rtfDarkDiagHatchBgPat, "bgdkdcross" },
+ { rtfParAttr, rtfBgPatLineColor, "cfpat" },
+ { rtfParAttr, rtfBgPatColor, "cbpat" },
/*
* Section formatting attributes
*/
 { rtfSectAttr, rtfSectDef, "sectd", 0 },
 { rtfSectAttr, rtfENoteHere, "endnhere", 0 },
 { rtfSectAttr, rtfPrtBinFirst, "binfsxn", 0 },
 { rtfSectAttr, rtfPrtBin, "binsxn", 0 },
 { rtfSectAttr, rtfSectStyleNum, "ds", 0 },

 { rtfSectAttr, rtfNoBreak, "sbknone", 0 },
 { rtfSectAttr, rtfColBreak, "sbkcol", 0 },
 { rtfSectAttr, rtfPageBreak, "sbkpage", 0 },
 { rtfSectAttr, rtfEvenBreak, "sbkeven", 0 },
 { rtfSectAttr, rtfOddBreak, "sbkodd", 0 },

 { rtfSectAttr, rtfColumns, "cols", 0 },
 { rtfSectAttr, rtfColumnSpace, "colsx", 0 },
 { rtfSectAttr, rtfColumnNumber, "colno", 0 },
 { rtfSectAttr, rtfColumnSpRight, "colsr", 0 },
 { rtfSectAttr, rtfColumnWidth, "colw", 0 },
 { rtfSectAttr, rtfColumnLine, "linebetcol", 0 },

 { rtfSectAttr, rtfLineModulus, "linemod", 0 },
 { rtfSectAttr, rtfLineDist, "linex", 0 },
 { rtfSectAttr, rtfLineStarts, "linestarts", 0 },
 { rtfSectAttr, rtfLineRestart, "linerestart", 0 },
 { rtfSectAttr, rtfLineRestartPg, "lineppage", 0 },
 { rtfSectAttr, rtfLineCont, "linecont", 0 },

 { rtfSectAttr, rtfSectPageWid, "pgwsxn", 0 },
 { rtfSectAttr, rtfSectPageHt, "pghsxn", 0 },
 { rtfSectAttr, rtfSectMarginLeft, "marglsxn", 0 },
 { rtfSectAttr, rtfSectMarginRight, "margrsxn", 0 },
 { rtfSectAttr, rtfSectMarginTop, "margtsxn", 0 },
 { rtfSectAttr, rtfSectMarginBottom, "margbsxn", 0 },
 { rtfSectAttr, rtfSectMarginGutter, "guttersxn", 0 },
 { rtfSectAttr, rtfSectLandscape, "lndscpsxn", 0 },
 { rtfSectAttr, rtfTitleSpecial, "titlepg", 0 },
 { rtfSectAttr, rtfHeaderY, "headery", 0 },
 { rtfSectAttr, rtfFooterY, "footery", 0 },

 { rtfSectAttr, rtfPageStarts, "pgnstarts", 0 },
 { rtfSectAttr, rtfPageCont, "pgncont", 0 },
 { rtfSectAttr, rtfPageRestart, "pgnrestart", 0 },
 { rtfSectAttr, rtfPageNumRight, "pgnx", 0 },
 { rtfSectAttr, rtfPageNumTop, "pgny", 0 },
 { rtfSectAttr, rtfPageDecimal, "pgndec", 0 },
 { rtfSectAttr, rtfPageURoman, "pgnucrm", 0 },
 { rtfSectAttr, rtfPageLRoman, "pgnlcrm", 0 },
 { rtfSectAttr, rtfPageULetter, "pgnucltr", 0 },
 { rtfSectAttr, rtfPageLLetter, "pgnlcltr", 0 },
 { rtfSectAttr, rtfPageNumHyphSep, "pgnhnsh", 0 },
 { rtfSectAttr, rtfPageNumSpaceSep, "pgnhnsp", 0 },
 { rtfSectAttr, rtfPageNumColonSep, "pgnhnsc", 0 },
 { rtfSectAttr, rtfPageNumEmdashSep, "pgnhnsm", 0 },
 { rtfSectAttr, rtfPageNumEndashSep, "pgnhnsn", 0 },

 { rtfSectAttr, rtfTopVAlign, "vertalt", 0 },
+ { rtfSectAttr, rtfSectDef, "sectd" },
+ { rtfSectAttr, rtfENoteHere, "endnhere" },
+ { rtfSectAttr, rtfPrtBinFirst, "binfsxn" },
+ { rtfSectAttr, rtfPrtBin, "binsxn" },
+ { rtfSectAttr, rtfSectStyleNum, "ds" },
+
+ { rtfSectAttr, rtfNoBreak, "sbknone" },
+ { rtfSectAttr, rtfColBreak, "sbkcol" },
+ { rtfSectAttr, rtfPageBreak, "sbkpage" },
+ { rtfSectAttr, rtfEvenBreak, "sbkeven" },
+ { rtfSectAttr, rtfOddBreak, "sbkodd" },
+
+ { rtfSectAttr, rtfColumns, "cols" },
+ { rtfSectAttr, rtfColumnSpace, "colsx" },
+ { rtfSectAttr, rtfColumnNumber, "colno" },
+ { rtfSectAttr, rtfColumnSpRight, "colsr" },
+ { rtfSectAttr, rtfColumnWidth, "colw" },
+ { rtfSectAttr, rtfColumnLine, "linebetcol" },
+
+ { rtfSectAttr, rtfLineModulus, "linemod" },
+ { rtfSectAttr, rtfLineDist, "linex" },
+ { rtfSectAttr, rtfLineStarts, "linestarts" },
+ { rtfSectAttr, rtfLineRestart, "linerestart" },
+ { rtfSectAttr, rtfLineRestartPg, "lineppage" },
+ { rtfSectAttr, rtfLineCont, "linecont" },
+
+ { rtfSectAttr, rtfSectPageWid, "pgwsxn" },
+ { rtfSectAttr, rtfSectPageHt, "pghsxn" },
+ { rtfSectAttr, rtfSectMarginLeft, "marglsxn" },
+ { rtfSectAttr, rtfSectMarginRight, "margrsxn" },
+ { rtfSectAttr, rtfSectMarginTop, "margtsxn" },
+ { rtfSectAttr, rtfSectMarginBottom, "margbsxn" },
+ { rtfSectAttr, rtfSectMarginGutter, "guttersxn" },
+ { rtfSectAttr, rtfSectLandscape, "lndscpsxn" },
+ { rtfSectAttr, rtfTitleSpecial, "titlepg" },
+ { rtfSectAttr, rtfHeaderY, "headery" },
+ { rtfSectAttr, rtfFooterY, "footery" },
+
+ { rtfSectAttr, rtfPageStarts, "pgnstarts" },
+ { rtfSectAttr, rtfPageCont, "pgncont" },
+ { rtfSectAttr, rtfPageRestart, "pgnrestart" },
+ { rtfSectAttr, rtfPageNumRight, "pgnx" },
+ { rtfSectAttr, rtfPageNumTop, "pgny" },
+ { rtfSectAttr, rtfPageDecimal, "pgndec" },
+ { rtfSectAttr, rtfPageURoman, "pgnucrm" },
+ { rtfSectAttr, rtfPageLRoman, "pgnlcrm" },
+ { rtfSectAttr, rtfPageULetter, "pgnucltr" },
+ { rtfSectAttr, rtfPageLLetter, "pgnlcltr" },
+ { rtfSectAttr, rtfPageNumHyphSep, "pgnhnsh" },
+ { rtfSectAttr, rtfPageNumSpaceSep, "pgnhnsp" },
+ { rtfSectAttr, rtfPageNumColonSep, "pgnhnsc" },
+ { rtfSectAttr, rtfPageNumEmdashSep, "pgnhnsm" },
+ { rtfSectAttr, rtfPageNumEndashSep, "pgnhnsn" },
+
+ { rtfSectAttr, rtfTopVAlign, "vertalt" },
/* misspelled as "vertal" in specification 1.0 */
 { rtfSectAttr, rtfBottomVAlign, "vertalb", 0 },
 { rtfSectAttr, rtfCenterVAlign, "vertalc", 0 },
 { rtfSectAttr, rtfJustVAlign, "vertalj", 0 },
+ { rtfSectAttr, rtfBottomVAlign, "vertalb" },
+ { rtfSectAttr, rtfCenterVAlign, "vertalc" },
+ { rtfSectAttr, rtfJustVAlign, "vertalj" },
 { rtfSectAttr, rtfRTLSect, "rtlsect", 0 },
 { rtfSectAttr, rtfLTRSect, "ltrsect", 0 },
+ { rtfSectAttr, rtfRTLSect, "rtlsect" },
+ { rtfSectAttr, rtfLTRSect, "ltrsect" },
/* I've seen these in an old spec, but not in real files... */
 /*rtfSectAttr, rtfNoBreak, "nobreak", 0,*/
 /*rtfSectAttr, rtfColBreak, "colbreak", 0,*/
 /*rtfSectAttr, rtfPageBreak, "pagebreak", 0,*/
 /*rtfSectAttr, rtfEvenBreak, "evenbreak", 0,*/
 /*rtfSectAttr, rtfOddBreak, "oddbreak", 0,*/
+ /*rtfSectAttr, rtfNoBreak, "nobreak",*/
+ /*rtfSectAttr, rtfColBreak, "colbreak",*/
+ /*rtfSectAttr, rtfPageBreak, "pagebreak",*/
+ /*rtfSectAttr, rtfEvenBreak, "evenbreak",*/
+ /*rtfSectAttr, rtfOddBreak, "oddbreak",*/
/*
* Document formatting attributes
*/
 { rtfDocAttr, rtfDefTab, "deftab", 0 },
 { rtfDocAttr, rtfHyphHotZone, "hyphhotz", 0 },
 { rtfDocAttr, rtfHyphConsecLines, "hyphconsec", 0 },
 { rtfDocAttr, rtfHyphCaps, "hyphcaps", 0 },
 { rtfDocAttr, rtfHyphAuto, "hyphauto", 0 },
 { rtfDocAttr, rtfLineStart, "linestart", 0 },
 { rtfDocAttr, rtfFracWidth, "fracwidth", 0 },
+ { rtfDocAttr, rtfDefTab, "deftab" },
+ { rtfDocAttr, rtfHyphHotZone, "hyphhotz" },
+ { rtfDocAttr, rtfHyphConsecLines, "hyphconsec" },
+ { rtfDocAttr, rtfHyphCaps, "hyphcaps" },
+ { rtfDocAttr, rtfHyphAuto, "hyphauto" },
+ { rtfDocAttr, rtfLineStart, "linestart" },
+ { rtfDocAttr, rtfFracWidth, "fracwidth" },
/* \makeback was given in old version of spec, it's now */
/* listed as \makebackup */
 { rtfDocAttr, rtfMakeBackup, "makeback", 0 },
 { rtfDocAttr, rtfMakeBackup, "makebackup", 0 },
 { rtfDocAttr, rtfRTFDefault, "defformat", 0 },
 { rtfDocAttr, rtfPSOverlay, "psover", 0 },
 { rtfDocAttr, rtfDocTemplate, "doctemp", 0 },
 { rtfDocAttr, rtfDefLanguage, "deflang", 0 },

 { rtfDocAttr, rtfFENoteType, "fet", 0 },
 { rtfDocAttr, rtfFNoteEndSect, "endnotes", 0 },
 { rtfDocAttr, rtfFNoteEndDoc, "enddoc", 0 },
 { rtfDocAttr, rtfFNoteText, "ftntj", 0 },
 { rtfDocAttr, rtfFNoteBottom, "ftnbj", 0 },
 { rtfDocAttr, rtfENoteEndSect, "aendnotes", 0 },
 { rtfDocAttr, rtfENoteEndDoc, "aenddoc", 0 },
 { rtfDocAttr, rtfENoteText, "aftntj", 0 },
 { rtfDocAttr, rtfENoteBottom, "aftnbj", 0 },
 { rtfDocAttr, rtfFNoteStart, "ftnstart", 0 },
 { rtfDocAttr, rtfENoteStart, "aftnstart", 0 },
 { rtfDocAttr, rtfFNoteRestartPage, "ftnrstpg", 0 },
 { rtfDocAttr, rtfFNoteRestart, "ftnrestart", 0 },
 { rtfDocAttr, rtfFNoteRestartCont, "ftnrstcont", 0 },
 { rtfDocAttr, rtfENoteRestart, "aftnrestart", 0 },
 { rtfDocAttr, rtfENoteRestartCont, "aftnrstcont", 0 },
 { rtfDocAttr, rtfFNoteNumArabic, "ftnnar", 0 },
 { rtfDocAttr, rtfFNoteNumLLetter, "ftnnalc", 0 },
 { rtfDocAttr, rtfFNoteNumULetter, "ftnnauc", 0 },
 { rtfDocAttr, rtfFNoteNumLRoman, "ftnnrlc", 0 },
 { rtfDocAttr, rtfFNoteNumURoman, "ftnnruc", 0 },
 { rtfDocAttr, rtfFNoteNumChicago, "ftnnchi", 0 },
 { rtfDocAttr, rtfENoteNumArabic, "aftnnar", 0 },
 { rtfDocAttr, rtfENoteNumLLetter, "aftnnalc", 0 },
 { rtfDocAttr, rtfENoteNumULetter, "aftnnauc", 0 },
 { rtfDocAttr, rtfENoteNumLRoman, "aftnnrlc", 0 },
 { rtfDocAttr, rtfENoteNumURoman, "aftnnruc", 0 },
 { rtfDocAttr, rtfENoteNumChicago, "aftnnchi", 0 },

 { rtfDocAttr, rtfPaperWidth, "paperw", 0 },
 { rtfDocAttr, rtfPaperHeight, "paperh", 0 },
 { rtfDocAttr, rtfPaperSize, "psz", 0 },
 { rtfDocAttr, rtfLeftMargin, "margl", 0 },
 { rtfDocAttr, rtfRightMargin, "margr", 0 },
 { rtfDocAttr, rtfTopMargin, "margt", 0 },
 { rtfDocAttr, rtfBottomMargin, "margb", 0 },
 { rtfDocAttr, rtfFacingPage, "facingp", 0 },
 { rtfDocAttr, rtfGutterWid, "gutter", 0 },
 { rtfDocAttr, rtfMirrorMargin, "margmirror", 0 },
 { rtfDocAttr, rtfLandscape, "landscape", 0 },
 { rtfDocAttr, rtfPageStart, "pgnstart", 0 },
 { rtfDocAttr, rtfWidowCtrl, "widowctrl", 0 },

 { rtfDocAttr, rtfLinkStyles, "linkstyles", 0 },

 { rtfDocAttr, rtfNoAutoTabIndent, "notabind", 0 },
 { rtfDocAttr, rtfWrapSpaces, "wraptrsp", 0 },
 { rtfDocAttr, rtfPrintColorsBlack, "prcolbl", 0 },
 { rtfDocAttr, rtfNoExtraSpaceRL, "noextrasprl", 0 },
 { rtfDocAttr, rtfNoColumnBalance, "nocolbal", 0 },
 { rtfDocAttr, rtfCvtMailMergeQuote, "cvmme", 0 },
 { rtfDocAttr, rtfSuppressTopSpace, "sprstsp", 0 },
 { rtfDocAttr, rtfSuppressPreParSpace, "sprsspbf", 0 },
 { rtfDocAttr, rtfCombineTblBorders, "otblrul", 0 },
 { rtfDocAttr, rtfTranspMetafiles, "transmf", 0 },
 { rtfDocAttr, rtfSwapBorders, "swpbdr", 0 },
 { rtfDocAttr, rtfShowHardBreaks, "brkfrm", 0 },

 { rtfDocAttr, rtfFormProtected, "formprot", 0 },
 { rtfDocAttr, rtfAllProtected, "allprot", 0 },
 { rtfDocAttr, rtfFormShading, "formshade", 0 },
 { rtfDocAttr, rtfFormDisplay, "formdisp", 0 },
 { rtfDocAttr, rtfPrintData, "printdata", 0 },

 { rtfDocAttr, rtfRevProtected, "revprot", 0 },
 { rtfDocAttr, rtfRevisions, "revisions", 0 },
 { rtfDocAttr, rtfRevDisplay, "revprop", 0 },
 { rtfDocAttr, rtfRevBar, "revbar", 0 },

 { rtfDocAttr, rtfAnnotProtected, "annotprot", 0 },

 { rtfDocAttr, rtfRTLDoc, "rtldoc", 0 },
 { rtfDocAttr, rtfLTRDoc, "ltrdoc", 0 },

 { rtfDocAttr, rtfAnsiCodePage, "ansicpg", 0 },
 { rtfDocAttr, rtfUTF8RTF, "urtf", 0 },
+ { rtfDocAttr, rtfMakeBackup, "makeback" },
+ { rtfDocAttr, rtfMakeBackup, "makebackup" },
+ { rtfDocAttr, rtfRTFDefault, "defformat" },
+ { rtfDocAttr, rtfPSOverlay, "psover" },
+ { rtfDocAttr, rtfDocTemplate, "doctemp" },
+ { rtfDocAttr, rtfDefLanguage, "deflang" },
+
+ { rtfDocAttr, rtfFENoteType, "fet" },
+ { rtfDocAttr, rtfFNoteEndSect, "endnotes" },
+ { rtfDocAttr, rtfFNoteEndDoc, "enddoc" },
+ { rtfDocAttr, rtfFNoteText, "ftntj" },
+ { rtfDocAttr, rtfFNoteBottom, "ftnbj" },
+ { rtfDocAttr, rtfENoteEndSect, "aendnotes" },
+ { rtfDocAttr, rtfENoteEndDoc, "aenddoc" },
+ { rtfDocAttr, rtfENoteText, "aftntj" },
+ { rtfDocAttr, rtfENoteBottom, "aftnbj" },
+ { rtfDocAttr, rtfFNoteStart, "ftnstart" },
+ { rtfDocAttr, rtfENoteStart, "aftnstart" },
+ { rtfDocAttr, rtfFNoteRestartPage, "ftnrstpg" },
+ { rtfDocAttr, rtfFNoteRestart, "ftnrestart" },
+ { rtfDocAttr, rtfFNoteRestartCont, "ftnrstcont" },
+ { rtfDocAttr, rtfENoteRestart, "aftnrestart" },
+ { rtfDocAttr, rtfENoteRestartCont, "aftnrstcont" },
+ { rtfDocAttr, rtfFNoteNumArabic, "ftnnar" },
+ { rtfDocAttr, rtfFNoteNumLLetter, "ftnnalc" },
+ { rtfDocAttr, rtfFNoteNumULetter, "ftnnauc" },
+ { rtfDocAttr, rtfFNoteNumLRoman, "ftnnrlc" },
+ { rtfDocAttr, rtfFNoteNumURoman, "ftnnruc" },
+ { rtfDocAttr, rtfFNoteNumChicago, "ftnnchi" },
+ { rtfDocAttr, rtfENoteNumArabic, "aftnnar" },
+ { rtfDocAttr, rtfENoteNumLLetter, "aftnnalc" },
+ { rtfDocAttr, rtfENoteNumULetter, "aftnnauc" },
+ { rtfDocAttr, rtfENoteNumLRoman, "aftnnrlc" },
+ { rtfDocAttr, rtfENoteNumURoman, "aftnnruc" },
+ { rtfDocAttr, rtfENoteNumChicago, "aftnnchi" },
+
+ { rtfDocAttr, rtfPaperWidth, "paperw" },
+ { rtfDocAttr, rtfPaperHeight, "paperh" },
+ { rtfDocAttr, rtfPaperSize, "psz" },
+ { rtfDocAttr, rtfLeftMargin, "margl" },
+ { rtfDocAttr, rtfRightMargin, "margr" },
+ { rtfDocAttr, rtfTopMargin, "margt" },
+ { rtfDocAttr, rtfBottomMargin, "margb" },
+ { rtfDocAttr, rtfFacingPage, "facingp" },
+ { rtfDocAttr, rtfGutterWid, "gutter" },
+ { rtfDocAttr, rtfMirrorMargin, "margmirror" },
+ { rtfDocAttr, rtfLandscape, "landscape" },
+ { rtfDocAttr, rtfPageStart, "pgnstart" },
+ { rtfDocAttr, rtfWidowCtrl, "widowctrl" },
+
+ { rtfDocAttr, rtfLinkStyles, "linkstyles" },
+
+ { rtfDocAttr, rtfNoAutoTabIndent, "notabind" },
+ { rtfDocAttr, rtfWrapSpaces, "wraptrsp" },
+ { rtfDocAttr, rtfPrintColorsBlack, "prcolbl" },
+ { rtfDocAttr, rtfNoExtraSpaceRL, "noextrasprl" },
+ { rtfDocAttr, rtfNoColumnBalance, "nocolbal" },
+ { rtfDocAttr, rtfCvtMailMergeQuote, "cvmme" },
+ { rtfDocAttr, rtfSuppressTopSpace, "sprstsp" },
+ { rtfDocAttr, rtfSuppressPreParSpace, "sprsspbf" },
+ { rtfDocAttr, rtfCombineTblBorders, "otblrul" },
+ { rtfDocAttr, rtfTranspMetafiles, "transmf" },
+ { rtfDocAttr, rtfSwapBorders, "swpbdr" },
+ { rtfDocAttr, rtfShowHardBreaks, "brkfrm" },
+
+ { rtfDocAttr, rtfFormProtected, "formprot" },
+ { rtfDocAttr, rtfAllProtected, "allprot" },
+ { rtfDocAttr, rtfFormShading, "formshade" },
+ { rtfDocAttr, rtfFormDisplay, "formdisp" },
+ { rtfDocAttr, rtfPrintData, "printdata" },
+
+ { rtfDocAttr, rtfRevProtected, "revprot" },
+ { rtfDocAttr, rtfRevisions, "revisions" },
+ { rtfDocAttr, rtfRevDisplay, "revprop" },
+ { rtfDocAttr, rtfRevBar, "revbar" },
+
+ { rtfDocAttr, rtfAnnotProtected, "annotprot" },
+
+ { rtfDocAttr, rtfRTLDoc, "rtldoc" },
+ { rtfDocAttr, rtfLTRDoc, "ltrdoc" },
+
+ { rtfDocAttr, rtfAnsiCodePage, "ansicpg" },
+ { rtfDocAttr, rtfUTF8RTF, "urtf" },
/*
* Style attributes
*/
 { rtfStyleAttr, rtfAdditive, "additive", 0 },
 { rtfStyleAttr, rtfBasedOn, "sbasedon", 0 },
 { rtfStyleAttr, rtfNext, "snext", 0 },
+ { rtfStyleAttr, rtfAdditive, "additive" },
+ { rtfStyleAttr, rtfBasedOn, "sbasedon" },
+ { rtfStyleAttr, rtfNext, "snext" },
/*
* Picture attributes
*/
 { rtfPictAttr, rtfMacQD, "macpict", 0 },
 { rtfPictAttr, rtfPMMetafile, "pmmetafile", 0 },
 { rtfPictAttr, rtfWinMetafile, "wmetafile", 0 },
 { rtfPictAttr, rtfDevIndBitmap, "dibitmap", 0 },
 { rtfPictAttr, rtfWinBitmap, "wbitmap", 0 },
 { rtfPictAttr, rtfPixelBits, "wbmbitspixel", 0 },
 { rtfPictAttr, rtfBitmapPlanes, "wbmplanes", 0 },
 { rtfPictAttr, rtfBitmapWid, "wbmwidthbytes", 0 },

 { rtfPictAttr, rtfPicWid, "picw", 0 },
 { rtfPictAttr, rtfPicHt, "pich", 0 },
 { rtfPictAttr, rtfPicGoalWid, "picwgoal", 0 },
 { rtfPictAttr, rtfPicGoalHt, "pichgoal", 0 },
+ { rtfPictAttr, rtfMacQD, "macpict" },
+ { rtfPictAttr, rtfPMMetafile, "pmmetafile" },
+ { rtfPictAttr, rtfWinMetafile, "wmetafile" },
+ { rtfPictAttr, rtfDevIndBitmap, "dibitmap" },
+ { rtfPictAttr, rtfWinBitmap, "wbitmap" },
+ { rtfPictAttr, rtfPixelBits, "wbmbitspixel" },
+ { rtfPictAttr, rtfBitmapPlanes, "wbmplanes" },
+ { rtfPictAttr, rtfBitmapWid, "wbmwidthbytes" },
+
+ { rtfPictAttr, rtfPicWid, "picw" },
+ { rtfPictAttr, rtfPicHt, "pich" },
+ { rtfPictAttr, rtfPicGoalWid, "picwgoal" },
+ { rtfPictAttr, rtfPicGoalHt, "pichgoal" },
/* these two aren't in the spec, but some writers emit them */
 { rtfPictAttr, rtfPicGoalWid, "picwGoal", 0 },
 { rtfPictAttr, rtfPicGoalHt, "pichGoal", 0 },
 { rtfPictAttr, rtfPicScaleX, "picscalex", 0 },
 { rtfPictAttr, rtfPicScaleY, "picscaley", 0 },
 { rtfPictAttr, rtfPicScaled, "picscaled", 0 },
 { rtfPictAttr, rtfPicCropTop, "piccropt", 0 },
 { rtfPictAttr, rtfPicCropBottom, "piccropb", 0 },
 { rtfPictAttr, rtfPicCropLeft, "piccropl", 0 },
 { rtfPictAttr, rtfPicCropRight, "piccropr", 0 },
+ { rtfPictAttr, rtfPicGoalWid, "picwGoal" },
+ { rtfPictAttr, rtfPicGoalHt, "pichGoal" },
+ { rtfPictAttr, rtfPicScaleX, "picscalex" },
+ { rtfPictAttr, rtfPicScaleY, "picscaley" },
+ { rtfPictAttr, rtfPicScaled, "picscaled" },
+ { rtfPictAttr, rtfPicCropTop, "piccropt" },
+ { rtfPictAttr, rtfPicCropBottom, "piccropb" },
+ { rtfPictAttr, rtfPicCropLeft, "piccropl" },
+ { rtfPictAttr, rtfPicCropRight, "piccropr" },
 { rtfPictAttr, rtfPicMFHasBitmap, "picbmp", 0 },
 { rtfPictAttr, rtfPicMFBitsPerPixel, "picbpp", 0 },
+ { rtfPictAttr, rtfPicMFHasBitmap, "picbmp" },
+ { rtfPictAttr, rtfPicMFBitsPerPixel, "picbpp" },
 { rtfPictAttr, rtfPicBinary, "bin", 0 },
+ { rtfPictAttr, rtfPicBinary, "bin" },
/*
* NeXT graphic attributes
*/
 { rtfNeXTGrAttr, rtfNeXTGWidth, "width", 0 },
 { rtfNeXTGrAttr, rtfNeXTGHeight, "height", 0 },
+ { rtfNeXTGrAttr, rtfNeXTGWidth, "width" },
+ { rtfNeXTGrAttr, rtfNeXTGHeight, "height" },
/*
* Destinations
*/
 { rtfDestination, rtfFontTbl, "fonttbl", 0 },
 { rtfDestination, rtfFontAltName, "falt", 0 },
 { rtfDestination, rtfEmbeddedFont, "fonteb", 0 },
 { rtfDestination, rtfFontFile, "fontfile", 0 },
 { rtfDestination, rtfFileTbl, "filetbl", 0 },
 { rtfDestination, rtfFileInfo, "file", 0 },
 { rtfDestination, rtfColorTbl, "colortbl", 0 },
 { rtfDestination, rtfStyleSheet, "stylesheet", 0 },
 { rtfDestination, rtfKeyCode, "keycode", 0 },
 { rtfDestination, rtfRevisionTbl, "revtbl", 0 },
 { rtfDestination, rtfGenerator, "generator", 0 },
 { rtfDestination, rtfInfo, "info", 0 },
 { rtfDestination, rtfITitle, "title", 0 },
 { rtfDestination, rtfISubject, "subject", 0 },
 { rtfDestination, rtfIAuthor, "author", 0 },
 { rtfDestination, rtfIOperator, "operator", 0 },
 { rtfDestination, rtfIKeywords, "keywords", 0 },
 { rtfDestination, rtfIComment, "comment", 0 },
 { rtfDestination, rtfIVersion, "version", 0 },
 { rtfDestination, rtfIDoccomm, "doccomm", 0 },
+ { rtfDestination, rtfFontTbl, "fonttbl" },
+ { rtfDestination, rtfFontAltName, "falt" },
+ { rtfDestination, rtfEmbeddedFont, "fonteb" },
+ { rtfDestination, rtfFontFile, "fontfile" },
+ { rtfDestination, rtfFileTbl, "filetbl" },
+ { rtfDestination, rtfFileInfo, "file" },
+ { rtfDestination, rtfColorTbl, "colortbl" },
+ { rtfDestination, rtfStyleSheet, "stylesheet" },
+ { rtfDestination, rtfKeyCode, "keycode" },
+ { rtfDestination, rtfRevisionTbl, "revtbl" },
+ { rtfDestination, rtfGenerator, "generator" },
+ { rtfDestination, rtfInfo, "info" },
+ { rtfDestination, rtfITitle, "title" },
+ { rtfDestination, rtfISubject, "subject" },
+ { rtfDestination, rtfIAuthor, "author" },
+ { rtfDestination, rtfIOperator, "operator" },
+ { rtfDestination, rtfIKeywords, "keywords" },
+ { rtfDestination, rtfIComment, "comment" },
+ { rtfDestination, rtfIVersion, "version" },
+ { rtfDestination, rtfIDoccomm, "doccomm" },
/* \verscomm may not exist  was seen in earlier spec version */
 { rtfDestination, rtfIVerscomm, "verscomm", 0 },
 { rtfDestination, rtfNextFile, "nextfile", 0 },
 { rtfDestination, rtfTemplate, "template", 0 },
 { rtfDestination, rtfFNSep, "ftnsep", 0 },
 { rtfDestination, rtfFNContSep, "ftnsepc", 0 },
 { rtfDestination, rtfFNContNotice, "ftncn", 0 },
 { rtfDestination, rtfENSep, "aftnsep", 0 },
 { rtfDestination, rtfENContSep, "aftnsepc", 0 },
 { rtfDestination, rtfENContNotice, "aftncn", 0 },
 { rtfDestination, rtfPageNumLevel, "pgnhn", 0 },
 { rtfDestination, rtfParNumLevelStyle, "pnseclvl", 0 },
 { rtfDestination, rtfHeader, "header", 0 },
 { rtfDestination, rtfFooter, "footer", 0 },
 { rtfDestination, rtfHeaderLeft, "headerl", 0 },
 { rtfDestination, rtfHeaderRight, "headerr", 0 },
 { rtfDestination, rtfHeaderFirst, "headerf", 0 },
 { rtfDestination, rtfFooterLeft, "footerl", 0 },
 { rtfDestination, rtfFooterRight, "footerr", 0 },
 { rtfDestination, rtfFooterFirst, "footerf", 0 },
 { rtfDestination, rtfParNumText, "pntext", 0 },
 { rtfDestination, rtfParNumbering, "pn", 0 },
 { rtfDestination, rtfParNumTextAfter, "pntexta", 0 },
 { rtfDestination, rtfParNumTextBefore, "pntextb", 0 },
 { rtfDestination, rtfBookmarkStart, "bkmkstart", 0 },
 { rtfDestination, rtfBookmarkEnd, "bkmkend", 0 },
 { rtfDestination, rtfPict, "pict", 0 },
 { rtfDestination, rtfObject, "object", 0 },
 { rtfDestination, rtfObjClass, "objclass", 0 },
 { rtfDestination, rtfObjName, "objname", 0 },
 { rtfObjAttr, rtfObjTime, "objtime", 0 },
 { rtfDestination, rtfObjData, "objdata", 0 },
 { rtfDestination, rtfObjAlias, "objalias", 0 },
 { rtfDestination, rtfObjSection, "objsect", 0 },
+ { rtfDestination, rtfIVerscomm, "verscomm" },
+ { rtfDestination, rtfNextFile, "nextfile" },
+ { rtfDestination, rtfTemplate, "template" },
+ { rtfDestination, rtfFNSep, "ftnsep" },
+ { rtfDestination, rtfFNContSep, "ftnsepc" },
+ { rtfDestination, rtfFNContNotice, "ftncn" },
+ { rtfDestination, rtfENSep, "aftnsep" },
+ { rtfDestination, rtfENContSep, "aftnsepc" },
+ { rtfDestination, rtfENContNotice, "aftncn" },
+ { rtfDestination, rtfPageNumLevel, "pgnhn" },
+ { rtfDestination, rtfParNumLevelStyle, "pnseclvl" },
+ { rtfDestination, rtfHeader, "header" },
+ { rtfDestination, rtfFooter, "footer" },
+ { rtfDestination, rtfHeaderLeft, "headerl" },
+ { rtfDestination, rtfHeaderRight, "headerr" },
+ { rtfDestination, rtfHeaderFirst, "headerf" },
+ { rtfDestination, rtfFooterLeft, "footerl" },
+ { rtfDestination, rtfFooterRight, "footerr" },
+ { rtfDestination, rtfFooterFirst, "footerf" },
+ { rtfDestination, rtfParNumText, "pntext" },
+ { rtfDestination, rtfParNumbering, "pn" },
+ { rtfDestination, rtfParNumTextAfter, "pntexta" },
+ { rtfDestination, rtfParNumTextBefore, "pntextb" },
+ { rtfDestination, rtfBookmarkStart, "bkmkstart" },
+ { rtfDestination, rtfBookmarkEnd, "bkmkend" },
+ { rtfDestination, rtfPict, "pict" },
+ { rtfDestination, rtfObject, "object" },
+ { rtfDestination, rtfObjClass, "objclass" },
+ { rtfDestination, rtfObjName, "objname" },
+ { rtfObjAttr, rtfObjTime, "objtime" },
+ { rtfDestination, rtfObjData, "objdata" },
+ { rtfDestination, rtfObjAlias, "objalias" },
+ { rtfDestination, rtfObjSection, "objsect" },
/* objitem and objtopic aren't documented in the spec! */
 { rtfDestination, rtfObjItem, "objitem", 0 },
 { rtfDestination, rtfObjTopic, "objtopic", 0 },
 { rtfDestination, rtfObjResult, "result", 0 },
 { rtfDestination, rtfDrawObject, "do", 0 },
 { rtfDestination, rtfFootnote, "footnote", 0 },
 { rtfDestination, rtfAnnotRefStart, "atrfstart", 0 },
 { rtfDestination, rtfAnnotRefEnd, "atrfend", 0 },
 { rtfDestination, rtfAnnotID, "atnid", 0 },
 { rtfDestination, rtfAnnotAuthor, "atnauthor", 0 },
 { rtfDestination, rtfAnnotation, "annotation", 0 },
 { rtfDestination, rtfAnnotRef, "atnref", 0 },
 { rtfDestination, rtfAnnotTime, "atntime", 0 },
 { rtfDestination, rtfAnnotIcon, "atnicn", 0 },
 { rtfDestination, rtfField, "field", 0 },
 { rtfDestination, rtfFieldInst, "fldinst", 0 },
 { rtfDestination, rtfFieldResult, "fldrslt", 0 },
 { rtfDestination, rtfDataField, "datafield", 0 },
 { rtfDestination, rtfIndex, "xe", 0 },
 { rtfDestination, rtfIndexText, "txe", 0 },
 { rtfDestination, rtfIndexRange, "rxe", 0 },
 { rtfDestination, rtfTOC, "tc", 0 },
 { rtfDestination, rtfNeXTGraphic, "NeXTGraphic", 0 },
+ { rtfDestination, rtfObjItem, "objitem" },
+ { rtfDestination, rtfObjTopic, "objtopic" },
+ { rtfDestination, rtfObjResult, "result" },
+ { rtfDestination, rtfDrawObject, "do" },
+ { rtfDestination, rtfFootnote, "footnote" },
+ { rtfDestination, rtfAnnotRefStart, "atrfstart" },
+ { rtfDestination, rtfAnnotRefEnd, "atrfend" },
+ { rtfDestination, rtfAnnotID, "atnid" },
+ { rtfDestination, rtfAnnotAuthor, "atnauthor" },
+ { rtfDestination, rtfAnnotation, "annotation" },
+ { rtfDestination, rtfAnnotRef, "atnref" },
+ { rtfDestination, rtfAnnotTime, "atntime" },
+ { rtfDestination, rtfAnnotIcon, "atnicn" },
+ { rtfDestination, rtfField, "field" },
+ { rtfDestination, rtfFieldInst, "fldinst" },
+ { rtfDestination, rtfFieldResult, "fldrslt" },
+ { rtfDestination, rtfDataField, "datafield" },
+ { rtfDestination, rtfIndex, "xe" },
+ { rtfDestination, rtfIndexText, "txe" },
+ { rtfDestination, rtfIndexRange, "rxe" },
+ { rtfDestination, rtfTOC, "tc" },
+ { rtfDestination, rtfNeXTGraphic, "NeXTGraphic" },
/*
* Font families
*/
 { rtfFontFamily, rtfFFNil, "fnil", 0 },
 { rtfFontFamily, rtfFFRoman, "froman", 0 },
 { rtfFontFamily, rtfFFSwiss, "fswiss", 0 },
 { rtfFontFamily, rtfFFModern, "fmodern", 0 },
 { rtfFontFamily, rtfFFScript, "fscript", 0 },
 { rtfFontFamily, rtfFFDecor, "fdecor", 0 },
 { rtfFontFamily, rtfFFTech, "ftech", 0 },
 { rtfFontFamily, rtfFFBidirectional, "fbidi", 0 },
+ { rtfFontFamily, rtfFFNil, "fnil" },
+ { rtfFontFamily, rtfFFRoman, "froman" },
+ { rtfFontFamily, rtfFFSwiss, "fswiss" },
+ { rtfFontFamily, rtfFFModern, "fmodern" },
+ { rtfFontFamily, rtfFFScript, "fscript" },
+ { rtfFontFamily, rtfFFDecor, "fdecor" },
+ { rtfFontFamily, rtfFFTech, "ftech" },
+ { rtfFontFamily, rtfFFBidirectional, "fbidi" },
/*
* Font attributes
*/
 { rtfFontAttr, rtfFontCharSet, "fcharset", 0 },
 { rtfFontAttr, rtfFontPitch, "fprq", 0 },
 { rtfFontAttr, rtfFontCodePage, "cpg", 0 },
 { rtfFontAttr, rtfFTypeNil, "ftnil", 0 },
 { rtfFontAttr, rtfFTypeTrueType, "fttruetype", 0 },
+ { rtfFontAttr, rtfFontCharSet, "fcharset" },
+ { rtfFontAttr, rtfFontPitch, "fprq" },
+ { rtfFontAttr, rtfFontCodePage, "cpg" },
+ { rtfFontAttr, rtfFTypeNil, "ftnil" },
+ { rtfFontAttr, rtfFTypeTrueType, "fttruetype" },
/*
* File table attributes
*/
 { rtfFileAttr, rtfFileNum, "fid", 0 },
 { rtfFileAttr, rtfFileRelPath, "frelative", 0 },
 { rtfFileAttr, rtfFileOSNum, "fosnum", 0 },
+ { rtfFileAttr, rtfFileNum, "fid" },
+ { rtfFileAttr, rtfFileRelPath, "frelative" },
+ { rtfFileAttr, rtfFileOSNum, "fosnum" },
/*
* File sources
*/
 { rtfFileSource, rtfSrcMacintosh, "fvalidmac", 0 },
 { rtfFileSource, rtfSrcDOS, "fvaliddos", 0 },
 { rtfFileSource, rtfSrcNTFS, "fvalidntfs", 0 },
 { rtfFileSource, rtfSrcHPFS, "fvalidhpfs", 0 },
 { rtfFileSource, rtfSrcNetwork, "fnetwork", 0 },
+ { rtfFileSource, rtfSrcMacintosh, "fvalidmac" },
+ { rtfFileSource, rtfSrcDOS, "fvaliddos" },
+ { rtfFileSource, rtfSrcNTFS, "fvalidntfs" },
+ { rtfFileSource, rtfSrcHPFS, "fvalidhpfs" },
+ { rtfFileSource, rtfSrcNetwork, "fnetwork" },
/*
* Color names
*/
 { rtfColorName, rtfRed, "red", 0 },
 { rtfColorName, rtfGreen, "green", 0 },
 { rtfColorName, rtfBlue, "blue", 0 },
+ { rtfColorName, rtfRed, "red" },
+ { rtfColorName, rtfGreen, "green" },
+ { rtfColorName, rtfBlue, "blue" },
/*
* Charset names
*/
 { rtfCharSet, rtfMacCharSet, "mac", 0 },
 { rtfCharSet, rtfAnsiCharSet, "ansi", 0 },
 { rtfCharSet, rtfPcCharSet, "pc", 0 },
 { rtfCharSet, rtfPcaCharSet, "pca", 0 },
+ { rtfCharSet, rtfMacCharSet, "mac" },
+ { rtfCharSet, rtfAnsiCharSet, "ansi" },
+ { rtfCharSet, rtfPcCharSet, "pc" },
+ { rtfCharSet, rtfPcaCharSet, "pca" },
/*
* Table attributes
*/
 { rtfTblAttr, rtfRowDef, "trowd", 0 },
 { rtfTblAttr, rtfRowGapH, "trgaph", 0 },
 { rtfTblAttr, rtfCellPos, "cellx", 0 },
 { rtfTblAttr, rtfMergeRngFirst, "clmgf", 0 },
 { rtfTblAttr, rtfMergePrevious, "clmrg", 0 },

 { rtfTblAttr, rtfRowLeft, "trql", 0 },
 { rtfTblAttr, rtfRowRight, "trqr", 0 },
 { rtfTblAttr, rtfRowCenter, "trqc", 0 },
 { rtfTblAttr, rtfRowLeftEdge, "trleft", 0 },
 { rtfTblAttr, rtfRowHt, "trrh", 0 },
 { rtfTblAttr, rtfRowHeader, "trhdr", 0 },
 { rtfTblAttr, rtfRowKeep, "trkeep", 0 },

 { rtfTblAttr, rtfRTLRow, "rtlrow", 0 },
 { rtfTblAttr, rtfLTRRow, "ltrrow", 0 },

 { rtfTblAttr, rtfRowBordTop, "trbrdrt", 0 },
 { rtfTblAttr, rtfRowBordLeft, "trbrdrl", 0 },
 { rtfTblAttr, rtfRowBordBottom, "trbrdrb", 0 },
 { rtfTblAttr, rtfRowBordRight, "trbrdrr", 0 },
 { rtfTblAttr, rtfRowBordHoriz, "trbrdrh", 0 },
 { rtfTblAttr, rtfRowBordVert, "trbrdrv", 0 },

 { rtfTblAttr, rtfCellBordBottom, "clbrdrb", 0 },
 { rtfTblAttr, rtfCellBordTop, "clbrdrt", 0 },
 { rtfTblAttr, rtfCellBordLeft, "clbrdrl", 0 },
 { rtfTblAttr, rtfCellBordRight, "clbrdrr", 0 },

 { rtfTblAttr, rtfCellShading, "clshdng", 0 },
 { rtfTblAttr, rtfCellBgPatH, "clbghoriz", 0 },
 { rtfTblAttr, rtfCellBgPatV, "clbgvert", 0 },
 { rtfTblAttr, rtfCellFwdDiagBgPat, "clbgfdiag", 0 },
 { rtfTblAttr, rtfCellBwdDiagBgPat, "clbgbdiag", 0 },
 { rtfTblAttr, rtfCellHatchBgPat, "clbgcross", 0 },
 { rtfTblAttr, rtfCellDiagHatchBgPat, "clbgdcross", 0 },
+ { rtfTblAttr, rtfRowDef, "trowd" },
+ { rtfTblAttr, rtfRowGapH, "trgaph" },
+ { rtfTblAttr, rtfCellPos, "cellx" },
+ { rtfTblAttr, rtfMergeRngFirst, "clmgf" },
+ { rtfTblAttr, rtfMergePrevious, "clmrg" },
+
+ { rtfTblAttr, rtfRowLeft, "trql" },
+ { rtfTblAttr, rtfRowRight, "trqr" },
+ { rtfTblAttr, rtfRowCenter, "trqc" },
+ { rtfTblAttr, rtfRowLeftEdge, "trleft" },
+ { rtfTblAttr, rtfRowHt, "trrh" },
+ { rtfTblAttr, rtfRowHeader, "trhdr" },
+ { rtfTblAttr, rtfRowKeep, "trkeep" },
+
+ { rtfTblAttr, rtfRTLRow, "rtlrow" },
+ { rtfTblAttr, rtfLTRRow, "ltrrow" },
+
+ { rtfTblAttr, rtfRowBordTop, "trbrdrt" },
+ { rtfTblAttr, rtfRowBordLeft, "trbrdrl" },
+ { rtfTblAttr, rtfRowBordBottom, "trbrdrb" },
+ { rtfTblAttr, rtfRowBordRight, "trbrdrr" },
+ { rtfTblAttr, rtfRowBordHoriz, "trbrdrh" },
+ { rtfTblAttr, rtfRowBordVert, "trbrdrv" },
+
+ { rtfTblAttr, rtfCellBordBottom, "clbrdrb" },
+ { rtfTblAttr, rtfCellBordTop, "clbrdrt" },
+ { rtfTblAttr, rtfCellBordLeft, "clbrdrl" },
+ { rtfTblAttr, rtfCellBordRight, "clbrdrr" },
+
+ { rtfTblAttr, rtfCellShading, "clshdng" },
+ { rtfTblAttr, rtfCellBgPatH, "clbghoriz" },
+ { rtfTblAttr, rtfCellBgPatV, "clbgvert" },
+ { rtfTblAttr, rtfCellFwdDiagBgPat, "clbgfdiag" },
+ { rtfTblAttr, rtfCellBwdDiagBgPat, "clbgbdiag" },
+ { rtfTblAttr, rtfCellHatchBgPat, "clbgcross" },
+ { rtfTblAttr, rtfCellDiagHatchBgPat, "clbgdcross" },
/*
* The spec lists "clbgdkhor", but the corresponding noncell
* control is "bgdkhoriz". At any rate Macintosh Word seems
* to accept both "clbgdkhor" and "clbgdkhoriz".
*/
 { rtfTblAttr, rtfCellDarkBgPatH, "clbgdkhoriz", 0 },
 { rtfTblAttr, rtfCellDarkBgPatH, "clbgdkhor", 0 },
 { rtfTblAttr, rtfCellDarkBgPatV, "clbgdkvert", 0 },
 { rtfTblAttr, rtfCellFwdDarkBgPat, "clbgdkfdiag", 0 },
 { rtfTblAttr, rtfCellBwdDarkBgPat, "clbgdkbdiag", 0 },
 { rtfTblAttr, rtfCellDarkHatchBgPat, "clbgdkcross", 0 },
 { rtfTblAttr, rtfCellDarkDiagHatchBgPat, "clbgdkdcross", 0 },
 { rtfTblAttr, rtfCellBgPatLineColor, "clcfpat", 0 },
 { rtfTblAttr, rtfCellBgPatColor, "clcbpat", 0 },
+ { rtfTblAttr, rtfCellDarkBgPatH, "clbgdkhoriz" },
+ { rtfTblAttr, rtfCellDarkBgPatH, "clbgdkhor" },
+ { rtfTblAttr, rtfCellDarkBgPatV, "clbgdkvert" },
+ { rtfTblAttr, rtfCellFwdDarkBgPat, "clbgdkfdiag" },
+ { rtfTblAttr, rtfCellBwdDarkBgPat, "clbgdkbdiag" },
+ { rtfTblAttr, rtfCellDarkHatchBgPat, "clbgdkcross" },
+ { rtfTblAttr, rtfCellDarkDiagHatchBgPat, "clbgdkdcross" },
+ { rtfTblAttr, rtfCellBgPatLineColor, "clcfpat" },
+ { rtfTblAttr, rtfCellBgPatColor, "clcbpat" },
/*
* Field attributes
*/
 { rtfFieldAttr, rtfFieldDirty, "flddirty", 0 },
 { rtfFieldAttr, rtfFieldEdited, "fldedit", 0 },
 { rtfFieldAttr, rtfFieldLocked, "fldlock", 0 },
 { rtfFieldAttr, rtfFieldPrivate, "fldpriv", 0 },
 { rtfFieldAttr, rtfFieldAlt, "fldalt", 0 },
+ { rtfFieldAttr, rtfFieldDirty, "flddirty" },
+ { rtfFieldAttr, rtfFieldEdited, "fldedit" },
+ { rtfFieldAttr, rtfFieldLocked, "fldlock" },
+ { rtfFieldAttr, rtfFieldPrivate, "fldpriv" },
+ { rtfFieldAttr, rtfFieldAlt, "fldalt" },
/*
* Positioning attributes
*/
 { rtfPosAttr, rtfAbsWid, "absw", 0 },
 { rtfPosAttr, rtfAbsHt, "absh", 0 },

 { rtfPosAttr, rtfRPosMargH, "phmrg", 0 },
 { rtfPosAttr, rtfRPosPageH, "phpg", 0 },
 { rtfPosAttr, rtfRPosColH, "phcol", 0 },
 { rtfPosAttr, rtfPosX, "posx", 0 },
 { rtfPosAttr, rtfPosNegX, "posnegx", 0 },
 { rtfPosAttr, rtfPosXCenter, "posxc", 0 },
 { rtfPosAttr, rtfPosXInside, "posxi", 0 },
 { rtfPosAttr, rtfPosXOutSide, "posxo", 0 },
 { rtfPosAttr, rtfPosXRight, "posxr", 0 },
 { rtfPosAttr, rtfPosXLeft, "posxl", 0 },

 { rtfPosAttr, rtfRPosMargV, "pvmrg", 0 },
 { rtfPosAttr, rtfRPosPageV, "pvpg", 0 },
 { rtfPosAttr, rtfRPosParaV, "pvpara", 0 },
 { rtfPosAttr, rtfPosY, "posy", 0 },
 { rtfPosAttr, rtfPosNegY, "posnegy", 0 },
 { rtfPosAttr, rtfPosYInline, "posyil", 0 },
 { rtfPosAttr, rtfPosYTop, "posyt", 0 },
 { rtfPosAttr, rtfPosYCenter, "posyc", 0 },
 { rtfPosAttr, rtfPosYBottom, "posyb", 0 },

 { rtfPosAttr, rtfNoWrap, "nowrap", 0 },
 { rtfPosAttr, rtfDistFromTextAll, "dxfrtext", 0 },
 { rtfPosAttr, rtfDistFromTextX, "dfrmtxtx", 0 },
 { rtfPosAttr, rtfDistFromTextY, "dfrmtxty", 0 },
+ { rtfPosAttr, rtfAbsWid, "absw" },
+ { rtfPosAttr, rtfAbsHt, "absh" },
+
+ { rtfPosAttr, rtfRPosMargH, "phmrg" },
+ { rtfPosAttr, rtfRPosPageH, "phpg" },
+ { rtfPosAttr, rtfRPosColH, "phcol" },
+ { rtfPosAttr, rtfPosX, "posx" },
+ { rtfPosAttr, rtfPosNegX, "posnegx" },
+ { rtfPosAttr, rtfPosXCenter, "posxc" },
+ { rtfPosAttr, rtfPosXInside, "posxi" },
+ { rtfPosAttr, rtfPosXOutSide, "posxo" },
+ { rtfPosAttr, rtfPosXRight, "posxr" },
+ { rtfPosAttr, rtfPosXLeft, "posxl" },
+
+ { rtfPosAttr, rtfRPosMargV, "pvmrg" },
+ { rtfPosAttr, rtfRPosPageV, "pvpg" },
+ { rtfPosAttr, rtfRPosParaV, "pvpara" },
+ { rtfPosAttr, rtfPosY, "posy" },
+ { rtfPosAttr, rtfPosNegY, "posnegy" },
+ { rtfPosAttr, rtfPosYInline, "posyil" },
+ { rtfPosAttr, rtfPosYTop, "posyt" },
+ { rtfPosAttr, rtfPosYCenter, "posyc" },
+ { rtfPosAttr, rtfPosYBottom, "posyb" },
+
+ { rtfPosAttr, rtfNoWrap, "nowrap" },
+ { rtfPosAttr, rtfDistFromTextAll, "dxfrtext" },
+ { rtfPosAttr, rtfDistFromTextX, "dfrmtxtx" },
+ { rtfPosAttr, rtfDistFromTextY, "dfrmtxty" },
/* \dyfrtext no longer exists in spec 1.2, apparently */
/* replaced by \dfrmtextx and \dfrmtexty. */
 { rtfPosAttr, rtfTextDistY, "dyfrtext", 0 },
+ { rtfPosAttr, rtfTextDistY, "dyfrtext" },
 { rtfPosAttr, rtfDropCapLines, "dropcapli", 0 },
 { rtfPosAttr, rtfDropCapType, "dropcapt", 0 },
+ { rtfPosAttr, rtfDropCapLines, "dropcapli" },
+ { rtfPosAttr, rtfDropCapType, "dropcapt" },
/*
* Object controls
*/
 { rtfObjAttr, rtfObjEmb, "objemb", 0 },
 { rtfObjAttr, rtfObjLink, "objlink", 0 },
 { rtfObjAttr, rtfObjAutoLink, "objautlink", 0 },
 { rtfObjAttr, rtfObjSubscriber, "objsub", 0 },
 { rtfObjAttr, rtfObjPublisher, "objpub", 0 },
 { rtfObjAttr, rtfObjICEmb, "objicemb", 0 },

 { rtfObjAttr, rtfObjLinkSelf, "linkself", 0 },
 { rtfObjAttr, rtfObjLock, "objupdate", 0 },
 { rtfObjAttr, rtfObjUpdate, "objlock", 0 },

 { rtfObjAttr, rtfObjHt, "objh", 0 },
 { rtfObjAttr, rtfObjWid, "objw", 0 },
 { rtfObjAttr, rtfObjSetSize, "objsetsize", 0 },
 { rtfObjAttr, rtfObjAlign, "objalign", 0 },
 { rtfObjAttr, rtfObjTransposeY, "objtransy", 0 },
 { rtfObjAttr, rtfObjCropTop, "objcropt", 0 },
 { rtfObjAttr, rtfObjCropBottom, "objcropb", 0 },
 { rtfObjAttr, rtfObjCropLeft, "objcropl", 0 },
 { rtfObjAttr, rtfObjCropRight, "objcropr", 0 },
 { rtfObjAttr, rtfObjScaleX, "objscalex", 0 },
 { rtfObjAttr, rtfObjScaleY, "objscaley", 0 },

 { rtfObjAttr, rtfObjResRTF, "rsltrtf", 0 },
 { rtfObjAttr, rtfObjResPict, "rsltpict", 0 },
 { rtfObjAttr, rtfObjResBitmap, "rsltbmp", 0 },
 { rtfObjAttr, rtfObjResText, "rslttxt", 0 },
 { rtfObjAttr, rtfObjResMerge, "rsltmerge", 0 },

 { rtfObjAttr, rtfObjBookmarkPubObj, "bkmkpub", 0 },
 { rtfObjAttr, rtfObjPubAutoUpdate, "pubauto", 0 },
+ { rtfObjAttr, rtfObjEmb, "objemb" },
+ { rtfObjAttr, rtfObjLink, "objlink" },
+ { rtfObjAttr, rtfObjAutoLink, "objautlink" },
+ { rtfObjAttr, rtfObjSubscriber, "objsub" },
+ { rtfObjAttr, rtfObjPublisher, "objpub" },
+ { rtfObjAttr, rtfObjICEmb, "objicemb" },
+
+ { rtfObjAttr, rtfObjLinkSelf, "linkself" },
+ { rtfObjAttr, rtfObjLock, "objupdate" },
+ { rtfObjAttr, rtfObjUpdate, "objlock" },
+
+ { rtfObjAttr, rtfObjHt, "objh" },
+ { rtfObjAttr, rtfObjWid, "objw" },
+ { rtfObjAttr, rtfObjSetSize, "objsetsize" },
+ { rtfObjAttr, rtfObjAlign, "objalign" },
+ { rtfObjAttr, rtfObjTransposeY, "objtransy" },
+ { rtfObjAttr, rtfObjCropTop, "objcropt" },
+ { rtfObjAttr, rtfObjCropBottom, "objcropb" },
+ { rtfObjAttr, rtfObjCropLeft, "objcropl" },
+ { rtfObjAttr, rtfObjCropRight, "objcropr" },
+ { rtfObjAttr, rtfObjScaleX, "objscalex" },
+ { rtfObjAttr, rtfObjScaleY, "objscaley" },
+
+ { rtfObjAttr, rtfObjResRTF, "rsltrtf" },
+ { rtfObjAttr, rtfObjResPict, "rsltpict" },
+ { rtfObjAttr, rtfObjResBitmap, "rsltbmp" },
+ { rtfObjAttr, rtfObjResText, "rslttxt" },
+ { rtfObjAttr, rtfObjResMerge, "rsltmerge" },
+
+ { rtfObjAttr, rtfObjBookmarkPubObj, "bkmkpub" },
+ { rtfObjAttr, rtfObjPubAutoUpdate, "pubauto" },
/*
* Associated character formatting attributes
*/
 { rtfACharAttr, rtfACBold, "ab", 0 },
 { rtfACharAttr, rtfACAllCaps, "caps", 0 },
 { rtfACharAttr, rtfACForeColor, "acf", 0 },
 { rtfACharAttr, rtfACSubScript, "adn", 0 },
 { rtfACharAttr, rtfACExpand, "aexpnd", 0 },
 { rtfACharAttr, rtfACFontNum, "af", 0 },
 { rtfACharAttr, rtfACFontSize, "afs", 0 },
 { rtfACharAttr, rtfACItalic, "ai", 0 },
 { rtfACharAttr, rtfACLanguage, "alang", 0 },
 { rtfACharAttr, rtfACOutline, "aoutl", 0 },
 { rtfACharAttr, rtfACSmallCaps, "ascaps", 0 },
 { rtfACharAttr, rtfACShadow, "ashad", 0 },
 { rtfACharAttr, rtfACStrikeThru, "astrike", 0 },
 { rtfACharAttr, rtfACUnderline, "aul", 0 },
 { rtfACharAttr, rtfACDotUnderline, "auld", 0 },
 { rtfACharAttr, rtfACDbUnderline, "auldb", 0 },
 { rtfACharAttr, rtfACNoUnderline, "aulnone", 0 },
 { rtfACharAttr, rtfACWordUnderline, "aulw", 0 },
 { rtfACharAttr, rtfACSuperScript, "aup", 0 },
+ { rtfACharAttr, rtfACBold, "ab" },
+ { rtfACharAttr, rtfACAllCaps, "caps" },
+ { rtfACharAttr, rtfACForeColor, "acf" },
+ { rtfACharAttr, rtfACSubScript, "adn" },
+ { rtfACharAttr, rtfACExpand, "aexpnd" },
+ { rtfACharAttr, rtfACFontNum, "af" },
+ { rtfACharAttr, rtfACFontSize, "afs" },
+ { rtfACharAttr, rtfACItalic, "ai" },
+ { rtfACharAttr, rtfACLanguage, "alang" },
+ { rtfACharAttr, rtfACOutline, "aoutl" },
+ { rtfACharAttr, rtfACSmallCaps, "ascaps" },
+ { rtfACharAttr, rtfACShadow, "ashad" },
+ { rtfACharAttr, rtfACStrikeThru, "astrike" },
+ { rtfACharAttr, rtfACUnderline, "aul" },
+ { rtfACharAttr, rtfACDotUnderline, "auld" },
+ { rtfACharAttr, rtfACDbUnderline, "auldb" },
+ { rtfACharAttr, rtfACNoUnderline, "aulnone" },
+ { rtfACharAttr, rtfACWordUnderline, "aulw" },
+ { rtfACharAttr, rtfACSuperScript, "aup" },
/*
* Footnote attributes
*/
 { rtfFNoteAttr, rtfFNAlt, "ftnalt", 0 },
+ { rtfFNoteAttr, rtfFNAlt, "ftnalt" },
/*
* Key code attributes
*/
 { rtfKeyCodeAttr, rtfAltKey, "alt", 0 },
 { rtfKeyCodeAttr, rtfShiftKey, "shift", 0 },
 { rtfKeyCodeAttr, rtfControlKey, "ctrl", 0 },
 { rtfKeyCodeAttr, rtfFunctionKey, "fn", 0 },
+ { rtfKeyCodeAttr, rtfAltKey, "alt" },
+ { rtfKeyCodeAttr, rtfShiftKey, "shift" },
+ { rtfKeyCodeAttr, rtfControlKey, "ctrl" },
+ { rtfKeyCodeAttr, rtfFunctionKey, "fn" },
/*
* Bookmark attributes
*/
 { rtfBookmarkAttr, rtfBookmarkFirstCol, "bkmkcolf", 0 },
 { rtfBookmarkAttr, rtfBookmarkLastCol, "bkmkcoll", 0 },
+ { rtfBookmarkAttr, rtfBookmarkFirstCol, "bkmkcolf" },
+ { rtfBookmarkAttr, rtfBookmarkLastCol, "bkmkcoll" },
/*
* Index entry attributes
*/
 { rtfIndexAttr, rtfIndexNumber, "xef", 0 },
 { rtfIndexAttr, rtfIndexBold, "bxe", 0 },
 { rtfIndexAttr, rtfIndexItalic, "ixe", 0 },
+ { rtfIndexAttr, rtfIndexNumber, "xef" },
+ { rtfIndexAttr, rtfIndexBold, "bxe" },
+ { rtfIndexAttr, rtfIndexItalic, "ixe" },
/*
* Table of contents attributes
*/
 { rtfTOCAttr, rtfTOCType, "tcf", 0 },
 { rtfTOCAttr, rtfTOCLevel, "tcl", 0 },
+ { rtfTOCAttr, rtfTOCType, "tcf" },
+ { rtfTOCAttr, rtfTOCLevel, "tcl" },
/*
* Drawing object attributes
*/
 { rtfDrawAttr, rtfDrawLock, "dolock", 0 },
 { rtfDrawAttr, rtfDrawPageRelX, "doxpage", 0 },
 { rtfDrawAttr, rtfDrawColumnRelX, "dobxcolumn", 0 },
 { rtfDrawAttr, rtfDrawMarginRelX, "dobxmargin", 0 },
 { rtfDrawAttr, rtfDrawPageRelY, "dobypage", 0 },
 { rtfDrawAttr, rtfDrawColumnRelY, "dobycolumn", 0 },
 { rtfDrawAttr, rtfDrawMarginRelY, "dobymargin", 0 },
 { rtfDrawAttr, rtfDrawHeight, "dobhgt", 0 },

 { rtfDrawAttr, rtfDrawBeginGroup, "dpgroup", 0 },
 { rtfDrawAttr, rtfDrawGroupCount, "dpcount", 0 },
 { rtfDrawAttr, rtfDrawEndGroup, "dpendgroup", 0 },
 { rtfDrawAttr, rtfDrawArc, "dparc", 0 },
 { rtfDrawAttr, rtfDrawCallout, "dpcallout", 0 },
 { rtfDrawAttr, rtfDrawEllipse, "dpellipse", 0 },
 { rtfDrawAttr, rtfDrawLine, "dpline", 0 },
 { rtfDrawAttr, rtfDrawPolygon, "dppolygon", 0 },
 { rtfDrawAttr, rtfDrawPolyLine, "dppolyline", 0 },
 { rtfDrawAttr, rtfDrawRect, "dprect", 0 },
 { rtfDrawAttr, rtfDrawTextBox, "dptxbx", 0 },

 { rtfDrawAttr, rtfDrawOffsetX, "dpx", 0 },
 { rtfDrawAttr, rtfDrawSizeX, "dpxsize", 0 },
 { rtfDrawAttr, rtfDrawOffsetY, "dpy", 0 },
 { rtfDrawAttr, rtfDrawSizeY, "dpysize", 0 },

 { rtfDrawAttr, rtfCOAngle, "dpcoa", 0 },
 { rtfDrawAttr, rtfCOAccentBar, "dpcoaccent", 0 },
 { rtfDrawAttr, rtfCOBestFit, "dpcobestfit", 0 },
 { rtfDrawAttr, rtfCOBorder, "dpcoborder", 0 },
 { rtfDrawAttr, rtfCOAttachAbsDist, "dpcodabs", 0 },
 { rtfDrawAttr, rtfCOAttachBottom, "dpcodbottom", 0 },
 { rtfDrawAttr, rtfCOAttachCenter, "dpcodcenter", 0 },
 { rtfDrawAttr, rtfCOAttachTop, "dpcodtop", 0 },
 { rtfDrawAttr, rtfCOLength, "dpcolength", 0 },
 { rtfDrawAttr, rtfCONegXQuadrant, "dpcominusx", 0 },
 { rtfDrawAttr, rtfCONegYQuadrant, "dpcominusy", 0 },
 { rtfDrawAttr, rtfCOOffset, "dpcooffset", 0 },
 { rtfDrawAttr, rtfCOAttachSmart, "dpcosmarta", 0 },
 { rtfDrawAttr, rtfCODoubleLine, "dpcotdouble", 0 },
 { rtfDrawAttr, rtfCORightAngle, "dpcotright", 0 },
 { rtfDrawAttr, rtfCOSingleLine, "dpcotsingle", 0 },
 { rtfDrawAttr, rtfCOTripleLine, "dpcottriple", 0 },

 { rtfDrawAttr, rtfDrawTextBoxMargin, "dptxbxmar", 0 },
 { rtfDrawAttr, rtfDrawTextBoxText, "dptxbxtext", 0 },
 { rtfDrawAttr, rtfDrawRoundRect, "dproundr", 0 },

 { rtfDrawAttr, rtfDrawPointX, "dpptx", 0 },
 { rtfDrawAttr, rtfDrawPointY, "dppty", 0 },
 { rtfDrawAttr, rtfDrawPolyCount, "dppolycount", 0 },

 { rtfDrawAttr, rtfDrawArcFlipX, "dparcflipx", 0 },
 { rtfDrawAttr, rtfDrawArcFlipY, "dparcflipy", 0 },

 { rtfDrawAttr, rtfDrawLineBlue, "dplinecob", 0 },
 { rtfDrawAttr, rtfDrawLineGreen, "dplinecog", 0 },
 { rtfDrawAttr, rtfDrawLineRed, "dplinecor", 0 },
 { rtfDrawAttr, rtfDrawLinePalette, "dplinepal", 0 },
 { rtfDrawAttr, rtfDrawLineDashDot, "dplinedado", 0 },
 { rtfDrawAttr, rtfDrawLineDashDotDot, "dplinedadodo", 0 },
 { rtfDrawAttr, rtfDrawLineDash, "dplinedash", 0 },
 { rtfDrawAttr, rtfDrawLineDot, "dplinedot", 0 },
 { rtfDrawAttr, rtfDrawLineGray, "dplinegray", 0 },
 { rtfDrawAttr, rtfDrawLineHollow, "dplinehollow", 0 },
 { rtfDrawAttr, rtfDrawLineSolid, "dplinesolid", 0 },
 { rtfDrawAttr, rtfDrawLineWidth, "dplinew", 0 },

 { rtfDrawAttr, rtfDrawHollowEndArrow, "dpaendhol", 0 },
 { rtfDrawAttr, rtfDrawEndArrowLength, "dpaendl", 0 },
 { rtfDrawAttr, rtfDrawSolidEndArrow, "dpaendsol", 0 },
 { rtfDrawAttr, rtfDrawEndArrowWidth, "dpaendw", 0 },
 { rtfDrawAttr, rtfDrawHollowStartArrow,"dpastarthol", 0 },
 { rtfDrawAttr, rtfDrawStartArrowLength,"dpastartl", 0 },
 { rtfDrawAttr, rtfDrawSolidStartArrow, "dpastartsol", 0 },
 { rtfDrawAttr, rtfDrawStartArrowWidth, "dpastartw", 0 },

 { rtfDrawAttr, rtfDrawBgFillBlue, "dpfillbgcb", 0 },
 { rtfDrawAttr, rtfDrawBgFillGreen, "dpfillbgcg", 0 },
 { rtfDrawAttr, rtfDrawBgFillRed, "dpfillbgcr", 0 },
 { rtfDrawAttr, rtfDrawBgFillPalette, "dpfillbgpal", 0 },
 { rtfDrawAttr, rtfDrawBgFillGray, "dpfillbggray", 0 },
 { rtfDrawAttr, rtfDrawFgFillBlue, "dpfillfgcb", 0 },
 { rtfDrawAttr, rtfDrawFgFillGreen, "dpfillfgcg", 0 },
 { rtfDrawAttr, rtfDrawFgFillRed, "dpfillfgcr", 0 },
 { rtfDrawAttr, rtfDrawFgFillPalette, "dpfillfgpal", 0 },
 { rtfDrawAttr, rtfDrawFgFillGray, "dpfillfggray", 0 },
 { rtfDrawAttr, rtfDrawFillPatIndex, "dpfillpat", 0 },

 { rtfDrawAttr, rtfDrawShadow, "dpshadow", 0 },
 { rtfDrawAttr, rtfDrawShadowXOffset, "dpshadx", 0 },
 { rtfDrawAttr, rtfDrawShadowYOffset, "dpshady", 0 },

 { rtfVersion, 1, "rtf", 0 },
 { rtfDefFont, 1, "deff", 0 },

 { 0, 1, (char *) NULL, 0 }
+ { rtfDrawAttr, rtfDrawLock, "dolock" },
+ { rtfDrawAttr, rtfDrawPageRelX, "doxpage" },
+ { rtfDrawAttr, rtfDrawColumnRelX, "dobxcolumn" },
+ { rtfDrawAttr, rtfDrawMarginRelX, "dobxmargin" },
+ { rtfDrawAttr, rtfDrawPageRelY, "dobypage" },
+ { rtfDrawAttr, rtfDrawColumnRelY, "dobycolumn" },
+ { rtfDrawAttr, rtfDrawMarginRelY, "dobymargin" },
+ { rtfDrawAttr, rtfDrawHeight, "dobhgt" },
+
+ { rtfDrawAttr, rtfDrawBeginGroup, "dpgroup" },
+ { rtfDrawAttr, rtfDrawGroupCount, "dpcount" },
+ { rtfDrawAttr, rtfDrawEndGroup, "dpendgroup" },
+ { rtfDrawAttr, rtfDrawArc, "dparc" },
+ { rtfDrawAttr, rtfDrawCallout, "dpcallout" },
+ { rtfDrawAttr, rtfDrawEllipse, "dpellipse" },
+ { rtfDrawAttr, rtfDrawLine, "dpline" },
+ { rtfDrawAttr, rtfDrawPolygon, "dppolygon" },
+ { rtfDrawAttr, rtfDrawPolyLine, "dppolyline" },
+ { rtfDrawAttr, rtfDrawRect, "dprect" },
+ { rtfDrawAttr, rtfDrawTextBox, "dptxbx" },
+
+ { rtfDrawAttr, rtfDrawOffsetX, "dpx" },
+ { rtfDrawAttr, rtfDrawSizeX, "dpxsize" },
+ { rtfDrawAttr, rtfDrawOffsetY, "dpy" },
+ { rtfDrawAttr, rtfDrawSizeY, "dpysize" },
+
+ { rtfDrawAttr, rtfCOAngle, "dpcoa" },
+ { rtfDrawAttr, rtfCOAccentBar, "dpcoaccent" },
+ { rtfDrawAttr, rtfCOBestFit, "dpcobestfit" },
+ { rtfDrawAttr, rtfCOBorder, "dpcoborder" },
+ { rtfDrawAttr, rtfCOAttachAbsDist, "dpcodabs" },
+ { rtfDrawAttr, rtfCOAttachBottom, "dpcodbottom" },
+ { rtfDrawAttr, rtfCOAttachCenter, "dpcodcenter" },
+ { rtfDrawAttr, rtfCOAttachTop, "dpcodtop" },
+ { rtfDrawAttr, rtfCOLength, "dpcolength" },
+ { rtfDrawAttr, rtfCONegXQuadrant, "dpcominusx" },
+ { rtfDrawAttr, rtfCONegYQuadrant, "dpcominusy" },
+ { rtfDrawAttr, rtfCOOffset, "dpcooffset" },
+ { rtfDrawAttr, rtfCOAttachSmart, "dpcosmarta" },
+ { rtfDrawAttr, rtfCODoubleLine, "dpcotdouble" },
+ { rtfDrawAttr, rtfCORightAngle, "dpcotright" },
+ { rtfDrawAttr, rtfCOSingleLine, "dpcotsingle" },
+ { rtfDrawAttr, rtfCOTripleLine, "dpcottriple" },
+
+ { rtfDrawAttr, rtfDrawTextBoxMargin, "dptxbxmar" },
+ { rtfDrawAttr, rtfDrawTextBoxText, "dptxbxtext" },
+ { rtfDrawAttr, rtfDrawRoundRect, "dproundr" },
+
+ { rtfDrawAttr, rtfDrawPointX, "dpptx" },
+ { rtfDrawAttr, rtfDrawPointY, "dppty" },
+ { rtfDrawAttr, rtfDrawPolyCount, "dppolycount" },
+
+ { rtfDrawAttr, rtfDrawArcFlipX, "dparcflipx" },
+ { rtfDrawAttr, rtfDrawArcFlipY, "dparcflipy" },
+
+ { rtfDrawAttr, rtfDrawLineBlue, "dplinecob" },
+ { rtfDrawAttr, rtfDrawLineGreen, "dplinecog" },
+ { rtfDrawAttr, rtfDrawLineRed, "dplinecor" },
+ { rtfDrawAttr, rtfDrawLinePalette, "dplinepal" },
+ { rtfDrawAttr, rtfDrawLineDashDot, "dplinedado" },
+ { rtfDrawAttr, rtfDrawLineDashDotDot, "dplinedadodo" },
+ { rtfDrawAttr, rtfDrawLineDash, "dplinedash" },
+ { rtfDrawAttr, rtfDrawLineDot, "dplinedot" },
+ { rtfDrawAttr, rtfDrawLineGray, "dplinegray" },
+ { rtfDrawAttr, rtfDrawLineHollow, "dplinehollow" },
+ { rtfDrawAttr, rtfDrawLineSolid, "dplinesolid" },
+ { rtfDrawAttr, rtfDrawLineWidth, "dplinew" },
+
+ { rtfDrawAttr, rtfDrawHollowEndArrow, "dpaendhol" },
+ { rtfDrawAttr, rtfDrawEndArrowLength, "dpaendl" },
+ { rtfDrawAttr, rtfDrawSolidEndArrow, "dpaendsol" },
+ { rtfDrawAttr, rtfDrawEndArrowWidth, "dpaendw" },
+ { rtfDrawAttr, rtfDrawHollowStartArrow,"dpastarthol" },
+ { rtfDrawAttr, rtfDrawStartArrowLength,"dpastartl" },
+ { rtfDrawAttr, rtfDrawSolidStartArrow, "dpastartsol" },
+ { rtfDrawAttr, rtfDrawStartArrowWidth, "dpastartw" },
+
+ { rtfDrawAttr, rtfDrawBgFillBlue, "dpfillbgcb" },
+ { rtfDrawAttr, rtfDrawBgFillGreen, "dpfillbgcg" },
+ { rtfDrawAttr, rtfDrawBgFillRed, "dpfillbgcr" },
+ { rtfDrawAttr, rtfDrawBgFillPalette, "dpfillbgpal" },
+ { rtfDrawAttr, rtfDrawBgFillGray, "dpfillbggray" },
+ { rtfDrawAttr, rtfDrawFgFillBlue, "dpfillfgcb" },
+ { rtfDrawAttr, rtfDrawFgFillGreen, "dpfillfgcg" },
+ { rtfDrawAttr, rtfDrawFgFillRed, "dpfillfgcr" },
+ { rtfDrawAttr, rtfDrawFgFillPalette, "dpfillfgpal" },
+ { rtfDrawAttr, rtfDrawFgFillGray, "dpfillfggray" },
+ { rtfDrawAttr, rtfDrawFillPatIndex, "dpfillpat" },
+
+ { rtfDrawAttr, rtfDrawShadow, "dpshadow" },
+ { rtfDrawAttr, rtfDrawShadowXOffset, "dpshadx" },
+ { rtfDrawAttr, rtfDrawShadowYOffset, "dpshady" },
+
+ { rtfVersion, 1, "rtf" },
+ { rtfDefFont, 1, "deff" },
+
+ { 0, 1, NULL }
};
#define RTF_KEY_COUNT (sizeof(rtfKey) / sizeof(RTFKey))
typedef struct tagRTFHashTableEntry {
int count;
 RTFKey **value;
+ const RTFKey **value;
+ int *hash;
} RTFHashTableEntry;
static RTFHashTableEntry rtfHashTable[RTF_KEY_COUNT * 2];
@@ 2323,20 +2323,28 @@ static RTFHashTableEntry rtfHashTable[RT
void LookupInit(void)
{
 RTFKey *rp;
+ const RTFKey *rp;
memset(rtfHashTable, 0, sizeof rtfHashTable);
for (rp = rtfKey; rp>rtfKStr != NULL; rp++)
{
 int index;
+ int index, hash;
 rp>rtfKHash = Hash (rp>rtfKStr);
 index = rp>rtfKHash % (RTF_KEY_COUNT * 2);
+ hash = Hash (rp>rtfKStr);
+ index = hash % (RTF_KEY_COUNT * 2);
if (!rtfHashTable[index].count)
+ {
rtfHashTable[index].value = RTFAlloc(sizeof(RTFKey *));
+ rtfHashTable[index].hash = RTFAlloc(sizeof(int));
+ }
else
+ {
rtfHashTable[index].value = RTFReAlloc(rtfHashTable[index].value, sizeof(RTFKey *) * (rtfHashTable[index].count + 1));
 rtfHashTable[index].value[rtfHashTable[index].count++] = rp;
+ rtfHashTable[index].hash = RTFReAlloc(rtfHashTable[index].hash, sizeof(int) * (rtfHashTable[index].count + 1));
+ }
+ rtfHashTable[index].value[rtfHashTable[index].count] = rp;
+ rtfHashTable[index].hash[rtfHashTable[index].count] = hash;
+ rtfHashTable[index].count++;
}
}
@@ 2348,6 +2356,8 @@ void LookupCleanup(void)
{
RTFFree( rtfHashTable[i].value );
rtfHashTable[i].value = NULL;
+ RTFFree( rtfHashTable[i].hash );
+ rtfHashTable[i].hash = NULL;
rtfHashTable[i].count = 0;
}
}
@@ 2360,7 +2370,7 @@ void LookupCleanup(void)
static void Lookup(RTF_Info *info, char *s)
{
 RTFKey *rp;
+ const RTFKey *rp;
int hash;
RTFHashTableEntry *entry;
int i;
@@ 2372,7 +2382,7 @@ static void Lookup(RTF_Info *info, char
for (i = 0; i < entry>count; i++)
{
rp = entry>value[i];
 if (hash == rp>rtfKHash && strcmp (s, rp>rtfKStr) == 0)
+ if (hash == entry>hash[i] && strcmp (s, rp>rtfKStr) == 0)
{
info>rtfClass = rtfControl;
info>rtfMajor = rp>rtfKMajor;

1.4.2
More information about the winepatches
mailing list