diff options
author | Sergey Vladimirov <sergey@apache.org> | 2011-07-16 11:57:40 +0000 |
---|---|---|
committer | Sergey Vladimirov <sergey@apache.org> | 2011-07-16 11:57:40 +0000 |
commit | 8c47dbb434fc4038cfcf76a94e0bd431b202d5a9 (patch) | |
tree | f865f0ee1d4b54941b39d098feed245072cfcd96 /src/types | |
parent | e35653cd1ad0b742a33ff38aaca099fef80fe050 (diff) | |
download | poi-8c47dbb434fc4038cfcf76a94e0bd431b202d5a9.tar.gz poi-8c47dbb434fc4038cfcf76a94e0bd431b202d5a9.zip |
update CHP definition
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1147411 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/types')
-rw-r--r-- | src/types/definitions/chp_type.xml | 444 | ||||
-rw-r--r-- | src/types/definitions/hresi_type.xml | 42 | ||||
-rw-r--r-- | src/types/styles/hdftype.xsl | 48 |
3 files changed, 417 insertions, 117 deletions
diff --git a/src/types/definitions/chp_type.xml b/src/types/definitions/chp_type.xml index f9529f48be..36751c9094 100644 --- a/src/types/definitions/chp_type.xml +++ b/src/types/definitions/chp_type.xml @@ -1,21 +1,21 @@ <?xml version="1.0"?> <!-- - ==================================================================== - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ==================================================================== + ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== --> <record id="0x101B" name="CHP" package="org.apache.poi.hwpf.model.types"> <suffix>AbstractType</suffix> @@ -23,91 +23,331 @@ <description>Character Properties.</description> <author>S. Ryan Ackley</author> <fields> - <field type="int" size="2" name="format_flags"> - <bit number="0" mask="0x0001" name="fBold"/> - <bit number="1" mask="0x0002" name="fItalic"/> - <bit number="2" mask="0x0004" name="fRMarkDel"/> - <bit number="3" mask="0x0008" name="fOutline"/> - <bit number="4" mask="0x0010" name="fFldVanish"/> - <bit number="5" mask="0x0020" name="fSmallCaps"/> - <bit number="6" mask="0x0040" name="fCaps"/> - <bit number="7" mask="0x0080" name="fVanish"/> - <bit number="8" mask="0x0100" name="fRMark"/> - <bit number="9" mask="0x0200" name="fSpec"/> - <bit number="10" mask="0x0400" name="fStrike"/> - <bit number="11" mask="0x0800" name="fObj"/> - <bit number="12" mask="0x1000" name="fShadow"/> - <bit number="13" mask="0x2000" name="fLowerCase"/> - <bit number="14" mask="0x4000" name="fData"/> - <bit number="15" mask="0x8000" name="fOle2"/> - </field> - <field type="int" size="2" name="format_flags1"> - <bit number="0" mask="0x0001" name="fEmboss"/> - <bit number="1" mask="0x0002" name="fImprint"/> - <bit number="2" mask="0x0004" name="fDStrike"/> - <bit number="3" mask="0x0008" name="fUsePgsuSettings"/> - </field> - <field type="int" size="2" name="ftcAscii"/> - <field type="int" size="2" name="ftcFE"/> - <field type="int" size="2" name="ftcOther"/> - <field type="int" size="2" name="hps"/> - <field type="int" size="4" name="dxaSpace"/> - <field type="byte" size="1" name="iss"/> - <field type="byte" size="1" name="kul"/> - <field type="byte" size="1" name="ico"/> - <field type="int" size="2" name="hpsPos"/> - <field type="int" size="2" name="lidDefault"/> - <field type="int" size="2" name="lidFE"/> - <field type="byte" size="1" name="idctHint"/> - <field type="int" size="2" name="wCharScale"/> - <field type="int" size="4" name="fcPic"/> - <field type="int" size="4" name="fcObj"/> - <field type="int" size="4" name="lTagObj"/> - <field type="int" size="2" name="ibstRMark"/> - <field type="int" size="2" name="ibstRMarkDel"/> - <field type="DateAndTime" size="4" name="dttmRMark"/> - <field type="DateAndTime" size="4" name="dttmRMarkDel"/> - <field type="int" size="2" name="istd"/> - <field type="int" size="2" name="baseIstd"/> - <field type="int" size="2" name="ftcSym"/> - <field type="int" size="2" name="xchSym"/> - <field type="int" size="2" name="idslRMReason"/> - <field type="int" size="2" name="idslReasonDel"/> - <field type="byte" size="1" name="ysr"/> - <field type="byte" size="1" name="chYsr"/> - <field type="int" size="2" name="hpsKern"/> - <field type="short" size="2" name="Highlight"> - <bit number="0" mask="0x001f" name="icoHighlight" description="Highlight color (see chp.ico)"/> - <bit number="1" mask="0x0020" name="fHighlight" description="When 1, characters are highlighted with color specified by chp.icoHighlight"/> - <bit number="2" mask="0x0040" name="fNavHighlight" description="Used internally by Word"/> - </field> - <field type="short" size="2" name="InternalFlags"> - <bit number="0" mask="0x000f" name="iatrUndetType" description="Used internally by Word"/> - <bit number="1" mask="0x0010" name="fUlGap" description="Used internally by Word 8"/> - <bit number="2" mask="0x0800" name="fScriptAnchor" description="Used internally by Word"/> - <bit number="3" mask="0x1000" name="fFixedObj" description="Used internally by Word"/> - <bit number="4" mask="0x2000" name="spare2" description="Not used"/> - </field> - <field type="short" size="2" name="EncodingFlags"> - <bit number="0" mask="0x0001" name="fChsDiff" description="Pre-Unicode files, char's char set different from FIB char set"/> - <bit number="1" mask="0x0002" name="fMacChs" description="fTrue if char's are Macintosh char set"/> - <bit number="2" mask="0x0004" name="fFtcAsciSym" description="Used internally by Word"/> - <bit number="3" mask="0x0008" name="fFtcReq" description="Used internally by Word"/> - <bit number="4" mask="0x0010" name="fLangApplied" description="Used internally by Word"/> - <bit number="5" mask="0x0020" name="fSpareLangApplied" description="Used internally by Word"/> - <bit number="6" mask="0x0040" name="fForcedCvAuto" description="Used internally by Word"/> - </field> - <!-- Not documented, but referenced by sprmCChs --> - <field type="short" size="2" name="chse" description="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"/> - <field type="short" size="2" name="fPropMark"/> - <field type="int" size="2" name="ibstPropRMark"/> - <field type="DateAndTime" size="4" name="dttmPropRMark"/> - <field type="byte" size="1" name="sfxtText"/> - <field type="byte" size="1" name="fDispFldRMark"/> - <field type="int" size="2" name="ibstDispFldRMark"/> - <field type="DateAndTime" size="4" name="dttmDispFldRMark"/> - <field type="byte[]" size="32" name="xstDispFldRMark"/> - <field type="ShadingDescriptor" size="2" name="shd"/> - <field type="BorderCode" size="4" name="brc"/> + <!-- Microsoft Office Word 97-2007 Binary File Format (.doc) Specification --> + <!-- Page 102 of 210 --> + <field type="int" size="4" name="grpfChp" description="Collection of the 32 flags"> + <bit number="00" mask="0x00000001" name="fBold" description="Text is bold"/> + <bit number="01" mask="0x00000002" name="fItalic" description="Italic"/> + <bit number="02" mask="0x00000004" name="fRMarkDel" + description="has been deleted and will be displayed with strikethrough when revision marked text is to be displayed"/> + <bit number="03" mask="0x00000008" name="fOutline" description="Outlined"/> + <bit number="04" mask="0x00000010" name="fFldVanish" description="Used internally by Word"/> + <bit number="05" mask="0x00000020" name="fSmallCaps" description="Displayed with small caps"/> + <bit number="06" mask="0x00000040" name="fCaps" description="Displayed with caps"/> + <bit number="07" mask="0x00000080" name="fVanish" + description="text has ―hidden‖ format, and is not displayed unless fPagHidden is set in the DOP"/> + <bit number="08" mask="0x00000100" name="fRMark" + description="text is newly typed since the last time revision marks have been accepted and will be displayed with an underline when revision marked text is to be displayed"/> + <bit number="09" mask="0x00000200" name="fSpec" description="Character is a Word special character"/> + <bit number="10" mask="0x00000400" name="fStrike" description="Displayed with strikethrough"/> + <bit number="11" mask="0x00000800" name="fObj" description="Embedded objec"/> + <bit number="12" mask="0x00001000" name="fShadow" description="Character is drawn with a shadow"/> + <bit number="13" mask="0x00002000" name="fLowerCase" + description="Character is displayed in lower case. This field may be set to 1 only when chp.fSmallCaps is 1."/> + <bit number="14" mask="0x00004000" name="fData" + description="chp.fcPic points to an FFDATA, the data structure binary data used by Word to describe a form field. The bit chp.fData may only be 1 when chp.fSpec is also 1 and the special character in the document stream that has this property is a chPicture (0x01)"/> + <bit number="15" mask="0x00008000" name="fOle2" + description="chp.lTagObj specifies a particular object in the object stream that specifies the particular OLE object in the stream that should be displayed when the chPicture fSpec character that is tagged with the fOle2 is encountered. The bit chp.fOle2 may only be 1 when chp.fSpec is also 1 and the special character in the document stream that has this property is a chPicture (0x01)."/> + <bit number="16" mask="0x00010000" name="fEmboss" description="Text is embossed"/> + <bit number="17" mask="0x00020000" name="fImprint" description="Text is engraved"/> + <bit number="18" mask="0x00040000" name="fDStrike" description="Displayed with double strikethrough"/> + <bit number="19" mask="0x00080000" name="fUsePgsuSettings" description="Used internally by Word"/> + <bit number="20" mask="0x00100000" name="fBoldBi" description="Complex Scripts text is bold"/> + + + <!-- Microsoft Office Word 97-2007 Binary File Format (.doc) Specification --> + <!-- Page 103 of 210 --> + <bit number="21" mask="0x00200000" name="fComplexScripts" + description="Complex Scripts text that requires special processing to display and process"/> + <bit number="22" mask="0x00400000" name="fItalicBi" description="Complex Scripts text is italics"/> + <bit number="23" mask="0x00800000" name="fBiDi" + description="Complex Scripts right-to-left text that requires special processing to display and process (character reordering; contextual shaping; display of combining characters and diacritics; specialized justification rules; cursor positioning)"/> + <!-- fIcoBi --> + <!-- fNonGlyph --> + <!-- fBoldOther --> + <!-- fItalicOther --> + <!-- fNoProof --> + <!-- fWebHidden --> + <!-- fFitText --> + <!-- fCalc --> + </field> + <field type="int" size="2" name="hps" default="20" description="Font size in half points"/> + <field type="int" size="2" name="ftcAscii" description="Font for ASCII text"/> + <field type="int" size="2" name="ftcFE" description="Font for East Asian text"/> + <field type="int" size="2" name="ftcOther" description="Font for non-East Asian text"/> + <field type="int" size="2" name="ftcBi" description="Font for Complex Scripts text"/> + <!-- rgftc[iftcCompositeMax] --> + <field type="int" size="4" name="dxaSpace" + description="Space following each character in the run expressed in twip units."/> + <!-- cv --> + + <!-- Microsoft Office Word 97-2007 Binary File Format (.doc) Specification --> + <!-- Page 104 of 210 --> + <field type="byte" size="1" name="ico" description="Color of text for Word 97"/> + <field type="int" size="2" name="pctCharWidth" description="Character scale"/> + <!-- Lid --> + <!-- rglid[clidChpMax] --> + <field type="int" size="2" name="lidDefault" default="0x0400"/> + <field type="int" size="2" name="lidFE" default="0x0400"/> + <!-- lidBi --> + <field type="byte" size="1" name="kcd" description="Emphasis mark"> + <const type="byte" value="0" name="NON"/> + <const type="byte" value="1" name="DOT"/> + <const type="byte" value="2" name="COMMA"/> + <const type="byte" value="3" name="CIRCLE"/> + <const type="byte" value="4" name="UNDER_DOT"/> + </field> + <field type="boolean" size="1" name="fUndetermine" description="Character is undetermined"/> + <field type="byte" size="1" name="iss" description="Superscript/subscript indices"> + <const type="byte" value="0" name="NONE"/> + <const type="byte" value="1" name="SUPERSCRIPTED"/> + <const type="byte" value="2" name="SUBSCRIPTED"/> + </field> + <field type="boolean" size="1" name="fSpecSymbol" description="Used by Word internally"/> + <field type="byte" size="1" name="idct" description="Not stored in file"/> + <field type="byte" size="1" name="idctHint" description="Identifier of Character type"/> + + <!-- Microsoft Office Word 97-2007 Binary File Format (.doc) Specification --> + <!-- Page 105 of 210 --> + <field type="byte" size="1" name="kul" description="Underline code"> + <const type="byte" value="0" name="NONE"/> + <const type="byte" value="1" name="SINGLE"/> + <const type="byte" value="2" name="BY_WORD"/> + <const type="byte" value="3" name="DOUBLE"/> + <const type="byte" value="4" name="DOTTED"/> + <const type="byte" value="5" name="HIDDEN"/> + <const type="byte" value="6" name="THICK"/> + <const type="byte" value="7" name="DASH"/> + <const type="byte" value="8" name="DOT"/> + <const type="byte" value="9" name="DOT_DASH"/> + <const type="byte" value="10" name="DOT_DOT_DASH"/> + <const type="byte" value="11" name="WAVE"/> + <const type="byte" value="20" name="DOTTED_HEAVY"/> + <const type="byte" value="23" name="DASHED_HEAVY"/> + <const type="byte" value="25" name="DOT_DASH_HEAVY"/> + <const type="byte" value="26" name="DOT_DOT_DASH_HEAVY"/> + <const type="byte" value="27" name="WAVE_HEAVY"/> + <const type="byte" value="39" name="DASH_LONG"/> + <const type="byte" value="43" name="WAVE_DOUBLE"/> + <const type="byte" value="55" name="DASH_LONG_HEAVY"/> + </field> + + <field type="Hyphenation" size="2" name="hresi" /> + + <field type="int" size="2" name="hpsKern" + description="Kerning distance for characters in run recorded in half points"/> + <field type="short" size="2" name="hpsPos" + description="Reserved (actually used as vertical offset(?) value)"/> + + <!-- cvUl --> + + <field type="ShadingDescriptor" size="2" name="shd" description="Shading"/> + <field type="BorderCode" size="4" name="brc" description="Border"/> + + <field type="int" size="2" name="ibstRMark" + description="Index to author IDs stored in hsttbfRMark. Used when text in run was newly typed when revision marking was enabled"/> + + <field type="byte" size="1" name="sfxtText" description="Text animation"> + <const type="byte" value="0" name="NO"/> + <const type="byte" value="1" name="LAS_VEGAS_LIGHTS"/> + <const type="byte" value="2" name="BACKGROUND_BLINK"/> + <const type="byte" value="3" name="SPARKLE_TEXT"/> + <const type="byte" value="4" name="MARCHING_ANTS"/> + <const type="byte" value="5" name="MARCHING_RED_ANTS"/> + <const type="byte" value="6" name="SHIMMER"/> + </field> + <field type="boolean" size="1" name="fDblBdr" description="Used internally by Word"/> + <field type="boolean" size="1" name="fBorderWS" description="Used internally by Word"/> + + <!-- Microsoft Office Word 97-2007 Binary File Format (.doc) Specification --> + <!-- Page 106 of 210 --> + <field type="short" size="2" name="ufel" + description="Collection properties represented by itypFELayout and copt (East Asian layout properties)"> + <bit number="0" mask="0x00ff" name="itypFELayout"/> + <bit number="1" mask="0x0100" name="fTNY" + description="Tatenakayoko: Horizontal–in-vertical (range of text in a direction perpendicular to the text flow) is used"/> + <bit number="2" mask="0x0200" name="fWarichu" + description="Two lines in one (text in the group is displayed as two half-height lines within a line)"/> + <bit number="3" mask="0x0400" name="fKumimoji" description="combine characters"/> + <bit number="4" mask="0x0800" name="fRuby" description="Phonetic guide"/> + <bit number="5" mask="0x1000" name="fLSFitText" description="fit text"/> + <bit number="5" mask="0xe000" name="spare" description="Unused"/> + </field> + + <field type="byte" size="1" name="copt" description="Collection of the 5 flags"> + <bit number="0" mask="0x07" name="iWarichuBracket" description="Bracket character for two-lines-in-one"/> + <bit number="1" mask="0x08" name="fWarichuNoOpenBracket" description="Two-lines-in-one uses no open"/> + <bit number="2" mask="0x10" name="fTNYCompress" description="fit text in line"/> + <bit number="4" mask="0x20" name="fTNYFetchTxm" description="fetch text metrics"/> + <bit number="5" mask="0x40" name="fCellFitText" description="Fit text in cell"/> + <bit number="6" mask="0x80" name="unused" description="Not used"/> + </field> + + <field type="int" size="2" name="hpsAsci" description="Font size for ASCII font"/> + <field type="int" size="2" name="hpsFE" description="Font size for East Asian text"/> + <field type="int" size="2" name="hpsBi" description="Font size for Complex Scripts text"/> + <!-- rghps[ihpsMax] --> + + <field type="int" size="2" name="ftcSym" + description="an index into the rgffn structure. When chp.fSpec is 1 and the character recorded for the run in the document stream is chSymbol (0x28), chp.ftcSym identifies the font code of the symbol font that will be used to display the symbol character recorded in chp.xchSym."/> + <field type="int" size="2" name="xchSym" + description="When chp.fSpec==1 and the character recorded for the run in the document stream is chSymbol (0x28), the character stored chp.xchSym will be displayed using the font specified in chp.ftcSym."/> + + <!-- Microsoft Office Word 97-2007 Binary File Format (.doc) Specification --> + <!-- Page 107 of 210 --> + + <!-- fNumRunBi --> + <!-- fSysVanish --> + <!-- fDiacRunBi --> + <!-- fBoldPresent --> + <!-- fItalicPresent --> + + <field type="int" size="4" name="fcPic" default="-1" + description="Offset in data stream pointing to beginning of a picture when character is a picture character (character is 0x01 and chp.fSpec is 1)."/> + <field type="int" size="4" name="fcObj" + description="Offset in data stream pointing to beginning of a picture when character is an OLE1 object character (character is 0x20 and chp.fSpec is 1, chp.fOle2 is 0)."/> + <field type="int" size="4" name="lTagObj" + description="An object ID for an OLE object, only set if chp.fSpec and chp.fOle2 are both true, and chp.fObj."/> + <field type="int" size="4" name="fcData" + description="Points to location of picture data, only if chp.fSpec is true."/> + + <!-- hsp --> + <!-- docPic --> + <!-- dummy --> + <!-- fDirty --> + + <field type="Hyphenation" size="2" name="hresiOld" /> + + <!-- dummy3 --> + + <!-- dxpKashida --> + <!-- dxpSpace --> + + <field type="int" size="2" name="ibstRMarkDel" + description="Index to author IDs stored in hsttbfRMark. Used when text in run was deleted when revision marking was enabled."/> + + <!-- Microsoft Office Word 97-2007 Binary File Format (.doc) Specification --> + <!-- Page 108 of 210 --> + + <field type="DateAndTime" size="4" name="dttmRMark" + description="Date/time at which this run of text was entered/modified by the author (Only recorded when revision marking is on.)"/> + <field type="DateAndTime" size="4" name="dttmRMarkDel" + description="Date/time at which this run of text was deleted by the author (Only recorded when revision marking is on.)"/> + + <!-- cHpsInc --> + + <field type="int" size="2" name="istd" default="10" + description="Index to character style descriptor in the stylesheet that tags this run of text. When istd is istdNormalChar (10 decimal), characters in run are not affected by a character style. If chp.istd contains any other value, chpx of the specified character style are applied to CHP for this run before any other exceptional properties are applied."/> + + <field type="int" size="2" name="idslRMReason" + description="An index to strings displayed as reasons for actions taken by Word‘s AutoFormat code"/> + <field type="int" size="2" name="idslReasonDel" + description="An index to strings displayed as reasons for actions taken by Word‘s AutoFormat code"/> + + <field type="int" size="2" name="cpg" description="Code page of run in pre-Unicode files"/> + + <!-- iatrUndetType --> + <!-- fUlGap --> + + <field type="short" size="2" name="Highlight"> + <bit number="0" mask="0x001f" name="icoHighlight" description="Highlight color (see chp.ico)"/> + <bit number="1" mask="0x0020" name="fHighlight" + description="When 1, characters are highlighted with color specified by chp.icoHighlight"/> + <!-- fNavHighlight --> + </field> + + <field type="short" size="2" name="CharsetFlags"> + <bit number="0" mask="0x0001" name="fChsDiff" + description="Pre-Unicode files, char's char set different from FIB char set"/> + <bit number="1" mask="0x0020" name="fMacChs" description="fTrue if char's are Macintosh char set"/> + <!-- fFtcAsciSym --> + <!-- fFtcReq --> + <!-- fLangApplied --> + <!-- fSpareLangApplied --> + <!-- fForcedCvAuto --> + </field> + <!-- Undocumented, but referenced --> + <field type="short" size="2" name="chse"/> + + <field type="boolean" size="2" name="fPropRMark" + description="properties have been changed with revision marking on"/> + <field type="int" size="2" name="ibstPropRMark" + description="Index to author IDs stored in hsttbfRMark. Used when properties have been changed when revision marking was enabled."/> + <field type="DateAndTime" size="4" name="dttmPropRMark" + description="Date/time at which properties of this were changed for this run of text by the author. (Only recorded when revision marking is on.)"/> + <!-- fAnmPropRMark --> + + <!-- Microsoft Office Word 97-2007 Binary File Format (.doc) Specification --> + <!-- Page 109 of 210 --> + + <field type="boolean" size="1" name="fConflictOrig" + description="When chp.wConflict!=0, this is TRUE when text is part of the original version of text. When FALSE, text is alternative introduced by reconciliation operation."/> + <field type="boolean" size="1" name="fConflictOtherDel" + description="When fConflictOtherDel==fTrue, the other side of a reconciliation conflict causes this text to be deleted"/> + <field type="int" size="2" name="wConflict" + description="When != 0, index number that identifies all text participating in a particular conflict incident"/> + <field type="int" size="2" name="IbstConflict" description="Who made this change for this side of the conflict."/> + <field type="DateAndTime" size="4" name="dttmConflict" description="When the change was made"/> + <field type="boolean" size="1" name="fDispFldRMark" + description="the number for a ListNum field is being tracked in xstDispFldRMark. If that number is different from the current value, the number has changed. Only valid for ListNum fields."/> + <field type="int" size="2" name="ibstDispFldRMark" + description="Index to author IDs stored in hsttbfRMark. Used when ListNum field numbering has been changed when revision marking was enabled."/> + <field type="DateAndTime" size="4" name="dttmDispFldRMark" description="The date for the ListNum field number change"/> + <field type="byte[]" size="32" name="xstDispFldRMark" + description="The string value of the ListNum field when revision mark tracking began"/> + + <!-- dxtSpaceExtra --> + + <field type="int" size="4" name="fcObjp" + description="Offset in the data stream indicating the location of OLE object data"/> + + <!-- dxaFitText --> + <!-- lFitTextID --> + <field type="byte" size="1" name="lbrCRJ" description="Line BReak code for xchCRJ"> + <const type="byte" value="0" name="NONE"/> + <const type="byte" value="1" name="LEFT"/> + <const type="byte" value="2" name="RIGHT"/> + <const type="byte" value="3" name="BOTH"/> + </field> + + <!-- iuhi --> + <!-- bTransNoProof0 --> + <!-- bTransNoProof1 --> + <!-- rsidProp --> + <!-- rsidText --> + <!-- rsidRMDel --> + + <!-- Microsoft Office Word 97-2007 Binary File Format (.doc) Specification --> + <!-- Page 110 of 210 --> + + <field type="boolean" size="1" name="fSpecVanish" + description="Special hidden for leading emphasis (always hidden)"/> + <field type="boolean" size="1" name="fHasOldProps" + description="Used for character property revision marking. The chp at the time fHasOldProps is set to 1, the is the old chp."/> + + <!-- pbi --> + <!-- hplcnf --> + <!-- ffm --> + + <field type="boolean" size="1" name="fSdtVanish" description="Mark the character as hidden."/> + + <!-- Referenced by "The standard CHP is all zeros except" --> + <field type="int" size="2" name="wCharScale" default="100"/> + + <!-- From old version of description --> + + <!-- <field type="short" size="2" name="InternalFlags"> --> + <!-- <bit number="0" mask="0x000f" name="iatrUndetType" description="Used internally by Word"/> --> + <!-- <bit number="1" mask="0x0010" name="fUlGap" description="Used internally by Word 8"/> --> + <!-- <bit number="2" mask="0x0800" name="fScriptAnchor" description="Used internally by Word"/> --> + <!-- <bit number="3" mask="0x1000" name="fFixedObj" description="Used internally by Word"/> --> + <!-- <bit number="4" mask="0x2000" name="spare2" description="Not used"/> --> + <!-- </field> --> + <!-- Not documented, but referenced by sprmCChs --> + <!-- description="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"/> --> + <!-- <field type="byte" size="1" name="idctHint"/> --> + <!-- <field type="int" size="2" name="baseIstd"/> --> + <!-- <field type="int" size="2" name="xchSym"/> --> </fields> </record> diff --git a/src/types/definitions/hresi_type.xml b/src/types/definitions/hresi_type.xml new file mode 100644 index 0000000000..aef96bdf67 --- /dev/null +++ b/src/types/definitions/hresi_type.xml @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<!-- + ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==================================================================== +--> +<record fromfile="true" name="HRESI" package="org.apache.poi.hwpf.model.types"> + <suffix>AbstractType</suffix> + <description>Hyphenation (HRESI). <p>Class and fields descriptions are + quoted from + Microsoft Office Word 97-2007 Binary File Format (.doc) Specification + </description> + <author>Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format (.doc) + Specification + </author> + <fields> + <field type="byte" size="1" name="hres" description="Hyphenation rule"> + <const type="byte" value="0" name="NO"/> + <const type="byte" value="1" name="NORMAL"/> + <const type="byte" value="2" name="ADD_LETTER_BEFORE"/> + <const type="byte" value="3" name="CHANGE_LETTER_BEFORE"/> + <const type="byte" value="4" name="DELETE_LETTER_BEFORE"/> + <const type="byte" value="5" name="CHANGE_LETTER_AFTER"/> + <const type="byte" value="6" name="DELETE_BEFORE_CHANGE_BEFORE"/> + </field> + <field type="byte" size="1" name="chHres" + description="The character that will be used to add or change a letter when hres is 2, 3, 5 or 6"/> + </fields> +</record> diff --git a/src/types/styles/hdftype.xsl b/src/types/styles/hdftype.xsl index ec550650ef..5a235e6234 100644 --- a/src/types/styles/hdftype.xsl +++ b/src/types/styles/hdftype.xsl @@ -115,23 +115,41 @@ public abstract class </xsl:text><xsl:value-of select="@name"/><xsl:text>Abstrac <xsl:call-template name="linebreak"/> <xsl:call-template name="linebreak"/> - <xsl:if test='/@fromfile="true"'> - protected void fillFields(byte[] data, int offset) - { + <xsl:if test='/*/@fromfile="true"'> + <xsl:call-template name="indent"/> +<xsl:text>protected void fillFields( byte[] data, int offset ) + { +</xsl:text> <xsl:variable name="fieldIterator" select="field:new()"/> -<xsl:for-each select="//fields/field"> -<xsl:text> </xsl:text><xsl:value-of select="recutil:getFieldName(position(),@name,30)"/> = <xsl:value-of select="field:fillDecoder($fieldIterator,@size,@type)"/>; -</xsl:for-each> - } + <xsl:for-each select="//fields/field"> + <xsl:call-template name="indent"/> + <xsl:call-template name="indent"/> + <xsl:value-of select="recutil:getFieldName(position(),@name,30)"/> + <xsl:text> = </xsl:text> + <xsl:value-of select="field:fillDecoder($fieldIterator,@size,@type)"/> + <xsl:text>; +</xsl:text> + </xsl:for-each> + <xsl:call-template name="indent"/> + <xsl:text>}</xsl:text> + <xsl:call-template name="linebreak"/> - public void serialize(byte[] data, int offset) + <xsl:call-template name="linebreak"/> + + <xsl:call-template name="indent"/> + <xsl:text>public void serialize( byte[] data, int offset ) { +</xsl:text> <xsl:variable name="fieldIterator" select="field:new()"/> -<xsl:for-each select="//fields/field"> -<xsl:text> </xsl:text><xsl:value-of select="field:serialiseEncoder($fieldIterator,position(),@name,@size,@type)"/>; -</xsl:for-each> - } - + <xsl:for-each select="//fields/field"> + <xsl:call-template name="indent"/> + <xsl:call-template name="indent"/> + <xsl:value-of select="field:serialiseEncoder($fieldIterator,position(),@name,@size,@type)"/> + <xsl:call-template name="linebreak"/> + </xsl:for-each> + <xsl:call-template name="indent"/> + <xsl:text>}</xsl:text> + <xsl:call-template name="linebreak"/> /** * Size of record (exluding 4 byte header) */ @@ -182,7 +200,7 @@ public abstract class </xsl:text><xsl:value-of select="@name"/><xsl:text>Abstrac * Sets the <xsl:value-of select="@name"/> field value. * <xsl:value-of select="@description"/> */ - public void set<xsl:value-of select="recutil:getFieldName1stCap(@name,0)"/>(<xsl:value-of select="recutil:getBitFieldType(@name, @mask, ../@type)"/> value) + public void set<xsl:value-of select="recutil:getFieldName1stCap(@name,0)"/>( <xsl:value-of select="recutil:getBitFieldType(@name, @mask, ../@type)"/> value ) { <xsl:value-of select="recutil:getFieldName($fieldNum,../@name,0)"/> = <xsl:value-of select="recutil:getBitFieldSet(@name, @mask, ../@type, recutil:getFieldName($fieldNum,../@name,0))"/>; @@ -284,7 +302,7 @@ public abstract class </xsl:text><xsl:value-of select="@name"/><xsl:text>Abstrac * @param <xsl:value-of select="recutil:getFieldName(position(),@name,0)"/> * One of <xsl:apply-templates select="./const" mode="listconsts"/></xsl:if> */ - public void set<xsl:value-of select="recutil:getFieldName1stCap(@name,0)"/>(<xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of select="recutil:getFieldName(position(),@name,0)"/>) + public void set<xsl:value-of select="recutil:getFieldName1stCap(@name,0)"/>( <xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of select="recutil:getFieldName(position(),@name,0)"/> ) { this.<xsl:value-of select="recutil:getFieldName(position(),@name,0)"/> = <xsl:value-of select="recutil:getFieldName(position(),@name,0)"/>; } |