rtcactn.cpp
上传用户:zhang_dd
上传日期:2007-01-02
资源大小:7k
文件大小:13k
- /********************************************************************************************/
- /* Rtfactn.cpp */
- /* */
- /* Author : A.Senthil */
- /* Creation Date : 14 July 1998 */
- /* Purpose : Support For Reading the Rtf File Contents */
- /********************************************************************************************/
- /* Modification History */
- /* By Whom When For What */
- /********************************************************************************************/
- #include "afxwin.h"
- #include "rtftype.h"
- #include "rtfdecl.h"
- // RTF parser tables
- // Property descriptions
- PROP rgprop [ipropMax] = {
- actnByte, propChp, offsetof(CHP, fBold), // ipropBold
- actnByte, propChp, offsetof(CHP, fItalic), // ipropItalic
- actnByte, propChp, offsetof(CHP, fUnderline), // ipropUnderline
- actnWord, propPap, offsetof(PAP, xaLeft), // ipropLeftInd
- actnWord, propPap, offsetof(PAP, xaRight), // ipropRightInd
- actnWord, propPap, offsetof(PAP, xaFirst), // ipropFirstInd
- actnWord, propSep, offsetof(SEP, cCols), // ipropCols
- actnWord, propSep, offsetof(SEP, xaPgn), // ipropPgnX
- actnWord, propSep, offsetof(SEP, yaPgn), // ipropPgnY
- actnWord, propDop, offsetof(DOP, xaPage), // ipropXaPage
- actnWord, propDop, offsetof(DOP, yaPage), // ipropYaPage
- actnWord, propDop, offsetof(DOP, xaLeft), // ipropXaLeft
- actnWord, propDop, offsetof(DOP, xaRight), // ipropXaRight
- actnWord, propDop, offsetof(DOP, yaTop), // ipropYaTop
- actnWord, propDop, offsetof(DOP, yaBottom), // ipropYaBottom
- actnWord, propDop, offsetof(DOP, pgnStart), // ipropPgnStart
- actnByte, propSep, offsetof(SEP, sbk), // ipropSbk
- actnByte, propSep, offsetof(SEP, pgnFormat), // ipropPgnFormat
- actnByte, propDop, offsetof(DOP, fFacingp), // ipropFacingp
- actnByte, propDop, offsetof(DOP, fLandscape), // ipropLandscape
- actnByte, propPap, offsetof(PAP, just), // ipropJust
- actnSpec, propPap, 0, // ipropPard
- actnSpec, propChp, 0, // ipropPlain
- actnSpec, propSep, 0, // ipropSectd
- };
- // Keyword descriptions
- SYM rgsymRtf[] = {
- // keyword dflt fPassDflt kwd idx
- "b", 1, fFalse, kwdProp, ipropBold,
- "u", 1, fFalse, kwdProp, ipropUnderline,
- "i", 1, fFalse, kwdProp, ipropItalic,
- "li", 0, fFalse, kwdProp, ipropLeftInd,
- "ri", 0, fFalse, kwdProp, ipropRightInd,
- "fi", 0, fFalse, kwdProp, ipropFirstInd,
- "cols", 1, fFalse, kwdProp, ipropCols,
- "sbknone", sbkNon, fTrue, kwdProp, ipropSbk,
- "sbkcol", sbkCol, fTrue, kwdProp, ipropSbk,
- "sbkeven", sbkEvn, fTrue, kwdProp, ipropSbk,
- "sbkodd", sbkOdd, fTrue, kwdProp, ipropSbk,
- "sbkpage", sbkPg, fTrue, kwdProp, ipropSbk,
- "pgnx", 0, fFalse, kwdProp, ipropPgnX,
- "pgny", 0, fFalse, kwdProp, ipropPgnY,
- "pgndec", pgDec, fTrue, kwdProp, ipropPgnFormat,
- "pgnucrm", pgURom, fTrue, kwdProp, ipropPgnFormat,
- "pgnlcrm", pgLRom, fTrue, kwdProp, ipropPgnFormat,
- "pgnucltr", pgULtr, fTrue, kwdProp, ipropPgnFormat,
- "pgnlcltr", pgLLtr, fTrue, kwdProp, ipropPgnFormat,
- "qc", justC, fTrue, kwdProp, ipropJust,
- "ql", justL, fTrue, kwdProp, ipropJust,
- "qr", justR, fTrue, kwdProp, ipropJust,
- "qj", justF, fTrue, kwdProp, ipropJust,
- "paperw", 12240, fFalse, kwdProp, ipropXaPage,
- "paperh", 15480, fFalse, kwdProp, ipropYaPage,
- "margl", 1800, fFalse, kwdProp, ipropXaLeft,
- "margr", 1800, fFalse, kwdProp, ipropXaRight,
- "margt", 1440, fFalse, kwdProp, ipropYaTop,
- "margb", 1440, fFalse, kwdProp, ipropYaBottom,
- "pgnstart", 1, fTrue, kwdProp, ipropPgnStart,
- "facingp", 1, fTrue, kwdProp, ipropFacingp,
- "landscape",1, fTrue, kwdProp, ipropLandscape,
- "par", 0, fFalse, kwdChar, 0x0a,
- "