A sprm is an instruction to modify one or more properties within one of the property defining data structures (CHP, PAP, TAP, SEP, or PIC). A sprm is a two-byte opcode at offset 0 which identifies the operation to be performed. If necessary information for the operation can always be expressed with a fixed length parameter, the fixed length parameter is recorded immediately after the opcode beginning at offset 2. The length of a fixed length sprm is always 2 plus the size of the sprm's parameter. If the parameter for the sprm is variable length, the count of bytes of the following parameter is stored in the byte at offset 2, followed by the parameter at offset 3.
Three sprms -- sprmPChgTabs , sprmTDefTable, and sprmTDefTable10 -- can be longer than 256 bytes. The method for calculating the length of sprmPChgTabs is recorded below with the description of the sprm. For sprmTDefTable and sprmTDefTable10, the length of the parameter plus 1 is recorded in the two bytes beginning at offset 2.
For all other variable length sprms, the total length of the sprm is the count recorded at offset 2 plus three (2 for the sprm + 1 for the count byte). The parameter immediately follows the count.
The sprm value encodes information on the size of the operand, the type of sprm (PAP, CHP, etc), and whether the sprm requires special handling (in cases where a property value isn't simply replaced).
Sprm bits (0 = low) | Value | Details |
0-8 | ispmd | unique identifier within sgc group |
9 | fSpec | sprm requires special handling |
10-12 | sgc | sprm group; type of sprm (PAP, CHP, etc) |
13-15 | spra | size of sprm argument (see following table for values) |
sgc value | type of sprm |
1 | PAP |
2 | CHP |
3 | PIC |
4 | SEP |
5 | TAP |
spra value | operand size |
0 | 1 byte (operand affects 1 bit) |
1 | 1 byte |
2 | 2 bytes |
3 | 4 bytes |
4 | 2 bytes |
5 | 2 bytes |
6 | variable length -- following byte is size of operand |
7 | 3 bytes |
When parsing a grpprl, you can use the sprm's spra value to determine how many bytes are used by that sprm; it also enables you to skip over sprms you don't handle.
Unless otherwise noted, when a sprm is applied to a property the sprm's parameter changes the old value of the property in question to the value stored in the sprm parameter.
Name | sprm | Property Modified | Parameter | Parameter size | ||||||
---|---|---|---|---|---|---|---|---|---|---|
sprmPIstd | 0x4600 | pap.istd | istd (style code) | short | ||||||
sprmPIstdPermute | 0xC601 | pap.istd | permutation vector (see below) | variable length | ||||||
sprmPIncLvl | 0x2602 | pap.istd, pap.lvl | difference between istd of base PAP and istd of PAP to be produced (see below) | byte | ||||||
sprmPJc | 0x2403 | pap.jc | jc (justification) | byte | ||||||
sprmPFSideBySide | 0x2404 | pap.fSideBySide | 0 or 1 | byte | ||||||
sprmPFKeep | 0x2405 | pap.fKeep | 0 or 1 | byte | ||||||
sprmPFKeepFollow | 0x2406 | pap.fKeepFollow | 0 or 1 | byte | ||||||
sprmPFPageBreakBefore | 0x2407 | pap.fPageBreakBefore | 0 or 1 | byte | ||||||
sprmPBrcl | 0x2408 | pap.brcl | brcl | byte | ||||||
sprmPBrcp | 0x2409 | pap.brcp | brcp | byte | ||||||
sprmPIlvl | 0x260A | pap.ilvl | ilvl | byte | ||||||
sprmPIlfo | 0x460B | pap.ilfo | ilfo (list index) | short | ||||||
sprmPFNoLineNumb | 0x240C | pap.fNoLnn | 0 or 1 | byte | ||||||
sprmPChgTabsPapx | 0xC60D | pap.itbdMac, pap.rgdxaTab, pap.rgtbd | complex - see below | variable length | ||||||
sprmPDxaRight | 0x840E | pap.dxaRight | dxa | word | ||||||
sprmPDxaLeft | 0x840F | pap.dxaLeft | dxa | word | ||||||
sprmPNest | 0x4610 | pap.dxaLeft | dxa-see below | word | ||||||
sprmPDxaLeft1 | 0x8411 | pap.dxaLeft1 | dxa | word | ||||||
sprmPDyaLine | 0x6412 | pap.lspd | an LSPD, a long word structure consisting of a short of dyaLine followed by a short of fMultLinespace - see below | long | ||||||
sprmPDyaBefore | 0xA413 | pap.dyaBefore | dya | word | ||||||
sprmPDyaAfter | 0xA414 | pap.dyaAfter | dya | word | ||||||
sprmPChgTabs | 0xC615 | pap.itbdMac, pap.rgdxaTab, pap.rgtbd | complex - see below | variable length | ||||||
sprmPFInTable | 0x2416 | pap.fInTable | 0 or 1 | byte | ||||||
sprmPFTtp | 0x2417 | pap.fTtp | 0 or 1 | byte | ||||||
sprmPDxaAbs | 0x8418 | pap.dxaAbs | dxa | word | ||||||
sprmPDyaAbs | 0x8419 | pap.dyaAbs | dya | word | ||||||
sprmPDxaWidth | 0x841A | pap.dxaWidth | dxa | word | ||||||
sprmPPc | 0x261B | pap.pcHorz, pap.pcVert | complex - see below | byte | ||||||
sprmPBrcTop10 | 0x461C | pap.brcTop | BRC10 | word | ||||||
sprmPBrcLeft10 | 0x461D | pap.brcLeft | BRC10 | word | ||||||
sprmPBrcBottom10 | 0x461E | pap.brcBottom | BRC10 | word | ||||||
sprmPBrcRight10 | 0x461F | pap.brcRight | BRC10 | word | ||||||
sprmPBrcBetween10 | 0x4620 | pap.brcBetween | BRC10 | word | ||||||
sprmPBrcBar10 | 0x4621 | pap.brcBar | BRC10 | word | ||||||
sprmPDxaFromText10 | 0x4622 | pap.dxaFromText | dxa | word | ||||||
sprmPWr | 0x2423 | pap.wr | wr (see description of PAP for definition | byte | ||||||
sprmPBrcTop | 0x6424 | pap.brcTop | BRC | long | ||||||
sprmPBrcLeft | 0x6425 | pap.brcLeft | BRC | long | ||||||
sprmPBrcBottom | 0x6426 | pap.brcBottom | BRC | long | ||||||
sprmPBrcRight | 0x6427 | pap.brcRight | BRC | long | ||||||
sprmPBrcBetween | 0x6428 | pap.brcBetween | BRC | long | ||||||
sprmPBrcBar | 0x6629 | pap.brcBar | BRC | long | ||||||
sprmPFNoAutoHyph | 0x242A | pap.fNoAutoHyph | 0 or 1 | byte | ||||||
sprmPWHeightAbs | 0x442B | pap.wHeightAbs | w | word | ||||||
sprmPDcs | 0x442C | pap.dcs | DCS | short | ||||||
sprmPShd | 0x442D | pap.shd | SHD | word | ||||||
sprmPDyaFromText | 0x842E | pap.dyaFromText | dya | word | ||||||
sprmPDxaFromText | 0x842F | pap.dxaFromText | dxa | word | ||||||
sprmPFLocked | 0x2430 | pap.fLocked | 0 or 1 | byte | ||||||
sprmPFWidowControl | 0x2431 | pap.fWidowControl | 0 or 1 | byte | ||||||
sprmPRuler | 0xC632 | variable length | ||||||||
sprmPFKinsoku | 0x2433 | pap.fKinsoku | 0 or 1 | byte | ||||||
sprmPFWordWrap | 0x2434 | pap.fWordWrap | 0 or 1 | byte | ||||||
sprmPFOverflowPunct | 0x2435 | pap.fOverflowPunct | 0 or 1 | byte | ||||||
sprmPFTopLinePunct | 0x2436 | pap.fTopLinePunct | 0 or 1 | byte | ||||||
sprmPFAutoSpaceDE | 0x2437 | pap.fAutoSpaceDE | 0 or 1 | byte | ||||||
sprmPFAutoSpaceDN | 0x2438 | pap.fAutoSpaceDN | 0 or 1 | byte | ||||||
sprmPWAlignFont | 0x4439 | pap.wAlignFont | iFa (see description of PAP for definition) | word | ||||||
sprmPFrameTextFlow | 0x443A | pap.fVertical pap.fBackward pap.fRotateFont | complex (see description of PAP for definition) | word | ||||||
sprmPISnapBaseLine | 0x243B | obsolete: not applicable in Word97 and later versions | byte | |||||||
sprmPAnld | 0xC63E | pap.anld | variable length | |||||||
sprmPPropRMark | 0xC63F | pap.fPropRMark | complex (see below) | variable length | ||||||
sprmPOutLvl | 0x2640 | pap.lvl | has no effect if pap.istd is < 1 or is > 9 | byte | ||||||
sprmPFBiDi | 0x2441 | byte | ||||||||
sprmPFNumRMIns | 0x2443 | pap.fNumRMIns | 1 or 0 | bit | ||||||
sprmPCrLf | 0x2444 | byte | ||||||||
sprmPNumRM | 0xC645 | pap.numrm | variable length | |||||||
sprmPHugePapx | 0x6645 | see below | fc in the data stream to locate the huge grpprl (see below) | long | ||||||
sprmPFUsePgsuSettings | 0x2447 | pap.fUsePgsuSettings | 1 or 0 | byte | ||||||
sprmPFAdjustRight | 0x2448 | pap.fAdjustRight | 1 or 0 | byte | ||||||
sprmCFRMarkDel | 0x0800 | chp.fRMarkDel | 1 or 0 | bit | ||||||
sprmCFRMark | 0x0801 | chp.fRMark | 1 or 0 | bit | ||||||
sprmCFFldVanish | 0x0802 | chp.fFldVanish | 1 or 0 | bit | ||||||
sprmCPicLocation | 0x6A03 | chp.fcPic and chp.fSpec | see below | variable length, length recorded is always 4 | ||||||
sprmCIbstRMark | 0x4804 | chp.ibstRMark | index into sttbRMark | short | ||||||
sprmCDttmRMark | 0x6805 | chp.dttmRMark | DTTM | long | ||||||
sprmCFData | 0x0806 | chp.fData | 1 or 0 | bit | ||||||
sprmCIdslRMark | 0x4807 | chp.idslRMReason | an index to a table of strings defined in Word 6.0 executables | short | ||||||
sprmCChs | 0xEA08 | chp.fChsDiff and chp.chse | see below | 3 bytes | ||||||
sprmCSymbol | 0x6A09 | chp.fSpec, chp.xchSym and chp.ftcSym | see below | variable length, length recorded is always 4 | ||||||
sprmCFOle2 | 0x080A | chp.fOle2 | 1 or 0 | bit | ||||||
sprmCIdCharType | 0x480B | obsolete: not applicable in Word97 and later versions | ||||||||
sprmCHighlight | 0x2A0C | chp.fHighlight, chp.icoHighlight | ico (fHighlight is set to 1 iff ico is not 0) | byte | ||||||
sprmCObjLocation | 0x680E | chp.fcObj | FC | long | ||||||
sprmCFFtcAsciSymb | 0x2A10 | |||||||||
sprmCIstd | 0x4A30 | chp.istd | istd, see stylesheet definition | short | ||||||
sprmCIstdPermute | 0xCA31 | chp.istd | permutation vector (see below) | variable length | ||||||
sprmCDefault | 0x2A32 | whole CHP (see below) | none | variable length | ||||||
sprmCPlain | 0x2A33 | whole CHP (see below) | none | 0 | ||||||
sprmCKcd | 0x2A34 | |||||||||
sprmCFBold | 0x0835 | chp.fBold | 0,1, 128, or 129 (see below) | byte | ||||||
sprmCFItalic | 0x0836 | chp.fItalic | 0,1, 128, or 129 (see below) | byte | ||||||
sprmCFStrike | 0x0837 | chp.fStrike | 0,1, 128, or 129 (see below) | byte | ||||||
sprmCFOutline | 0x0838 | chp.fOutline | 0,1, 128, or 129 (see below) | byte | ||||||
sprmCFShadow | 0x0839 | chp.fShadow | 0,1, 128, or 129 (see below) | byte | ||||||
sprmCFSmallCaps | 0x083A | chp.fSmallCaps | 0,1, 128, or 129 (see below) | byte | ||||||
sprmCFCaps | 0x083B | chp.fCaps | 0,1, 128, or 129 (see below) | byte | ||||||
sprmCFVanish | 0x083C | chp.fVanish | 0,1, 128, or 129 (see below) | byte | ||||||
sprmCFtcDefault | 0x4A3D | ftc, only used internally, never stored in file | word | |||||||
sprmCKul | 0x2A3E | chp.kul | kul | byte | ||||||
sprmCSizePos | 0xEA3F | chp.hps, chp.hpsPos | (see below) | 3 bytes | ||||||
sprmCDxaSpace | 0x8840 | chp.dxaSpace | dxa | word | ||||||
sprmCLid | 0x4A41 | only used internally never stored | word | |||||||
sprmCIco | 0x2A42 | chp.ico | ico | byte | ||||||
sprmCHps | 0x4A43 | chp.hps | hps | byte | ||||||
sprmCHpsInc | 0x2A44 | chp.hps | (see below) | byte | ||||||
sprmCHpsPos | 0x4845 | chp.hpsPos | hps | byte | ||||||
sprmCHpsPosAdj | 0x2A46 | chp.hpsPos | hps (see below) | byte | ||||||
sprmCMajority | 0xCA47 | chp.fBold, chp.fItalic, chp.fSmallCaps, chp.fVanish, chp.fStrike, chp.fCaps, chp.rgftc, chp.hps, chp.hpsPos, chp.kul, chp.dxaSpace, chp.ico, chp.rglid | complex (see below) | variable length, length byte plus size of following grpprl | ||||||
sprmCIss | 0x2A48 | chp.iss | iss | byte | ||||||
sprmCHpsNew50 | 0xCA49 | chp.hps | hps | variable width, length always recorded as 2 | ||||||
sprmCHpsInc1 | 0xCA4A | chp.hps | complex (see below) | variable width, length always recorded as 2 | ||||||
sprmCHpsKern | 0x484B | chp.hpsKern | hps | short | ||||||
sprmCMajority50 | 0xCA4C | chp.fBold, chp.fItalic, chp.fSmallCaps, chp.fVanish, chp.fStrike, chp.fCaps, chp.ftc, chp.hps, chp.hpsPos, chp.kul, chp.dxaSpace, chp.ico, | complex (see below) | variable length | ||||||
sprmCHpsMul | 0x4A4D | chp.hps | percentage to grow hps | short | ||||||
sprmCYsri | 0x484E | chp.ysri | ysri | short | ||||||
sprmCRgFtc0 | 0x4A4F | chp.rgftc[0] | ftc for ASCII text (see below) | short | ||||||
sprmCRgFtc1 | 0x4A50 | chp.rgftc[1] | ftc for Far East text (see below) | short | ||||||
sprmCRgFtc2 | 0x4A51 | chp.rgftc[2] | ftc for non-Far East text (see below) | short | ||||||
sprmCCharScale | 0x4852 | |||||||||
sprmCFDStrike | 0x2A53 | chp.fDStrike | byte | |||||||
sprmCFImprint | 0x0854 | chp.fImprint | 1 or 0 | bit | ||||||
sprmCFSpec | 0x0855 | chp.fSpec | 1 or 0 | bit | ||||||
sprmCFObj | 0x0856 | chp.fObj | 1 or 0 | bit | ||||||
sprmCPropRMark | 0xCA57 | chp.fPropRMark, chp.ibstPropRMark, chp.dttmPropRMark | Complex (see below) | variable length always recorded as 7 bytes | ||||||
sprmCFEmboss | 0x0858 | chp.fEmboss | 1 or 0 | bit | ||||||
sprmCSfxText | 0x2859 | chp.sfxtText | text animation | byte | ||||||
sprmCFBiDi | 0x085A | |||||||||
sprmCFDiacColor | 0x085B | |||||||||
sprmCFBoldBi | 0x085C | |||||||||
sprmCFItalicBi | 0x085D | |||||||||
sprmCFtcBi | 0x4A5E | |||||||||
sprmCLidBi | 0x485F | |||||||||
sprmCIcoBi | 0x4A60 | |||||||||
sprmCHpsBi | 0x4A61 | |||||||||
sprmCDispFldRMark | 0xCA62 | chp.fDispFldRMark, chp.ibstDispFldRMark, chp.dttmDispFldRMark | Complex (see below) | variable length always recorded as 39 bytes | ||||||
sprmCIbstRMarkDel | 0x4863 | chp.ibstRMarkDel | index into sttbRMark | short | ||||||
sprmCDttmRMarkDel | 0x6864 | chp.dttmRMarkDel | DTTM | long | ||||||
sprmCBrc | 0x6865 | chp.brc | BRC | long | ||||||
sprmCShd | 0x4866 | chp.shd | SHD | short | ||||||
sprmCIdslRMarkDel | 0x4867 | chp.idslRMReasonDel | an index to a table of strings defined in Word 6.0 executables | short | ||||||
sprmCFUsePgsuSettings | 0x0868 | chp.fUsePgsuSettings | 1 or 0 | bit | ||||||
sprmCCpg | 0x486B | word | ||||||||
sprmCRgLid0 | 0x486D | chp.rglid[0] | LID: for non-Far East text | word | ||||||
sprmCRgLid1 | 0x486E | chp.rglid[1] | LID: for Far East text | word | ||||||
sprmCIdctHint | 0x286F | chp.idctHint | IDCT: (see below) | byte | ||||||
sprmPicBrcl | 0x2E00 | pic.brcl | brcl (see PIC structure definition) | byte | ||||||
sprmPicScale | 0xCE01 | pic.mx, pic.my, pic.dxaCropleft, pic.dyaCropTop pic.dxaCropRight, pic.dyaCropBottom | Complex (see below) | length byte plus 12 bytes | ||||||
sprmPicBrcTop | 0x6C02 | pic.brcTop | BRC | long | ||||||
sprmPicBrcLeft | 0x6C03 | pic.brcLeft | BRC | long | ||||||
sprmPicBrcBottom | 0x6C04 | pic.brcBottom | BRC | long | ||||||
sprmPicBrcRight | 0x6C05 | pic.brcRight | BRC | long | ||||||
sprmScnsPgn | 0x3000 | sep.cnsPgn | cns | byte | ||||||
sprmSiHeadingPgn | 0x3001 | sep.iHeadingPgn | heading number level | byte | ||||||
sprmSOlstAnm | 0xD202 | sep.olstAnm | OLST | variable length | ||||||
sprmSDxaColWidth | 0xF203 | sep.rgdxaColWidthSpacing | complex (see below) | 3 bytes | ||||||
sprmSDxaColSpacing | 0xF204 | sep.rgdxaColWidthSpacing | complex (see below) | 3 bytes | ||||||
sprmSFEvenlySpaced | 0x3005 | sep.fEvenlySpaced | 1 or 0 | byte | ||||||
sprmSFProtected | 0x3006 | sep.fUnlocked | 1 or 0 | byte | ||||||
sprmSDmBinFirst | 0x5007 | sep.dmBinFirst | word | |||||||
sprmSDmBinOther | 0x5008 | sep.dmBinOther | word | |||||||
sprmSBkc | 0x3009 | sep.bkc | bkc | byte | ||||||
sprmSFTitlePage | 0x300A | sep.fTitlePage | 0 or 1 | byte | ||||||
sprmSCcolumns | 0x500B | sep.ccolM1 | # of cols - 1 | word | ||||||
sprmSDxaColumns | 0x900C | sep.dxaColumns | dxa | word | ||||||
sprmSFAutoPgn | 0x300D | sep.fAutoPgn | obsolete | byte | ||||||
sprmSNfcPgn | 0x300E | sep.nfcPgn | nfc | byte | ||||||
sprmSDyaPgn | 0xB00F | sep.dyaPgn | dya | short | ||||||
sprmSDxaPgn | 0xB010 | sep.dxaPgn | dya | short | ||||||
sprmSFPgnRestart | 0x3011 | sep.fPgnRestart | 0 or 1 | byte | ||||||
sprmSFEndnote | 0x3012 | sep.fEndnote | 0 or 1 | byte | ||||||
sprmSLnc | 0x3013 | sep.lnc | lnc | byte | ||||||
sprmSGprfIhdt | 0x3014 | sep.grpfIhdt | grpfihdt (see Headers and Footers topic) | byte | ||||||
sprmSNLnnMod | 0x5015 | sep.nLnnMod | non-neg int. | word | ||||||
sprmSDxaLnn | 0x9016 | sep.dxaLnn | dxa | word | ||||||
sprmSDyaHdrTop | 0xB017 | sep.dyaHdrTop | dya | word | ||||||
sprmSDyaHdrBottom | 0xB018 | sep.dyaHdrBottom | dya | word | ||||||
sprmSLBetween | 0x3019 | sep.fLBetween | 0 or 1 | byte | ||||||
sprmSVjc | 0x301A | sep.vjc | vjc | byte | ||||||
sprmSLnnMin | 0x501B | sep.lnnMin | lnn | word | ||||||
sprmSPgnStart | 0x501C | sep.pgnStart | pgn | word | ||||||
sprmSBOrientation | 0x301D | sep.dmOrientPage | dm | byte | ||||||
sprmSBCustomize | 0x301E | |||||||||
sprmSXaPage | 0xB01F | sep.xaPage | xa | word | ||||||
sprmSYaPage | 0xB020 | sep.yaPage | ya | word | ||||||
sprmSDxaLeft | 0xB021 | sep.dxaLeft | dxa | word | ||||||
sprmSDxaRight | 0xB022 | sep.dxaRight | dxa | word | ||||||
sprmSDyaTop | 0x9023 | sep.dyaTop | dya | word | ||||||
sprmSDyaBottom | 0x9024 | sep.dyaBottom | dya | word | ||||||
sprmSDzaGutter | 0xB025 | sep.dzaGutter | dza | word | ||||||
sprmSDmPaperReq | 0x5026 | sep.dmPaperReq | dm | word | ||||||
sprmSPropRMark | 0xD227 | sep.fPropRMark, sep.ibstPropRMark, sep.dttmPropRMark | complex (see below) | variable length always recorded as 7 bytes | ||||||
sprmSFBiDi | 0x3228 | |||||||||
sprmSFFacingCol | 0x3229 | |||||||||
sprmSFRTLGutter | 0x322A | |||||||||
sprmSBrcTop | 0x702B | sep.brcTop | BRC | long | ||||||
sprmSBrcLeft | 0x702C | sep.brcLeft | BRC | long | ||||||
sprmSBrcBottom | 0x702D | sep.brcBottom | BRC | long | ||||||
sprmSBrcRight | 0x702E | sep.brcRight | BRC | long | ||||||
sprmSPgbProp | 0x522F | sep.pgbProp | word | |||||||
sprmSDxtCharSpace | 0x7030 | sep.dxtCharSpace | dxt | long | ||||||
sprmSDyaLinePitch | 0x9031 | sep.dyaLinePitch | dya | long | ||||||
sprmSClm | 0x5032 | |||||||||
sprmSTextFlow | 0x5033 | sep.wTextFlow | complex (see below) | short | ||||||
sprmTJc | 0x5400 | tap.jc | jc | word (low order byte is significant) | ||||||
sprmTDxaLeft | 0x9601 | tap.rgdxaCenter (see below) | dxa | word | ||||||
sprmTDxaGapHalf | 0x9602 | tap.dxaGapHalf, tap.rgdxaCenter (see below) | dxa | word | ||||||
sprmTFCantSplit | 0x3403 | tap.fCantSplit | 1 or 0 | byte | ||||||
sprmTTableHeader | 0x3404 | tap.fTableHeader | 1 or 0 | byte | ||||||
sprmTTableBorders | 0xD605 | tap.rgbrcTable | complex(see below) | 24 bytes | ||||||
sprmTDefTable10 | 0xD606 | tap.rgdxaCenter, tap.rgtc | complex (see below) | variable length | ||||||
sprmTDyaRowHeight | 0x9407 | tap.dyaRowHeight | dya | word | ||||||
sprmTDefTable | 0xD608 | tap.rgtc | complex (see below) | |||||||
sprmTDefTableShd | 0xD609 | tap.rgshd | complex (see below) | |||||||
sprmTTlp | 0x740A | tap.tlp | TLP | 4 bytes | ||||||
sprmTFBiDi | 0x560B | |||||||||
sprmTHTMLProps | 0x740C | |||||||||
sprmTSetBrc | 0xD620 | tap.rgtc[].rgbrc | complex (see below) | 5 bytes | ||||||
sprmTInsert | 0x7621 | tap.rgdxaCenter, tap.rgtc | complex (see below) | 4 bytes | ||||||
sprmTDelete | 0x5622 | tap.rgdxaCenter, tap.rgtc | complex (see below) | word | ||||||
sprmTDxaCol | 0x7623 | tap.rgdxaCenter | complex (see below) | 4 bytes | ||||||
sprmTMerge | 0x5624 | tap.fFirstMerged, tap.fMerged | complex (see below) | word | ||||||
sprmTSplit | 0x5625 | tap.fFirstMerged, tap.fMerged | complex (see below) | word | ||||||
sprmTSetBrc10 | 0xD626 | tap.rgtc[].rgbrc | complex (see below) | 5 bytes | ||||||
sprmTSetShd | 0x7627 | tap.rgshd | complex (see below) | 4 bytes | ||||||
sprmTSetShdOdd | 0x7628 | tap.rgshd | complex (see below) | 4 bytes | ||||||
sprmTTextFlow | 0x7629 | tap.rgtc[].fVertical tap.rgtc[].fBackward tap.rgtc[].fRotateFont | 0 or 1 0 or 1 0 or 1 | word | ||||||
sprmTDiagLine | 0xD62A | |||||||||
sprmTVertMerge | 0xD62B | tap.rgtc[].vertMerge | complex (see below) | variable length always recorded as 2 bytes | ||||||
sprmTVertAlign | 0xD62C | tap.rgtc[].vertAlign | complex (see below) | variable length always recorded as 3 byte |
sprmPIstdPermute (opcode 0xC601) is a complex sprm which is applied to a piece when the style codes of paragraphs within a piece must be mapped to other style codes. It has the following format:
Field | Size | Comment |
sprm | short | opcode( ==0xC601) |
cch | byte | count of bytes (not including sprm and cch) |
fLongg | byte | always 0 |
fSpare | byte | always 0 |
istdFirst | unsigned short | index of first style in range to which permutation stored in rgistd applies |
istdLast | unsigned short | index of last style in range to which permutation stored in rgistd applies |
rgistd[] | unsigned short | array of istd entries that records the mapping of istds for text copied from a source document to istds that exists in the destination document after the text has been pasted |
To interpret sprmPIstdPermute, first check if pap.istd is greater than the istdFirst recorded in the sprm and less than or equal to the istdLast recorded in the sprm If not, the sprm has no effect. If it is, pap.istd is set to rgistd[pap.istd - istdFirst]. sprmPIstdPermute is only stored in grpprls linked to a piece table. It should never be recorded in a PAPX.
sprmPIncLvl (opcode 0x2602) is applied to pieces in the piece table that contain paragraphs with style codes (istds) greater than or equal to 1 and less than or equal to 9. These style codes identify heading levels in a Word outline structure. The sprm causes a set of paragraphs to be changed to a new heading level. The sprm is three bytes long and consists of the sprm code and a one byte two's complement value.
If pap.stc is < 1 or > 9, sprmPIncLvl has no effect. Otherwise, if the value stored in the byte has its highest order bit off, the value is a positive difference which should be added to pap.istd and pap.lvl and then pap.stc should be set to min(pap.istd, 9). If the byte value has its highest order bit on, the value is a negative difference which should be sign extended to a word and then subtracted from pap.istd and pap.lvl. Then pap.stc should be set to max(1, pap.istd). sprmPIncLvl is only stored in grpprls linked to a piece table.
sprmPIlfo (opcode 0x460B) sets the pap.ilfo. Its argument, an ilfo, is an index into the document's hpllfo, which contains the list data for that paragraph, describing the appearance of the automatic number at the beginning of the paragraph. A value of zero means that the paragraph is not numbered, and a value of 2047 indicates that this paragraph came from a pre-Word 97 file so the formatting information is still stored in the pap.anld and the paragraph should be converted to Word 97 format.
sprmPIlvl (opcode (0x260A) sets the pap.ilvl. It takes an index (0 through 8) which indicates which level of a multilevel list this paragraph belongs to. For simple (one-level lists) or unnumbered paragraphs, this value should always be zero.
sprmPAnld (opcode ...) is currently only used for compatibility with pre-Word 97 docs. It sets the pap.anld, which before Word 97 described the automatic number at the beginning of any numbered paragraph. Now we use it only long enough to put the data into the document's list table (rglst) and set the pap.ilfo to point to the proper entry in the list table. The pap.anld is only relavent if pap.ilfo is equal to 2047 (see sprmPIlfo above).
The sprmPChgTabsPapx (opcode 0xC60D) is a complex sprm that describes changes in tab settings from the underlying style. It is only stored as part of PAPXs stored in FKPs and in the STSH. It has the following format:
Field | Size | Comment |
sprm | short | opcode |
cch | byte | count of bytes (not including sprm and cch) |
itbdDelMax | byte | number of tabs to delete |
rgdxaDel | int[itbdDelMax] | array of tab positions for which tabs should be deleted |
itbdAddMax | byte | number of tabs to add |
rgdxaAdd | int[itbdAddMax] | array of tab positions for which tabs should be added |
rgtbdAdd | byte[itbdAddMax] | array of tab descriptors corresponding to rgdxaAdd |
When sprmPChgTabsPapx is interpreted, the rgdxaDel of the sprm is applied first to the pap that is being transformed. This is done by deleting from the pap the rgdxaTab entry and rgtbd entry of any tab whose rgdxaTab value is equal to one of the rgdxaDel values in the sprm. It is guaranteed that the entries in pap.rgdxaTab and the sprm's rgdxaDel and rgdxaAdd are recorded in ascending dxa order.
Then the rgdxaAdd and rgtbdAdd entries are merged into the pap's rgdxaTab and rgtbd arrays so that the resulting pap rgdxaTab is sorted in ascending order with no duplicates.
sprmPNest (opcode 0x4610) causes its operand, a two-byte dxa value to be added to pap.dxaLeft. If the result of the addition is less than 0, 0 is stored into pap.dxaLeft. It is used to shift the left indent of a paragraph to the right or left. sprmPNest is only stored in grpprls linked to a piece table.
sprmPDyaLine (opcode 0x6412) moves a 4 byte LSPD structure into pap.lspd. Two short fields are stored in this data structure. The first short in the structure is named lspd.dyaLine and the second is named lspd.fMultLinespace. When lspd.fMultLinespace is 0, the magnitude of lspd.dyaLine specifies the amount of space that will be provided for lines in the paragraph in twips. When lspd.dyaLine is positive, Word will ensure that AT LEAST the magnitude of lspd.dyaLine will be reserved on the page for each line displayed in the paragraph. If the height of a line becomes greater than lspd.dyaLine, the size calculated for that line will be reserved on the page. When lspd.dyaLine is negative, Word will ensure that EXACTLY the magnitude of lspd.dyaLine (-lspd.dyaLine) will be reserved on the page for each line displayed in the paragraph. When lspd.fMultLinespace is 1, Word will reserve for each line the (maximal height of the line*lspd.dyaLine)/240.
The sprmPChgTabs (opcode 0xC615) is a complex sprm which describes changes tab settings for any paragraph within a piece. It is only stored as part of a grpprl linked to a piece table. It has the following format:
Field | Size | Comment |
sprm | short | opcode |
cch | byte | count of bytes (not including sprm and cch) |
itbdDelMax | byte | number of tabs to delete |
rgdxaDel | int[itbdDelMax] | array of tab positions for which tabs should be deleted |
rgdxaClose | int[itbdDelMax] | array of tolerances corresponding to rgdxaDel where each tolerance defines an interval around corresponding rgdxaDel entry within which all tabs should be removed |
itbdAddMax | byte | number of tabs to add |
rgdxaAdd | int[itbdAddMax] | array of tab positions for which tabs should be added |
rgtbdAdd | byte[itbdAddMax] | array of tab descriptors corresponding to rgdxaAdd |
itbdDelMax and itbdAddMax are defined to be equal to 50. This means that the largest possible instance of sprmPChgTabs is 354. When the length of the sprm is greater than or equal to 255, the cch field will be set equal to 255. When cch == 255, the actual length of the sprm can be calculated as follows: length = 2 + itbdDelMax * 4 + itbdAddMax * 3.
When sprmPChgTabs is interpreted, the rgdxaDel of the sprm is applied first to the pap that is being transformed. This is done by deleting from the pap the rgdxaTab entry and rgtbd entry of any tab whose rgdxaTab value is within the interval [rgdxaDel[i] - rgdxaClose[i], rgdxaDel[i] + rgdxaClose[i]] It is guaranteed that the entries in pap.rgdxaTab and the sprm's rgdxaDel and rgdxaAdd are recorded in ascending dxa order.
Then the rgdxaAdd and rgtbdAdd entries are merged into the pap's rgdxaTab and rgtbd arrays so that the resulting pap rgdxaTab is sorted in ascending order with no duplicates.
The sprmPPc (opcode 0x261B) is a complex sprm which describes changes in the pap.pcHorz and pap.pcVert. It is able to change both fields' contents in parallel. It has the following format:
b10 | b16 | field | type | size | bitfield | comments |
0 | 0 | sprm | short | opcode | ||
2 | 2 | short | :4 | F0 | reserved | |
pcVert | short | :2 | 0C | if pcVert ==3, pap.pcVert should not be changed. Otherwise, contains new value of pap.pcVert. | ||
pcHorz | short | :2 | 03 | if pcHorz==3, pap.pcHorz should not be changed. Otherwise, contains new value of pap.pcHorz. |
Length of sprmPPc is three bytes.
sprmPPc is interpreted by moving pcVert to pap.pcVert if pcVert != 3 and by moving pcHorz to pap.pcHorz if pcHorz != 3. sprmPPc is stored in PAPX FKPs and also in grpprls linked to piece table entries.
sprmPPropRMark (opcode 0xC63F) is interpreted by moving the first parameter byte to pap.fPropRMark, the next two bytes to pap.ibstPropRMark, and the remaining four bytes to pap.dttmPropRMark.
sprmPHugePapx is stored in PAPX FKPs in place of the grpprl of a PAPX which would otherwise be too big to fit in an FKP (as of this writing, 488 bytes is the size of the largest PAPX which can fit in an FKP). The parameter fc gives the location of the grpprl in the data stream. The first word at that fc counts the number of bytes in the grpprl (not including the byte count itself). A sprmPHugePapx should therefore only be found in a PAPX FKP and should be the only sprm in that PAPX's grpprl.
sprmCPicLocation (opcode 0x6A03) is used ONLY IN CHPX FKPs. This sprm moves the 4-byte operand of the sprm into the chp.fcPic field. It simultaneously sets chp.fSpec to 1. This sprm is also when the chp.lTagObj field that is unioned with chp.fcPic is to be set for OLE objects.
sprmCChs (opcode 0xEA08) is used to record a character set id for text that was pasted into the Word document that used a character set different than Word's default character set. When chp.fChsDiff is 0, the character set used for a run of text is the default character set for the version of Word that last saved the document. When chp.fChsDiff is 1, chp.chse specifies the character set used for this run of text. This sprm's operand is 3 bytes. When this sprm is interpreted, the first byte of the operand is moved to chp.fChsDiff and the remaining word is moved to chp.chse.
sprmCSymbol (opcode 0x6A09) is used to specify the font and the character that will be used within that font to display a symbol character in Word. This sprm's operand is 4 bytes. The first 2 hold the font code; the last 2 hold a character specifier. When this sprm is interpreted, the font code is moved to chp.ftcSym and the character specifier is moved to chp.xchSym and chp.fSpec is set to 1.
sprmCIstdPermute (opcode 0xCA31) (which has the same format as sprmPIstdPermute (opcode 0xC601)) is a complex sprm which is applied to a piece when the style codes for character styles tagging character runs within a piece must be mapped to other style codes. It has the following format:
Field | Size | Comment |
sprm | short | opcode( ==0xCA31) |
cch | byte | count of bytes (not including sprm and cch) |
fLongg | byte | always 0 |
fSpare | byte | always 0 |
istdFirst | unsigned short | index of first style in range to which permutation stored in rgistd applies |
istdLast | unsigned short | index of last style in range to which permutation stored in rgistd applies |
rgistd[] | unsigned short | array of istd entries that records the mapping of istds for text copied from a source document to istds that exists in the destination document after the text has been pasted |
To interpret sprmCIstdPermute, first check if chp.istd is greater than the istdFirst recorded in the sprm and less than or equal to the istdLast recorded in the sprm If not, the sprm has no effect. If it is, chp.istd is set to rgstd[chp.istd - istdFirst] and any chpx stored in that rgstd entry is applied to the chp. sprmCIstdPermute is only stored in grpprls linked to a piece table. It should never be recorded in a CHPX.
Note that it is possible that an istd may be recorded in the rgistd that refers to a paragraph style. This will no harmful consequences since the istd for a paragraph style should never be recorded in chp.istd.
sprmCDefault (opcode 0x2A32) clears the fBold, fItalic, fOutline, fStrike, fShadow, fSmallCaps, fCaps, fVanish, kul and ico fields of the chp to 0. It was first defined for Word 3.01 and had to be backward compatible with Word 3.00 so it is a variable length sprm whose count of bytes is 0. It consists of the sprmCDefault opcode followed by a byte of 0. sprmCDefault is stored only in grpprls linked to piece table entries.
sprmCPlain (opcode 0x2A33) is used to make the character properties of runs of text equal to the style character properties of the paragraph that contains the text. When Word interprets this sprm, the style sheet CHP is copied over the original CHP preserving the fSpec setting from the original CHP. sprmCPlain is stored only in grpprls linked to piece table entries.
sprms 0x0835 through 0x083C (sprmCFBold through sprmCFVanish) set single bit properties in the CHP. When the parameter of the sprm is set to 0 or 1, then the CHP property is set to the parameter value.
When the parameter of the sprm is 128, then the CHP property is set to the value that is stored for the property in the style sheet. CHP When the parameter of the sprm is 129, the CHP property is set to the negation of the value that is stored for the property in the style sheet CHP. sprmCFBold through sprmCFVanish are stored only in grpprls linked to piece table entries.
sprmCSizePos (opcode 0xEA3F) is a five-byte sprm consisting of the sprm opcode and a three byte parameter. The sprm has the following format:
b10 | b16 | field | type | size | bitfield | comments |
0 | 0 | sprm | short | opcode | ||
2 | 2 | hpsSize | short | :8 | FF | when != 0, contains new size of chp.hps |
3 | 3 | cInc | short | :7 | FE | contains the number of font levels to increase or decrease size of chp.hps as a twos complement value. |
fAdjust | short | :1 | 01 | when == 1, means that chp.hps should be adjusted up/down by one font level for super/subscripting change | ||
4 | 4 | hpsPos | short | :8 | FF | when != 128, contains super/subscript position as a twos complement number |
When Word interprets this sprm, if hpsSize != 0 then chp.hps is set to hpsSize. If cInc is != 0, the cInc is interpreted as a 7 bit twos complement number and the procedure described below for interpreting sprmCHpsInc is followed to increase or decrease the chp.hps by the specified number of levels. If hpsPos is != 128, then chp.hpsPos is set equal to hpsPos. If fAdjust is on , hpsPos != 128 and hpsPos != 0 and the previous value of chp.hpsPos == 0, then chp.hps is reduced by one level following the method described for sprmCHpsInc. If fAdjust is on, hpsPos == 0 and the previous value of chp.hpsPos != 0, then the chp.hps value is increased by one level using the method described below for sprmCHpsInc.
sprmCHpsInc(opcode 0x2A44) is a three-byte sprm consisting of the sprm opcode and a one-byte parameter. Word keeps an ordered array of the font sizes that are defined for the fonts recorded in the system file with each font size transformed into an hps. The parameter is a one-byte twos complement number. Word uses this number to calculate an index in the font size array to determine the new hps for a run. When Word interprets this sprm and the parameter is positive, it searches the array of font sizes to find the index of the smallest entry in the font size table that is greater than the current chp.hps.It then adds the parameter minus 1 to the index and maxes this with the index of the last array entry. It uses the result as an index into the font size array and assigns that entry of the array to chp.hps.
When the parameter is negative, Word searches the array of font sizes to find the index of the entry that is less than or equal to the current chp.hps. It then adds the negative parameter to the index and does a min of the result with 0. The result of the min function is used as an index into the font size array and that entry of the array is assigned to chp.hps. sprmCHpsInc is stored only in grpprls linked to piece table entries.
sprmCHpsPosAdj (opcode 0x2A46) causes the hps of a run to be reduced the first time text is superscripted or subscripted and causes the hps of a run to be increased when superscripting/subscripting is removed from a run. The one byte parameter of this sprm is the new hpsPos value that is to be stored in chp.hpsPos. If the new hpsPos is not equal 0 (meaning that the text is to be super/subscripted), Word first examines the current value of chp.hpsPos to see if it is equal to 0. If so, Word uses the algorithm described for sprmCHpsInc to decrease chp.hps by one level. If the new hpsPos == 0 (meaning the text is not super/subscripted), Word examines the current chp.hpsPos to see if it is not equal to 0. If it is not (which means text is being restored to normal position), Word uses the sprmCHpsInc algorithm to increase chp.hps by one level. After chp.hps is adjusted, the parameter value is stored in chp.hpsPos. sprmCHpsPosAdj is stored only in grpprls linked to piece table entries.
The parameter of sprmCMajority (opcode 0xCA47) is itself a list of character sprms which encodes a criterion under which certain fields of the chp are to be set equal to the values stored in a style's CHP. Bytes 0 and 1 of sprmCMajority contains the opcode, byte 2 contains the length of the following list of character sprms. . Word begins interpretation of this sprm by applying the stored character sprm list to a standard chp. That chp has chp.istd = istdNormalChar. chp.hps=20, chp.lid=0x0400 and chp.ftc = 4. Word then compares fBold, fItalic, fStrike, fOutline, fShadow, fSmallCaps, fCaps, ftc, hps, hpsPos, kul, qpsSpace and ico in the original CHP with the values recorded for these fields in the generated CHP.. If a field in the original CHP has the same value as the field stored in the generated CHP, then that field is reset to the value stored in the style's CHP. If the two copies differ, then the original CHP value is left unchanged. sprmCMajority is stored only in grpprls linked to piece table entries.
sprmCHpsInc1 (opcode 0xCA4A) is used to increase or decrease chp.hps by increments of 1. This sprm is interpreted by adding the two byte increment stored as the opcode of the sprm to chp.hps. If this result is less than 8, the chp.hps is set to 8. If the result is greater than 32766, the chp.hps is set to 32766.
sprmCMajority50 (opcode 0xCA4C) has the same format as sprmCMajority and is interpreted in the same way.
sprmCPropRMark (opcode 0xCA57) is interpreted by moving the first parameter byte to chp.fPropRMark, the next two bytes to chp.ibstPropRMark, and the remaining four bytes to chp.dttmPropRMark.
sprmCDispFldRMark (opcode 0xCA62) is interpreted by moving the first parameter byte to chp.fDispFldRMark, the next two bytes to chp.ibstDispFldRMark, the next four bytes to chp.dttmDispFldRMark, and the remaining 32 bytes to chp.xstDispFldRMark.
sprmCRgftc0 (opcode 0x4A4F), sprmcCRgftc1(opcode 0x4A50), and sprmCRgftc2 (opcode 0x4A4F) are used to specify the fonts that are available for use with text. Rgftc0 specifies the font used for characters from U+0000->U+007F. Rgftc1 specifies the font to be used for Far East characters, and Rgftc2 specifies the font to be used for all other text. See appendix C for details on how the font is calculated.
sprmCRglid0 (opcode 0x486D) and sprmCRglid1 (opcode 0x486E) are used to specify the languages that are available for use with the text in this run. sprmCRglid1 specifies the language for Far East text, sprmCRglid0 specifies the language for all other text. See Appendix C for details on the language is calculated.
sprmCIdctHint (opcode 0x286F) specifies a script bias for the text in the run. For Unicode characters that are shared between Far East and non-Far East scripts, this property determines what font and language the character will use. When this value is 0, text properties bias towards non-Far East properties. When this value is 1, text properties bias towards Far East properties. See Appendix C for details on the calculation of font and language properties.
sprmPicScale (opcode 0xCE01) is used to scale the x and y dimensions of a Word picture and to set the cropping for each side of the picture. The sprm begins with the two-byte opcode, followed by the length of the parameter (always 12) stored in a byte. The 12-byte long operand consists of an array of 6 two-byte integer fields. The 0th integer contains the new setting for pic.mx. The 1st integer contains the new setting for pic.my. The 2nd integer contains the new setting for pic.dxaCropLeft. The 3rd integer contains the new setting for pic.dyaCropTop. The 4th integer contains the new setting for pic.dxaCropRight. The 5th integer contains the new setting of pic.dxaCropBottom. sprmPicScale is stored only in grpprls linked to piece table entries.
sprmSPropRMark (opcode 0xD227) is interpreted by moving the first parameter byte to sep.fPropRMark, the next two bytes to sep.ibstPropRMark, and the remaining four bytes to sep.dttmPropRMark.
sprmSTextFlow (opcode 0x5033) represents the textflow to be applied to this section. Possible values are:
0 | horizontal, non-@font |
1 | top to bottom, @font |
2 | bottom to top, non-@font |
3 | top to botton, non-@font |
4 | horizontal, @-font |
sprmTDxaLeft (opcode 0x9601) is called to adjust the x position within a column which marks the left boundary of text within the first cell of a table row. This sprm causes a whole table row to be shifted left or right within its column leaving the horizontal width and vertical height of cells in the row unchanged. Bytes 0-1 of the sprm contains the opcode, and the new dxa position, call it dxaNew, is stored as an integer in bytes 2 and 3. Word interprets this sprm by addingdxaNew - (rgdxaCenter[0] + tap.dxaGapHalf) to every entry of tap.rgdxaCenter whose index is less than tap.itcMac. sprmTDxaLeft is stored only in grpprls linked to piece table entries.
sprmTDxaGapHalf (opcode 0x9602) adjusts the white space that is maintained between columns by changing tap.dxaGapHalf. Because we want the left boundary of text within the leftmost cell to be at the same location after the sprm is applied, Word also adjusts tap.rgdxCenter[0] by the amount that tap.dxaGapHalf changes. Bytes 0-1 of the sprm contains the opcode, and the new dxaGapHalf, call it dxaGapHalfNew, is stored in bytes 2 and 3. When the sprm is interpreted, the change between the old and new dxaGapHalf values, tap.dxaGapHalf - dxaGapHalfNew, is added to tap.rgdxaCenter[0] and then dxaGapHalfNew is moved to tap.dxaGapHalf. sprmTDxaGapHalf is stored in PAPXs and also in grpprls linked to piece table entries.
sprmTTableBorders (opcode 0xD605) sets the tap.rgbrcTable. The sprm is interpreted by moving the 24 bytes of the sprm's operand to tap.rgbrcTable.
sprmTDefTable10 (opcode0xD606) is an obsolete version of sprmTDefTable (opcode 0xD608) that was used in WinWord 1.x. Its contents are identical to those in sprmTDefTable, except that the TC structures contain the obsolete structures BRC10s.
sprmTDefTable (opcode 0xD608) defines the boundaries of table cells (tap.rgdxaCenter) and the properties of each cell in a table (tap.rgtc). Bytes 0 and 1 of the sprm contain its opcode. Bytes 2 and 3 store a two-byte length of the following parameter. Byte 4 contains the number of cells that are to be defined by the sprm, call it itcMac. When the sprm is interpreted, itcMac is moved to tap.itcMac. itcMac cannot be larger than 32. In bytes 5 through 5+2*(itcMac + 1) -1 , is stored an array of integer dxa values sorted in ascending order which will be moved to tap.rgdxaCenter. In bytes 5+ 2*(itcMac + 1) through byte 5+2*(itcMac + 1) + 10*itcMac - 1 is stored an array of TC entries corresponding to the stored tap.rgdxaCenter. This array is moved to tap.rgtc. sprmTDefTable is only stored in PAPXs.
sprmTDefTableShd (opcode 0xD609) is similar to sprmTDefTable, and compliments it by defining the shading of each cell in a table (tap.rgshd). Bytes 0 and 1 of the sprm contain its opcode. Bytes 2 and 3 store a two-byte length of the following parameter. Byte 4 contains the number of cells that are to be defined by the sprm, call it itcMac. itcMac cannot be larger than 32. In bytes 5 through 5+2*(itcMac + 1) -1 , is stored an array of SHDs. This array is moved to tap.rgshd. sprmTDefTable is only stored in PAPXs.
sprmTSetBrc (opcode 0xD620) allows the border definitions(BRCs) within TCs to be set to new values. It has the following format:
b10 | b16 | field | type | size | bitfield | comments |
0 | 0 | sprm | short | opcode 0xD620 | ||
2 | 2 | count | byte | number of bytes for operand | ||
3 | 3 | itcFirst | byte | the index of the first cell that is to have its borders changed. | ||
4 | 4 | itcLim | byte | index of the cell that follows the last cell to have its borders changed | ||
5 | 5 | short | :4 | F0 | reserved | |
fChangeRight | short | :1 | 08 | =1 when tap.rgtc[].brcRight is to be changed | ||
fChangeBottom | short | :1 | 04 | =1 when tap.rgtc[].brcBottom is to be changed | ||
fChangeLeft | short | :1 | 02 | =1 when tap.rgtc[].brcLeft is to be changed | ||
fChangeTop | short | :1 | 01 | =1 when tap.rgtc[].brcTop is to be changed | ||
6 | 6 | brc | BRC | new BRC value to be stored in TCs. |
This sprm changes the brc fields selected by the fChange* flags in the sprm to the brc value stored in the sprm, for every tap.rgtc entry whose index is greater than or equal to itcFirst and less than itcLim.sprmTSetBrc is stored only in grpprls linked to piece table entries.
sprmTInsert (opcode 0x7621) inserts new cell definitions in an existing table's cell structure. Bytes 0 and 1 of the sprm contain the opcode. Byte 2 is the index within tap.rgdxaCenter and tap.rgtc at which the new dxaCenter and tc values will be inserted. Call this index itcInsert. Byte 3 contains a count of the cell definitions to be added to the tap, call it ctc. Bytes 4 and 5 contain the width of the cells that will be added, call it dxaCol. If there are already cells defined at the index where cells are to be inserted, tap.rgdxaCenter entries at or above this index must be moved to the entry ctc higher and must be adjusted by adding ctc*dxaCol to the value stored. The contents of tap.rgtc at or above the index must be moved 10*ctc bytes higher in tap.rgtc. If itcInsert is greater than the original tap.itcMac, itcInsert - tap.ctc columns beginning with index tap.itcMac must be added of width dxaCol (loop from itcMac to itcMac+itcInsert-tap.ctc adding dxaCol to the rgdxaCenter value of the previous entry and storing sum as dxaCenter of new entry), whose TC entries are cleared to zeros. Beginning with index itcInsert, ctc columns of width dxaCol must be added by constructing new tap.rgdxaCenter and tap.rgtc entries with the newly defined rgtc entries cleared to zeros. Finally, the number of cells that were added to the tap is added to tap.itcMac. sprmTInsert is stored only in grpprls linked to piece table entries.
sprmTDelete (opcode 0x5622) deletes cell definitions from an existing table's cell structure. Bytes 0 and 1of the sprm contain the opcode. Byte 2 contains the index of the first cell to delete, call it itcFirst. Byte 3 contains the index of the cell that follows the last cell to be deleted, call it itcLim. sprmTDelete causes any rgdxaCenter and rgtc entries whose index is greater than or equal to itcLim to be moved to the entry that is itcLim - itcFirst lower, and causes tap.itcMac to be decreased by the number of cells deleted. sprmTDelete is stored only in grpprls linked to piece table entries.
sprmTDxaCol (opcode 0x7623) changes the width of cells whose index is within a certain range to be a certain value. Bytes 0 and 1of the sprm contain the opcode. Byte 2 contains the index of the first cell whose width is to be changed, call it itcFirst. Byte 3 contains the index of the cell that follows the last cell whose width is to be changed, call it itcLim. Bytes 4 and 5 contain the new width of the cell, call it dxaCol. This sprm causes the itcLim - itcFirst entries of tap.rgdxaCenter to be adjusted so that tap.rgdxaCenter[i+1] = tap.rgdxaCenter[i] + dxaCol. Any tap.rgdxaCenter entries that exist beyond itcLim are adjusted to take into account the amount added to or removed from the previous columns.sprmTDxaCol is stored only in grpprls linked to piece table entries.
sprmTMerge (opcode 0x5624) merges the display areas of cells within a specified range. Bytes 0 and 1 of the sprm contain the opcode. Byte 2 contains the index of the first cell that is to be merged, call it itcFirst. Byte 3 contains the index of the cell that follows the last cell to be merged, call it itcLim. This sprm causes tap.rgtc[itcFirst].fFirstMerged to be set to 1. Cells in the range whose index is greater than itcFirst and less than itcLim have tap.rgtc[].fMerged set to 1. sprmTMerge is stored only in grpprls linked to piece table entries.
sprmTSplit (opcode 0x5625) splits the display areas of merged cells into their originally assigned display areas. Bytes 0 and 1 of the sprm contain the opcode. Byte 2 contains the index of the first cell that is to be split, call it itcFirst. Byte 3 contains the index of the cell that follows the last cell to be split, call it itcLim. This sprm clears tap.rgtc[].fFirstMerged and tap.rgtc[].fMerged for all rgtc entries >= itcFirst and < itcLim. sprmTSplit is stored only in grpprls linked to piece table entries.
SprmTSetBrc10 (opcode 0xD626) has the same format as SprmTSetBrc but uses the old BRC10 structure.
sprmTSetShd (opcode 0x7627) allows the shading definitions(SHDs) within a tap to be set to new values. Bytes 0 and 1 of the sprm contain the opcode. Byte 2 contains the index of the first cell whose shading is to be changed, call it itcFirst. Byte 3 contains the index of the cell that follows the last cell whose shading is to be changed, call it itcLim. Bytes 4 and 5 contain the SHD structure, call it shd. This sprm causes the itcLim - itcFirst entries of tap.rgshd to be set to shd. sprmTSetShd is stored only in grpprls linked to piece table entries.
sprmTSetShdOdd (opcode 0x7628) is identical to sprmTSetShd, but it only changes the rgshd for odd indices between itcFirst and. sprmTSetShdOdd is stored only in grpprls linked to piece table entries.
sprmTVertMerge (opcode 0xD62B) changes the vertical cell merge properties for a cell in the tap.rgtc[]. Bytes 0 and 1 of the sprm contain the opcode. Byte 2 contains the index of the cell whose vertical cell merge properties are to be changed. Byte 3 codes the new vertical cell merge properties for the cell, a 0 clears both fVertMerge and fVertRestart, a 1 sets fVertMerge and clears fVertRestart, and a 3 sets both flags. sprmTVertMerge is stored only in grpprls linked to piece table entries.
sprmTVertAlign (opcode 0xD62C) changes the vertical alignment property in the tap.rgtc[]. Bytes 0 and 1 of the sprm contain the opcode. Byte 2 contains the index of the first cell whose shading is to be changed, call it itcFirst. Byte 3 contains the index of the cell that follows the last cell whose shading is to be changed, call it itcLim. This sprm causes the vertAlign properties of the itcLim - itcFirst entries of tap.rgtc[] to be set to the new vertical alignment property contained in Byte 4. sprmTVertAlign is stored only in grpprls linked to piece table entries.
© 1998 Microsoft Corporation. All rights reserved. Terms of use