From 8c47dbb434fc4038cfcf76a94e0bd431b202d5a9 Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Sat, 16 Jul 2011 11:57:40 +0000 Subject: [PATCH] update CHP definition git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1147411 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hwpf/model/Hyphenation.java | 102 + .../poi/hwpf/model/types/CHPAbstractType.java | 2085 +++++++++++------ .../hwpf/model/types/HRESIAbstractType.java | 133 ++ .../hwpf/sprm/CharacterSprmCompressor.java | 4 +- .../hwpf/sprm/CharacterSprmUncompressor.java | 91 +- .../hwpf/usermodel/CharacterProperties.java | 16 +- .../poi/hwpf/usermodel/CharacterRun.java | 2 +- src/types/definitions/chp_type.xml | 444 +++- src/types/definitions/hresi_type.xml | 42 + src/types/styles/hdftype.xsl | 48 +- 10 files changed, 2087 insertions(+), 880 deletions(-) create mode 100644 src/scratchpad/src/org/apache/poi/hwpf/model/Hyphenation.java create mode 100644 src/scratchpad/src/org/apache/poi/hwpf/model/types/HRESIAbstractType.java create mode 100644 src/types/definitions/hresi_type.xml diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/Hyphenation.java b/src/scratchpad/src/org/apache/poi/hwpf/model/Hyphenation.java new file mode 100644 index 0000000000..d8be60b9dc --- /dev/null +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/Hyphenation.java @@ -0,0 +1,102 @@ +/* ==================================================================== + 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. +==================================================================== */ + +package org.apache.poi.hwpf.model; + +import org.apache.poi.hwpf.model.types.HRESIAbstractType; +import org.apache.poi.hwpf.usermodel.CharacterProperties; +import org.apache.poi.util.LittleEndian; + +/** + * Hyphenation. Substructure of the {@link CharacterProperties}. + * + * @author Sergey Vladimirov ( vlsergey {at} gmail {dot} com ) + */ +public final class Hyphenation extends HRESIAbstractType implements Cloneable +{ + public Hyphenation() + { + super(); + } + + public Hyphenation( short hres ) + { + byte[] data = new byte[2]; + LittleEndian.putShort( data, hres ); + fillFields( data, 0 ); + } + + public Hyphenation clone() + { + try + { + return (Hyphenation) super.clone(); + } + catch ( CloneNotSupportedException e ) + { + throw new RuntimeException( e ); + } + } + + @Override + public boolean equals( Object obj ) + { + if ( this == obj ) + return true; + if ( obj == null ) + return false; + if ( getClass() != obj.getClass() ) + return false; + Hyphenation other = (Hyphenation) obj; + if ( field_1_hres != other.field_1_hres ) + return false; + if ( field_2_chHres != other.field_2_chHres ) + return false; + return true; + } + + public short getValue() + { + byte[] data = new byte[2]; + serialize( data, 0 ); + return LittleEndian.getShort( data ); + } + + @Override + public int hashCode() + { + final int prime = 31; + int result = 1; + result = prime * result + field_1_hres; + result = prime * result + field_2_chHres; + return result; + } + + public boolean isEmpty() + { + return field_1_hres == 0 && field_2_chHres == 0; + } + + @Override + public String toString() + { + if ( isEmpty() ) + return "[HRESI] EMPTY"; + + return super.toString(); + } +} diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java index 700766e335..c74bdc8847 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java @@ -17,9 +17,7 @@ package org.apache.poi.hwpf.model.types; - - -import org.apache.poi.hdf.model.hdftypes.HDFType; +import org.apache.poi.hwpf.model.Hyphenation; import org.apache.poi.hwpf.usermodel.BorderCode; import org.apache.poi.hwpf.usermodel.DateAndTime; import org.apache.poi.hwpf.usermodel.ShadingDescriptor; @@ -33,1742 +31,2395 @@ import org.apache.poi.util.BitField; * @author S. Ryan Ackley */ public abstract class CHPAbstractType - implements HDFType { - protected int field_1_format_flags; - private static BitField fBold = new BitField(0x0001); - private static BitField fItalic = new BitField(0x0002); - private static BitField fRMarkDel = new BitField(0x0004); - private static BitField fOutline = new BitField(0x0008); - private static BitField fFldVanish = new BitField(0x0010); - private static BitField fSmallCaps = new BitField(0x0020); - private static BitField fCaps = new BitField(0x0040); - private static BitField fVanish = new BitField(0x0080); - private static BitField fRMark = new BitField(0x0100); - private static BitField fSpec = new BitField(0x0200); - private static BitField fStrike = new BitField(0x0400); - private static BitField fObj = new BitField(0x0800); - private static BitField fShadow = new BitField(0x1000); - private static BitField fLowerCase = new BitField(0x2000); - private static BitField fData = new BitField(0x4000); - private static BitField fOle2 = new BitField(0x8000); - protected int field_2_format_flags1; - private static BitField fEmboss = new BitField(0x0001); - private static BitField fImprint = new BitField(0x0002); - private static BitField fDStrike = new BitField(0x0004); - private static BitField fUsePgsuSettings = new BitField(0x0008); - protected int field_3_ftcAscii; - protected int field_4_ftcFE; - protected int field_5_ftcOther; - protected int field_6_hps; - protected int field_7_dxaSpace; - protected byte field_8_iss; - protected byte field_9_kul; - protected byte field_10_ico; - protected int field_11_hpsPos; - protected int field_12_lidDefault; - protected int field_13_lidFE; - protected byte field_14_idctHint; - protected int field_15_wCharScale; - protected int field_16_fcPic; - protected int field_17_fcObj; - protected int field_18_lTagObj; - protected int field_19_ibstRMark; - protected int field_20_ibstRMarkDel; - protected DateAndTime field_21_dttmRMark; - protected DateAndTime field_22_dttmRMarkDel; - protected int field_23_istd; - protected int field_24_baseIstd; - protected int field_25_ftcSym; - protected int field_26_xchSym; - protected int field_27_idslRMReason; - protected int field_28_idslReasonDel; - protected byte field_29_ysr; - protected byte field_30_chYsr; - protected int field_31_hpsKern; - protected short field_32_Highlight; + protected int field_1_grpfChp; + private static BitField fBold = new BitField(0x00000001); + private static BitField fItalic = new BitField(0x00000002); + private static BitField fRMarkDel = new BitField(0x00000004); + private static BitField fOutline = new BitField(0x00000008); + private static BitField fFldVanish = new BitField(0x00000010); + private static BitField fSmallCaps = new BitField(0x00000020); + private static BitField fCaps = new BitField(0x00000040); + private static BitField fVanish = new BitField(0x00000080); + private static BitField fRMark = new BitField(0x00000100); + private static BitField fSpec = new BitField(0x00000200); + private static BitField fStrike = new BitField(0x00000400); + private static BitField fObj = new BitField(0x00000800); + private static BitField fShadow = new BitField(0x00001000); + private static BitField fLowerCase = new BitField(0x00002000); + private static BitField fData = new BitField(0x00004000); + private static BitField fOle2 = new BitField(0x00008000); + private static BitField fEmboss = new BitField(0x00010000); + private static BitField fImprint = new BitField(0x00020000); + private static BitField fDStrike = new BitField(0x00040000); + private static BitField fUsePgsuSettings = new BitField(0x00080000); + private static BitField fBoldBi = new BitField(0x00100000); + private static BitField fComplexScripts = new BitField(0x00200000); + private static BitField fItalicBi = new BitField(0x00400000); + private static BitField fBiDi = new BitField(0x00800000); + protected int field_2_hps; + protected int field_3_ftcAscii; + protected int field_4_ftcFE; + protected int field_5_ftcOther; + protected int field_6_ftcBi; + protected int field_7_dxaSpace; + protected byte field_8_ico; + protected int field_9_pctCharWidth; + protected int field_10_lidDefault; + protected int field_11_lidFE; + protected byte field_12_kcd; + /**/public final static byte KCD_NON = 0; + /**/public final static byte KCD_DOT = 1; + /**/public final static byte KCD_COMMA = 2; + /**/public final static byte KCD_CIRCLE = 3; + /**/public final static byte KCD_UNDER_DOT = 4; + protected boolean field_13_fUndetermine; + protected byte field_14_iss; + /**/public final static byte ISS_NONE = 0; + /**/public final static byte ISS_SUPERSCRIPTED = 1; + /**/public final static byte ISS_SUBSCRIPTED = 2; + protected boolean field_15_fSpecSymbol; + protected byte field_16_idct; + protected byte field_17_idctHint; + protected byte field_18_kul; + /**/public final static byte KUL_NONE = 0; + /**/public final static byte KUL_SINGLE = 1; + /**/public final static byte KUL_BY_WORD = 2; + /**/public final static byte KUL_DOUBLE = 3; + /**/public final static byte KUL_DOTTED = 4; + /**/public final static byte KUL_HIDDEN = 5; + /**/public final static byte KUL_THICK = 6; + /**/public final static byte KUL_DASH = 7; + /**/public final static byte KUL_DOT = 8; + /**/public final static byte KUL_DOT_DASH = 9; + /**/public final static byte KUL_DOT_DOT_DASH = 10; + /**/public final static byte KUL_WAVE = 11; + /**/public final static byte KUL_DOTTED_HEAVY = 20; + /**/public final static byte KUL_DASHED_HEAVY = 23; + /**/public final static byte KUL_DOT_DASH_HEAVY = 25; + /**/public final static byte KUL_DOT_DOT_DASH_HEAVY = 26; + /**/public final static byte KUL_WAVE_HEAVY = 27; + /**/public final static byte KUL_DASH_LONG = 39; + /**/public final static byte KUL_WAVE_DOUBLE = 43; + /**/public final static byte KUL_DASH_LONG_HEAVY = 55; + protected Hyphenation field_19_hresi; + protected int field_20_hpsKern; + protected short field_21_hpsPos; + protected ShadingDescriptor field_22_shd; + protected BorderCode field_23_brc; + protected int field_24_ibstRMark; + protected byte field_25_sfxtText; + /**/public final static byte SFXTTEXT_NO = 0; + /**/public final static byte SFXTTEXT_LAS_VEGAS_LIGHTS = 1; + /**/public final static byte SFXTTEXT_BACKGROUND_BLINK = 2; + /**/public final static byte SFXTTEXT_SPARKLE_TEXT = 3; + /**/public final static byte SFXTTEXT_MARCHING_ANTS = 4; + /**/public final static byte SFXTTEXT_MARCHING_RED_ANTS = 5; + /**/public final static byte SFXTTEXT_SHIMMER = 6; + protected boolean field_26_fDblBdr; + protected boolean field_27_fBorderWS; + protected short field_28_ufel; + private static BitField itypFELayout = new BitField(0x00ff); + private static BitField fTNY = new BitField(0x0100); + private static BitField fWarichu = new BitField(0x0200); + private static BitField fKumimoji = new BitField(0x0400); + private static BitField fRuby = new BitField(0x0800); + private static BitField fLSFitText = new BitField(0x1000); + private static BitField spare = new BitField(0xe000); + protected byte field_29_copt; + private static BitField iWarichuBracket = new BitField(0x07); + private static BitField fWarichuNoOpenBracket = new BitField(0x08); + private static BitField fTNYCompress = new BitField(0x10); + private static BitField fTNYFetchTxm = new BitField(0x20); + private static BitField fCellFitText = new BitField(0x40); + private static BitField unused = new BitField(0x80); + protected int field_30_hpsAsci; + protected int field_31_hpsFE; + protected int field_32_hpsBi; + protected int field_33_ftcSym; + protected int field_34_xchSym; + protected int field_35_fcPic; + protected int field_36_fcObj; + protected int field_37_lTagObj; + protected int field_38_fcData; + protected Hyphenation field_39_hresiOld; + protected int field_40_ibstRMarkDel; + protected DateAndTime field_41_dttmRMark; + protected DateAndTime field_42_dttmRMarkDel; + protected int field_43_istd; + protected int field_44_idslRMReason; + protected int field_45_idslReasonDel; + protected int field_46_cpg; + protected short field_47_Highlight; private static BitField icoHighlight = new BitField(0x001f); private static BitField fHighlight = new BitField(0x0020); - private static BitField fNavHighlight = new BitField(0x0040); - protected short field_33_InternalFlags; - private static BitField iatrUndetType = new BitField(0x000f); - private static BitField fUlGap = new BitField(0x0010); - private static BitField fScriptAnchor = new BitField(0x0800); - private static BitField fFixedObj = new BitField(0x1000); - private static BitField spare2 = new BitField(0x2000); - protected short field_34_EncodingFlags; + protected short field_48_CharsetFlags; private static BitField fChsDiff = new BitField(0x0001); - private static BitField fMacChs = new BitField(0x0002); - private static BitField fFtcAsciSym = new BitField(0x0004); - private static BitField fFtcReq = new BitField(0x0008); - private static BitField fLangApplied = new BitField(0x0010); - private static BitField fSpareLangApplied = new BitField(0x0020); - private static BitField fForcedCvAuto = new BitField(0x0040); - protected short field_35_chse; - protected short field_36_fPropMark; - protected int field_37_ibstPropRMark; - protected DateAndTime field_38_dttmPropRMark; - protected byte field_39_sfxtText; - protected byte field_40_fDispFldRMark; - protected int field_41_ibstDispFldRMark; - protected DateAndTime field_42_dttmDispFldRMark; - protected byte[] field_43_xstDispFldRMark; - protected ShadingDescriptor field_44_shd; - protected BorderCode field_45_brc; - - - public CHPAbstractType() - { - + private static BitField fMacChs = new BitField(0x0020); + protected short field_49_chse; + protected boolean field_50_fPropRMark; + protected int field_51_ibstPropRMark; + protected DateAndTime field_52_dttmPropRMark; + protected boolean field_53_fConflictOrig; + protected boolean field_54_fConflictOtherDel; + protected int field_55_wConflict; + protected int field_56_IbstConflict; + protected DateAndTime field_57_dttmConflict; + protected boolean field_58_fDispFldRMark; + protected int field_59_ibstDispFldRMark; + protected DateAndTime field_60_dttmDispFldRMark; + protected byte[] field_61_xstDispFldRMark; + protected int field_62_fcObjp; + protected byte field_63_lbrCRJ; + /**/public final static byte LBRCRJ_NONE = 0; + /**/public final static byte LBRCRJ_LEFT = 1; + /**/public final static byte LBRCRJ_RIGHT = 2; + /**/public final static byte LBRCRJ_BOTH = 3; + protected boolean field_64_fSpecVanish; + protected boolean field_65_fHasOldProps; + protected boolean field_66_fSdtVanish; + protected int field_67_wCharScale; + + protected CHPAbstractType() + { + this.field_2_hps = 20; + this.field_10_lidDefault = 0x0400; + this.field_11_lidFE = 0x0400; + this.field_19_hresi = new Hyphenation(); + this.field_22_shd = new ShadingDescriptor(); + this.field_23_brc = new BorderCode(); + this.field_35_fcPic = -1; + this.field_39_hresiOld = new Hyphenation(); + this.field_41_dttmRMark = new DateAndTime(); + this.field_42_dttmRMarkDel = new DateAndTime(); + this.field_43_istd = 10; + this.field_52_dttmPropRMark = new DateAndTime(); + this.field_57_dttmConflict = new DateAndTime(); + this.field_60_dttmDispFldRMark = new DateAndTime(); + this.field_61_xstDispFldRMark = new byte[0]; + this.field_67_wCharScale = 100; } public String toString() { - StringBuffer buffer = new StringBuffer(); - - buffer.append("[CHP]\n"); - - buffer.append(" .format_flags = "); - buffer.append(" (").append(getFormat_flags()).append(" )\n"); - buffer.append(" .fBold = ").append(isFBold()).append('\n'); - buffer.append(" .fItalic = ").append(isFItalic()).append('\n'); - buffer.append(" .fRMarkDel = ").append(isFRMarkDel()).append('\n'); - buffer.append(" .fOutline = ").append(isFOutline()).append('\n'); - buffer.append(" .fFldVanish = ").append(isFFldVanish()).append('\n'); - buffer.append(" .fSmallCaps = ").append(isFSmallCaps()).append('\n'); - buffer.append(" .fCaps = ").append(isFCaps()).append('\n'); - buffer.append(" .fVanish = ").append(isFVanish()).append('\n'); - buffer.append(" .fRMark = ").append(isFRMark()).append('\n'); - buffer.append(" .fSpec = ").append(isFSpec()).append('\n'); - buffer.append(" .fStrike = ").append(isFStrike()).append('\n'); - buffer.append(" .fObj = ").append(isFObj()).append('\n'); - buffer.append(" .fShadow = ").append(isFShadow()).append('\n'); - buffer.append(" .fLowerCase = ").append(isFLowerCase()).append('\n'); - buffer.append(" .fData = ").append(isFData()).append('\n'); - buffer.append(" .fOle2 = ").append(isFOle2()).append('\n'); - - buffer.append(" .format_flags1 = "); - buffer.append(" (").append(getFormat_flags1()).append(" )\n"); - buffer.append(" .fEmboss = ").append(isFEmboss()).append('\n'); - buffer.append(" .fImprint = ").append(isFImprint()).append('\n'); - buffer.append(" .fDStrike = ").append(isFDStrike()).append('\n'); - buffer.append(" .fUsePgsuSettings = ").append(isFUsePgsuSettings()).append('\n'); - - buffer.append(" .ftcAscii = "); - buffer.append(" (").append(getFtcAscii()).append(" )\n"); - - buffer.append(" .ftcFE = "); - buffer.append(" (").append(getFtcFE()).append(" )\n"); - - buffer.append(" .ftcOther = "); - buffer.append(" (").append(getFtcOther()).append(" )\n"); - - buffer.append(" .hps = "); - buffer.append(" (").append(getHps()).append(" )\n"); - - buffer.append(" .dxaSpace = "); - buffer.append(" (").append(getDxaSpace()).append(" )\n"); - - buffer.append(" .iss = "); - buffer.append(" (").append(getIss()).append(" )\n"); - - buffer.append(" .kul = "); - buffer.append(" (").append(getKul()).append(" )\n"); - - buffer.append(" .ico = "); - buffer.append(" (").append(getIco()).append(" )\n"); - - buffer.append(" .hpsPos = "); - buffer.append(" (").append(getHpsPos()).append(" )\n"); - - buffer.append(" .lidDefault = "); - buffer.append(" (").append(getLidDefault()).append(" )\n"); - - buffer.append(" .lidFE = "); - buffer.append(" (").append(getLidFE()).append(" )\n"); - - buffer.append(" .idctHint = "); - buffer.append(" (").append(getIdctHint()).append(" )\n"); + StringBuilder builder = new StringBuilder(); + builder.append("[CHP]\n"); + builder.append(" .grpfChp = "); + builder.append(" (").append(getGrpfChp()).append(" )\n"); + builder.append(" .fBold = ").append(isFBold()).append('\n'); + builder.append(" .fItalic = ").append(isFItalic()).append('\n'); + builder.append(" .fRMarkDel = ").append(isFRMarkDel()).append('\n'); + builder.append(" .fOutline = ").append(isFOutline()).append('\n'); + builder.append(" .fFldVanish = ").append(isFFldVanish()).append('\n'); + builder.append(" .fSmallCaps = ").append(isFSmallCaps()).append('\n'); + builder.append(" .fCaps = ").append(isFCaps()).append('\n'); + builder.append(" .fVanish = ").append(isFVanish()).append('\n'); + builder.append(" .fRMark = ").append(isFRMark()).append('\n'); + builder.append(" .fSpec = ").append(isFSpec()).append('\n'); + builder.append(" .fStrike = ").append(isFStrike()).append('\n'); + builder.append(" .fObj = ").append(isFObj()).append('\n'); + builder.append(" .fShadow = ").append(isFShadow()).append('\n'); + builder.append(" .fLowerCase = ").append(isFLowerCase()).append('\n'); + builder.append(" .fData = ").append(isFData()).append('\n'); + builder.append(" .fOle2 = ").append(isFOle2()).append('\n'); + builder.append(" .fEmboss = ").append(isFEmboss()).append('\n'); + builder.append(" .fImprint = ").append(isFImprint()).append('\n'); + builder.append(" .fDStrike = ").append(isFDStrike()).append('\n'); + builder.append(" .fUsePgsuSettings = ").append(isFUsePgsuSettings()).append('\n'); + builder.append(" .fBoldBi = ").append(isFBoldBi()).append('\n'); + builder.append(" .fComplexScripts = ").append(isFComplexScripts()).append('\n'); + builder.append(" .fItalicBi = ").append(isFItalicBi()).append('\n'); + builder.append(" .fBiDi = ").append(isFBiDi()).append('\n'); + builder.append(" .hps = "); + builder.append(" (").append(getHps()).append(" )\n"); + builder.append(" .ftcAscii = "); + builder.append(" (").append(getFtcAscii()).append(" )\n"); + builder.append(" .ftcFE = "); + builder.append(" (").append(getFtcFE()).append(" )\n"); + builder.append(" .ftcOther = "); + builder.append(" (").append(getFtcOther()).append(" )\n"); + builder.append(" .ftcBi = "); + builder.append(" (").append(getFtcBi()).append(" )\n"); + builder.append(" .dxaSpace = "); + builder.append(" (").append(getDxaSpace()).append(" )\n"); + builder.append(" .ico = "); + builder.append(" (").append(getIco()).append(" )\n"); + builder.append(" .pctCharWidth = "); + builder.append(" (").append(getPctCharWidth()).append(" )\n"); + builder.append(" .lidDefault = "); + builder.append(" (").append(getLidDefault()).append(" )\n"); + builder.append(" .lidFE = "); + builder.append(" (").append(getLidFE()).append(" )\n"); + builder.append(" .kcd = "); + builder.append(" (").append(getKcd()).append(" )\n"); + builder.append(" .fUndetermine = "); + builder.append(" (").append(getFUndetermine()).append(" )\n"); + builder.append(" .iss = "); + builder.append(" (").append(getIss()).append(" )\n"); + builder.append(" .fSpecSymbol = "); + builder.append(" (").append(getFSpecSymbol()).append(" )\n"); + builder.append(" .idct = "); + builder.append(" (").append(getIdct()).append(" )\n"); + builder.append(" .idctHint = "); + builder.append(" (").append(getIdctHint()).append(" )\n"); + builder.append(" .kul = "); + builder.append(" (").append(getKul()).append(" )\n"); + builder.append(" .hresi = "); + builder.append(" (").append(getHresi()).append(" )\n"); + builder.append(" .hpsKern = "); + builder.append(" (").append(getHpsKern()).append(" )\n"); + builder.append(" .hpsPos = "); + builder.append(" (").append(getHpsPos()).append(" )\n"); + builder.append(" .shd = "); + builder.append(" (").append(getShd()).append(" )\n"); + builder.append(" .brc = "); + builder.append(" (").append(getBrc()).append(" )\n"); + builder.append(" .ibstRMark = "); + builder.append(" (").append(getIbstRMark()).append(" )\n"); + builder.append(" .sfxtText = "); + builder.append(" (").append(getSfxtText()).append(" )\n"); + builder.append(" .fDblBdr = "); + builder.append(" (").append(getFDblBdr()).append(" )\n"); + builder.append(" .fBorderWS = "); + builder.append(" (").append(getFBorderWS()).append(" )\n"); + builder.append(" .ufel = "); + builder.append(" (").append(getUfel()).append(" )\n"); + builder.append(" .itypFELayout = ").append(getItypFELayout()).append('\n'); + builder.append(" .fTNY = ").append(isFTNY()).append('\n'); + builder.append(" .fWarichu = ").append(isFWarichu()).append('\n'); + builder.append(" .fKumimoji = ").append(isFKumimoji()).append('\n'); + builder.append(" .fRuby = ").append(isFRuby()).append('\n'); + builder.append(" .fLSFitText = ").append(isFLSFitText()).append('\n'); + builder.append(" .spare = ").append(getSpare()).append('\n'); + builder.append(" .copt = "); + builder.append(" (").append(getCopt()).append(" )\n"); + builder.append(" .iWarichuBracket = ").append(getIWarichuBracket()).append('\n'); + builder.append(" .fWarichuNoOpenBracket = ").append(isFWarichuNoOpenBracket()).append('\n'); + builder.append(" .fTNYCompress = ").append(isFTNYCompress()).append('\n'); + builder.append(" .fTNYFetchTxm = ").append(isFTNYFetchTxm()).append('\n'); + builder.append(" .fCellFitText = ").append(isFCellFitText()).append('\n'); + builder.append(" .unused = ").append(isUnused()).append('\n'); + builder.append(" .hpsAsci = "); + builder.append(" (").append(getHpsAsci()).append(" )\n"); + builder.append(" .hpsFE = "); + builder.append(" (").append(getHpsFE()).append(" )\n"); + builder.append(" .hpsBi = "); + builder.append(" (").append(getHpsBi()).append(" )\n"); + builder.append(" .ftcSym = "); + builder.append(" (").append(getFtcSym()).append(" )\n"); + builder.append(" .xchSym = "); + builder.append(" (").append(getXchSym()).append(" )\n"); + builder.append(" .fcPic = "); + builder.append(" (").append(getFcPic()).append(" )\n"); + builder.append(" .fcObj = "); + builder.append(" (").append(getFcObj()).append(" )\n"); + builder.append(" .lTagObj = "); + builder.append(" (").append(getLTagObj()).append(" )\n"); + builder.append(" .fcData = "); + builder.append(" (").append(getFcData()).append(" )\n"); + builder.append(" .hresiOld = "); + builder.append(" (").append(getHresiOld()).append(" )\n"); + builder.append(" .ibstRMarkDel = "); + builder.append(" (").append(getIbstRMarkDel()).append(" )\n"); + builder.append(" .dttmRMark = "); + builder.append(" (").append(getDttmRMark()).append(" )\n"); + builder.append(" .dttmRMarkDel = "); + builder.append(" (").append(getDttmRMarkDel()).append(" )\n"); + builder.append(" .istd = "); + builder.append(" (").append(getIstd()).append(" )\n"); + builder.append(" .idslRMReason = "); + builder.append(" (").append(getIdslRMReason()).append(" )\n"); + builder.append(" .idslReasonDel = "); + builder.append(" (").append(getIdslReasonDel()).append(" )\n"); + builder.append(" .cpg = "); + builder.append(" (").append(getCpg()).append(" )\n"); + builder.append(" .Highlight = "); + builder.append(" (").append(getHighlight()).append(" )\n"); + builder.append(" .icoHighlight = ").append(getIcoHighlight()).append('\n'); + builder.append(" .fHighlight = ").append(isFHighlight()).append('\n'); + builder.append(" .CharsetFlags = "); + builder.append(" (").append(getCharsetFlags()).append(" )\n"); + builder.append(" .fChsDiff = ").append(isFChsDiff()).append('\n'); + builder.append(" .fMacChs = ").append(isFMacChs()).append('\n'); + builder.append(" .chse = "); + builder.append(" (").append(getChse()).append(" )\n"); + builder.append(" .fPropRMark = "); + builder.append(" (").append(getFPropRMark()).append(" )\n"); + builder.append(" .ibstPropRMark = "); + builder.append(" (").append(getIbstPropRMark()).append(" )\n"); + builder.append(" .dttmPropRMark = "); + builder.append(" (").append(getDttmPropRMark()).append(" )\n"); + builder.append(" .fConflictOrig = "); + builder.append(" (").append(getFConflictOrig()).append(" )\n"); + builder.append(" .fConflictOtherDel = "); + builder.append(" (").append(getFConflictOtherDel()).append(" )\n"); + builder.append(" .wConflict = "); + builder.append(" (").append(getWConflict()).append(" )\n"); + builder.append(" .IbstConflict = "); + builder.append(" (").append(getIbstConflict()).append(" )\n"); + builder.append(" .dttmConflict = "); + builder.append(" (").append(getDttmConflict()).append(" )\n"); + builder.append(" .fDispFldRMark = "); + builder.append(" (").append(getFDispFldRMark()).append(" )\n"); + builder.append(" .ibstDispFldRMark = "); + builder.append(" (").append(getIbstDispFldRMark()).append(" )\n"); + builder.append(" .dttmDispFldRMark = "); + builder.append(" (").append(getDttmDispFldRMark()).append(" )\n"); + builder.append(" .xstDispFldRMark = "); + builder.append(" (").append(getXstDispFldRMark()).append(" )\n"); + builder.append(" .fcObjp = "); + builder.append(" (").append(getFcObjp()).append(" )\n"); + builder.append(" .lbrCRJ = "); + builder.append(" (").append(getLbrCRJ()).append(" )\n"); + builder.append(" .fSpecVanish = "); + builder.append(" (").append(getFSpecVanish()).append(" )\n"); + builder.append(" .fHasOldProps = "); + builder.append(" (").append(getFHasOldProps()).append(" )\n"); + builder.append(" .fSdtVanish = "); + builder.append(" (").append(getFSdtVanish()).append(" )\n"); + builder.append(" .wCharScale = "); + builder.append(" (").append(getWCharScale()).append(" )\n"); + + builder.append("[/CHP]\n"); + return builder.toString(); + } + + /** + * Collection of the 32 flags. + */ + public int getGrpfChp() + { + return field_1_grpfChp; + } + + /** + * Collection of the 32 flags. + */ + public void setGrpfChp( int field_1_grpfChp ) + { + this.field_1_grpfChp = field_1_grpfChp; + } + + /** + * Font size in half points. + */ + public int getHps() + { + return field_2_hps; + } - buffer.append(" .wCharScale = "); - buffer.append(" (").append(getWCharScale()).append(" )\n"); + /** + * Font size in half points. + */ + public void setHps( int field_2_hps ) + { + this.field_2_hps = field_2_hps; + } - buffer.append(" .fcPic = "); - buffer.append(" (").append(getFcPic()).append(" )\n"); + /** + * Font for ASCII text. + */ + public int getFtcAscii() + { + return field_3_ftcAscii; + } - buffer.append(" .fcObj = "); - buffer.append(" (").append(getFcObj()).append(" )\n"); + /** + * Font for ASCII text. + */ + public void setFtcAscii( int field_3_ftcAscii ) + { + this.field_3_ftcAscii = field_3_ftcAscii; + } - buffer.append(" .lTagObj = "); - buffer.append(" (").append(getLTagObj()).append(" )\n"); + /** + * Font for East Asian text. + */ + public int getFtcFE() + { + return field_4_ftcFE; + } - buffer.append(" .ibstRMark = "); - buffer.append(" (").append(getIbstRMark()).append(" )\n"); + /** + * Font for East Asian text. + */ + public void setFtcFE( int field_4_ftcFE ) + { + this.field_4_ftcFE = field_4_ftcFE; + } - buffer.append(" .ibstRMarkDel = "); - buffer.append(" (").append(getIbstRMarkDel()).append(" )\n"); + /** + * Font for non-East Asian text. + */ + public int getFtcOther() + { + return field_5_ftcOther; + } - buffer.append(" .dttmRMark = "); - buffer.append(" (").append(getDttmRMark()).append(" )\n"); + /** + * Font for non-East Asian text. + */ + public void setFtcOther( int field_5_ftcOther ) + { + this.field_5_ftcOther = field_5_ftcOther; + } - buffer.append(" .dttmRMarkDel = "); - buffer.append(" (").append(getDttmRMarkDel()).append(" )\n"); + /** + * Font for Complex Scripts text. + */ + public int getFtcBi() + { + return field_6_ftcBi; + } - buffer.append(" .istd = "); - buffer.append(" (").append(getIstd()).append(" )\n"); + /** + * Font for Complex Scripts text. + */ + public void setFtcBi( int field_6_ftcBi ) + { + this.field_6_ftcBi = field_6_ftcBi; + } - buffer.append(" .baseIstd = "); - buffer.append(" (").append(getBaseIstd()).append(" )\n"); + /** + * Space following each character in the run expressed in twip units.. + */ + public int getDxaSpace() + { + return field_7_dxaSpace; + } - buffer.append(" .ftcSym = "); - buffer.append(" (").append(getFtcSym()).append(" )\n"); + /** + * Space following each character in the run expressed in twip units.. + */ + public void setDxaSpace( int field_7_dxaSpace ) + { + this.field_7_dxaSpace = field_7_dxaSpace; + } - buffer.append(" .xchSym = "); - buffer.append(" (").append(getXchSym()).append(" )\n"); + /** + * Color of text for Word 97. + */ + public byte getIco() + { + return field_8_ico; + } - buffer.append(" .idslRMReason = "); - buffer.append(" (").append(getIdslRMReason()).append(" )\n"); + /** + * Color of text for Word 97. + */ + public void setIco( byte field_8_ico ) + { + this.field_8_ico = field_8_ico; + } - buffer.append(" .idslReasonDel = "); - buffer.append(" (").append(getIdslReasonDel()).append(" )\n"); + /** + * Character scale. + */ + public int getPctCharWidth() + { + return field_9_pctCharWidth; + } - buffer.append(" .ysr = "); - buffer.append(" (").append(getYsr()).append(" )\n"); + /** + * Character scale. + */ + public void setPctCharWidth( int field_9_pctCharWidth ) + { + this.field_9_pctCharWidth = field_9_pctCharWidth; + } - buffer.append(" .chYsr = "); - buffer.append(" (").append(getChYsr()).append(" )\n"); + /** + * Get the lidDefault field for the CHP record. + */ + public int getLidDefault() + { + return field_10_lidDefault; + } - buffer.append(" .hpsKern = "); - buffer.append(" (").append(getHpsKern()).append(" )\n"); + /** + * Set the lidDefault field for the CHP record. + */ + public void setLidDefault( int field_10_lidDefault ) + { + this.field_10_lidDefault = field_10_lidDefault; + } - buffer.append(" .Highlight = "); - buffer.append(" (").append(getHighlight()).append(" )\n"); - buffer.append(" .icoHighlight = ").append(getIcoHighlight()).append('\n'); - buffer.append(" .fHighlight = ").append(isFHighlight()).append('\n'); - buffer.append(" .fNavHighlight = ").append(isFNavHighlight()).append('\n'); + /** + * Get the lidFE field for the CHP record. + */ + public int getLidFE() + { + return field_11_lidFE; + } - buffer.append(" .InternalFlags = "); - buffer.append(" (").append(getInternalFlags()).append(" )\n"); - buffer.append(" .iatrUndetType = ").append(getIatrUndetType()).append('\n'); - buffer.append(" .fUlGap = ").append(isFUlGap()).append('\n'); - buffer.append(" .fScriptAnchor = ").append(isFScriptAnchor()).append('\n'); - buffer.append(" .fFixedObj = ").append(isFFixedObj()).append('\n'); - buffer.append(" .spare2 = ").append(isSpare2()).append('\n'); + /** + * Set the lidFE field for the CHP record. + */ + public void setLidFE( int field_11_lidFE ) + { + this.field_11_lidFE = field_11_lidFE; + } - buffer.append(" .EncodingFlags = "); - buffer.append(" (").append(getEncodingFlags()).append(" )\n"); - buffer.append(" .fChsDiff = ").append(isFChsDiff()).append('\n'); - buffer.append(" .fMacChs = ").append(isFMacChs()).append('\n'); - buffer.append(" .fFtcAsciSym = ").append(isFFtcAsciSym()).append('\n'); - buffer.append(" .fFtcReq = ").append(isFFtcReq()).append('\n'); - buffer.append(" .fLangApplied = ").append(isFLangApplied()).append('\n'); - buffer.append(" .fSpareLangApplied = ").append(isFSpareLangApplied()).append('\n'); - buffer.append(" .fForcedCvAuto = ").append(isFForcedCvAuto()).append('\n'); + /** + * Emphasis mark. + * + * @return One of + *
  • {@link #KCD_NON} + *
  • {@link #KCD_DOT} + *
  • {@link #KCD_COMMA} + *
  • {@link #KCD_CIRCLE} + *
  • {@link #KCD_UNDER_DOT} + */ + public byte getKcd() + { + return field_12_kcd; + } - buffer.append(" .chse = "); - buffer.append(" (").append(getChse()).append(" )\n"); + /** + * Emphasis mark. + * + * @param field_12_kcd + * One of + *
  • {@link #KCD_NON} + *
  • {@link #KCD_DOT} + *
  • {@link #KCD_COMMA} + *
  • {@link #KCD_CIRCLE} + *
  • {@link #KCD_UNDER_DOT} + */ + public void setKcd( byte field_12_kcd ) + { + this.field_12_kcd = field_12_kcd; + } - buffer.append(" .fPropMark = "); - buffer.append(" (").append(getFPropMark()).append(" )\n"); + /** + * Character is undetermined. + */ + public boolean getFUndetermine() + { + return field_13_fUndetermine; + } - buffer.append(" .ibstPropRMark = "); - buffer.append(" (").append(getIbstPropRMark()).append(" )\n"); + /** + * Character is undetermined. + */ + public void setFUndetermine( boolean field_13_fUndetermine ) + { + this.field_13_fUndetermine = field_13_fUndetermine; + } - buffer.append(" .dttmPropRMark = "); - buffer.append(" (").append(getDttmPropRMark()).append(" )\n"); + /** + * Superscript/subscript indices. + * + * @return One of + *
  • {@link #ISS_NONE} + *
  • {@link #ISS_SUPERSCRIPTED} + *
  • {@link #ISS_SUBSCRIPTED} + */ + public byte getIss() + { + return field_14_iss; + } - buffer.append(" .sfxtText = "); - buffer.append(" (").append(getSfxtText()).append(" )\n"); + /** + * Superscript/subscript indices. + * + * @param field_14_iss + * One of + *
  • {@link #ISS_NONE} + *
  • {@link #ISS_SUPERSCRIPTED} + *
  • {@link #ISS_SUBSCRIPTED} + */ + public void setIss( byte field_14_iss ) + { + this.field_14_iss = field_14_iss; + } - buffer.append(" .fDispFldRMark = "); - buffer.append(" (").append(getFDispFldRMark()).append(" )\n"); + /** + * Used by Word internally. + */ + public boolean getFSpecSymbol() + { + return field_15_fSpecSymbol; + } - buffer.append(" .ibstDispFldRMark = "); - buffer.append(" (").append(getIbstDispFldRMark()).append(" )\n"); + /** + * Used by Word internally. + */ + public void setFSpecSymbol( boolean field_15_fSpecSymbol ) + { + this.field_15_fSpecSymbol = field_15_fSpecSymbol; + } - buffer.append(" .dttmDispFldRMark = "); - buffer.append(" (").append(getDttmDispFldRMark()).append(" )\n"); + /** + * Not stored in file. + */ + public byte getIdct() + { + return field_16_idct; + } - buffer.append(" .xstDispFldRMark = "); - buffer.append(" (").append(getXstDispFldRMark()).append(" )\n"); + /** + * Not stored in file. + */ + public void setIdct( byte field_16_idct ) + { + this.field_16_idct = field_16_idct; + } - buffer.append(" .shd = "); - buffer.append(" (").append(getShd()).append(" )\n"); + /** + * Identifier of Character type. + */ + public byte getIdctHint() + { + return field_17_idctHint; + } - buffer.append(" .brc = "); - buffer.append(" (").append(getBrc()).append(" )\n"); + /** + * Identifier of Character type. + */ + public void setIdctHint( byte field_17_idctHint ) + { + this.field_17_idctHint = field_17_idctHint; + } - buffer.append("[/CHP]\n"); - return buffer.toString(); + /** + * Underline code. + * + * @return One of + *
  • {@link #KUL_NONE} + *
  • {@link #KUL_SINGLE} + *
  • {@link #KUL_BY_WORD} + *
  • {@link #KUL_DOUBLE} + *
  • {@link #KUL_DOTTED} + *
  • {@link #KUL_HIDDEN} + *
  • {@link #KUL_THICK} + *
  • {@link #KUL_DASH} + *
  • {@link #KUL_DOT} + *
  • {@link #KUL_DOT_DASH} + *
  • {@link #KUL_DOT_DOT_DASH} + *
  • {@link #KUL_WAVE} + *
  • {@link #KUL_DOTTED_HEAVY} + *
  • {@link #KUL_DASHED_HEAVY} + *
  • {@link #KUL_DOT_DASH_HEAVY} + *
  • {@link #KUL_DOT_DOT_DASH_HEAVY} + *
  • {@link #KUL_WAVE_HEAVY} + *
  • {@link #KUL_DASH_LONG} + *
  • {@link #KUL_WAVE_DOUBLE} + *
  • {@link #KUL_DASH_LONG_HEAVY} + */ + public byte getKul() + { + return field_18_kul; } /** - * Size of record (exluding 4 byte header) + * Underline code. + * + * @param field_18_kul + * One of + *
  • {@link #KUL_NONE} + *
  • {@link #KUL_SINGLE} + *
  • {@link #KUL_BY_WORD} + *
  • {@link #KUL_DOUBLE} + *
  • {@link #KUL_DOTTED} + *
  • {@link #KUL_HIDDEN} + *
  • {@link #KUL_THICK} + *
  • {@link #KUL_DASH} + *
  • {@link #KUL_DOT} + *
  • {@link #KUL_DOT_DASH} + *
  • {@link #KUL_DOT_DOT_DASH} + *
  • {@link #KUL_WAVE} + *
  • {@link #KUL_DOTTED_HEAVY} + *
  • {@link #KUL_DASHED_HEAVY} + *
  • {@link #KUL_DOT_DASH_HEAVY} + *
  • {@link #KUL_DOT_DOT_DASH_HEAVY} + *
  • {@link #KUL_WAVE_HEAVY} + *
  • {@link #KUL_DASH_LONG} + *
  • {@link #KUL_WAVE_DOUBLE} + *
  • {@link #KUL_DASH_LONG_HEAVY} */ - public int getSize() + public void setKul( byte field_18_kul ) { - return 4 + + 2 + 2 + 2 + 2 + 2 + 2 + 4 + 1 + 1 + 1 + 2 + 2 + 2 + 1 + 2 + 4 + 4 + 4 + 2 + 2 + 4 + 4 + 2 + 2 + 2 + 2 + 2 + 2 + 1 + 1 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 4 + 1 + 1 + 2 + 4 + 32 + 2 + 4; + this.field_18_kul = field_18_kul; } + /** + * Get the hresi field for the CHP record. + */ + public Hyphenation getHresi() + { + return field_19_hresi; + } + /** + * Set the hresi field for the CHP record. + */ + public void setHresi( Hyphenation field_19_hresi ) + { + this.field_19_hresi = field_19_hresi; + } /** - * Get the format_flags field for the CHP record. + * Kerning distance for characters in run recorded in half points. */ - public int getFormat_flags() + public int getHpsKern() { - return field_1_format_flags; + return field_20_hpsKern; } /** - * Set the format_flags field for the CHP record. + * Kerning distance for characters in run recorded in half points. */ - public void setFormat_flags(int field_1_format_flags) + public void setHpsKern( int field_20_hpsKern ) { - this.field_1_format_flags = field_1_format_flags; + this.field_20_hpsKern = field_20_hpsKern; } /** - * Get the format_flags1 field for the CHP record. + * Reserved (actually used as vertical offset(?) value). */ - public int getFormat_flags1() + public short getHpsPos() { - return field_2_format_flags1; + return field_21_hpsPos; } /** - * Set the format_flags1 field for the CHP record. + * Reserved (actually used as vertical offset(?) value). */ - public void setFormat_flags1(int field_2_format_flags1) + public void setHpsPos( short field_21_hpsPos ) { - this.field_2_format_flags1 = field_2_format_flags1; + this.field_21_hpsPos = field_21_hpsPos; } /** - * Get the ftcAscii field for the CHP record. + * Shading. */ - public int getFtcAscii() + public ShadingDescriptor getShd() { - return field_3_ftcAscii; + return field_22_shd; } /** - * Set the ftcAscii field for the CHP record. + * Shading. */ - public void setFtcAscii(int field_3_ftcAscii) + public void setShd( ShadingDescriptor field_22_shd ) { - this.field_3_ftcAscii = field_3_ftcAscii; + this.field_22_shd = field_22_shd; } /** - * Get the ftcFE field for the CHP record. + * Border. */ - public int getFtcFE() + public BorderCode getBrc() { - return field_4_ftcFE; + return field_23_brc; } /** - * Set the ftcFE field for the CHP record. + * Border. */ - public void setFtcFE(int field_4_ftcFE) + public void setBrc( BorderCode field_23_brc ) { - this.field_4_ftcFE = field_4_ftcFE; + this.field_23_brc = field_23_brc; } /** - * Get the ftcOther field for the CHP record. + * Index to author IDs stored in hsttbfRMark. Used when text in run was newly typed when revision marking was enabled. */ - public int getFtcOther() + public int getIbstRMark() { - return field_5_ftcOther; + return field_24_ibstRMark; } /** - * Set the ftcOther field for the CHP record. + * Index to author IDs stored in hsttbfRMark. Used when text in run was newly typed when revision marking was enabled. */ - public void setFtcOther(int field_5_ftcOther) + public void setIbstRMark( int field_24_ibstRMark ) { - this.field_5_ftcOther = field_5_ftcOther; + this.field_24_ibstRMark = field_24_ibstRMark; } /** - * Get the hps field for the CHP record. + * Text animation. + * + * @return One of + *
  • {@link #SFXTTEXT_NO} + *
  • {@link #SFXTTEXT_LAS_VEGAS_LIGHTS} + *
  • {@link #SFXTTEXT_BACKGROUND_BLINK} + *
  • {@link #SFXTTEXT_SPARKLE_TEXT} + *
  • {@link #SFXTTEXT_MARCHING_ANTS} + *
  • {@link #SFXTTEXT_MARCHING_RED_ANTS} + *
  • {@link #SFXTTEXT_SHIMMER} */ - public int getHps() + public byte getSfxtText() { - return field_6_hps; + return field_25_sfxtText; } /** - * Set the hps field for the CHP record. + * Text animation. + * + * @param field_25_sfxtText + * One of + *
  • {@link #SFXTTEXT_NO} + *
  • {@link #SFXTTEXT_LAS_VEGAS_LIGHTS} + *
  • {@link #SFXTTEXT_BACKGROUND_BLINK} + *
  • {@link #SFXTTEXT_SPARKLE_TEXT} + *
  • {@link #SFXTTEXT_MARCHING_ANTS} + *
  • {@link #SFXTTEXT_MARCHING_RED_ANTS} + *
  • {@link #SFXTTEXT_SHIMMER} */ - public void setHps(int field_6_hps) + public void setSfxtText( byte field_25_sfxtText ) { - this.field_6_hps = field_6_hps; + this.field_25_sfxtText = field_25_sfxtText; } /** - * Get the dxaSpace field for the CHP record. + * Used internally by Word. */ - public int getDxaSpace() + public boolean getFDblBdr() { - return field_7_dxaSpace; + return field_26_fDblBdr; } /** - * Set the dxaSpace field for the CHP record. + * Used internally by Word. */ - public void setDxaSpace(int field_7_dxaSpace) + public void setFDblBdr( boolean field_26_fDblBdr ) { - this.field_7_dxaSpace = field_7_dxaSpace; + this.field_26_fDblBdr = field_26_fDblBdr; } /** - * Get the iss field for the CHP record. + * Used internally by Word. */ - public byte getIss() + public boolean getFBorderWS() { - return field_8_iss; + return field_27_fBorderWS; } /** - * Set the iss field for the CHP record. + * Used internally by Word. */ - public void setIss(byte field_8_iss) + public void setFBorderWS( boolean field_27_fBorderWS ) { - this.field_8_iss = field_8_iss; + this.field_27_fBorderWS = field_27_fBorderWS; } /** - * Get the kul field for the CHP record. + * Collection properties represented by itypFELayout and copt (East Asian layout properties). */ - public byte getKul() + public short getUfel() { - return field_9_kul; + return field_28_ufel; } /** - * Set the kul field for the CHP record. + * Collection properties represented by itypFELayout and copt (East Asian layout properties). */ - public void setKul(byte field_9_kul) + public void setUfel( short field_28_ufel ) { - this.field_9_kul = field_9_kul; + this.field_28_ufel = field_28_ufel; } /** - * Get the ico field for the CHP record. + * Collection of the 5 flags. */ - public byte getIco() + public byte getCopt() { - return field_10_ico; + return field_29_copt; } /** - * Set the ico field for the CHP record. + * Collection of the 5 flags. */ - public void setIco(byte field_10_ico) + public void setCopt( byte field_29_copt ) { - this.field_10_ico = field_10_ico; + this.field_29_copt = field_29_copt; } /** - * Get the hpsPos field for the CHP record. + * Font size for ASCII font. */ - public int getHpsPos() + public int getHpsAsci() { - return field_11_hpsPos; + return field_30_hpsAsci; } /** - * Set the hpsPos field for the CHP record. + * Font size for ASCII font. */ - public void setHpsPos(int field_11_hpsPos) + public void setHpsAsci( int field_30_hpsAsci ) { - this.field_11_hpsPos = field_11_hpsPos; + this.field_30_hpsAsci = field_30_hpsAsci; } /** - * Get the lidDefault field for the CHP record. + * Font size for East Asian text. */ - public int getLidDefault() + public int getHpsFE() { - return field_12_lidDefault; + return field_31_hpsFE; } /** - * Set the lidDefault field for the CHP record. + * Font size for East Asian text. */ - public void setLidDefault(int field_12_lidDefault) + public void setHpsFE( int field_31_hpsFE ) { - this.field_12_lidDefault = field_12_lidDefault; + this.field_31_hpsFE = field_31_hpsFE; } /** - * Get the lidFE field for the CHP record. + * Font size for Complex Scripts text. */ - public int getLidFE() + public int getHpsBi() { - return field_13_lidFE; + return field_32_hpsBi; } /** - * Set the lidFE field for the CHP record. + * Font size for Complex Scripts text. */ - public void setLidFE(int field_13_lidFE) + public void setHpsBi( int field_32_hpsBi ) { - this.field_13_lidFE = field_13_lidFE; + this.field_32_hpsBi = field_32_hpsBi; } /** - * Get the idctHint field for the CHP record. + * 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.. */ - public byte getIdctHint() + public int getFtcSym() { - return field_14_idctHint; + return field_33_ftcSym; } /** - * Set the idctHint field for the CHP record. + * 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.. */ - public void setIdctHint(byte field_14_idctHint) + public void setFtcSym( int field_33_ftcSym ) { - this.field_14_idctHint = field_14_idctHint; + this.field_33_ftcSym = field_33_ftcSym; } /** - * Get the wCharScale field for the CHP record. + * 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.. */ - public int getWCharScale() + public int getXchSym() { - return field_15_wCharScale; + return field_34_xchSym; } /** - * Set the wCharScale field for the CHP record. + * 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.. */ - public void setWCharScale(int field_15_wCharScale) + public void setXchSym( int field_34_xchSym ) { - this.field_15_wCharScale = field_15_wCharScale; + this.field_34_xchSym = field_34_xchSym; } /** - * Get the fcPic field for the CHP record. + * Offset in data stream pointing to beginning of a picture when character is a picture character (character is 0x01 and chp.fSpec is 1).. */ public int getFcPic() { - return field_16_fcPic; + return field_35_fcPic; } /** - * Set the fcPic field for the CHP record. + * Offset in data stream pointing to beginning of a picture when character is a picture character (character is 0x01 and chp.fSpec is 1).. */ - public void setFcPic(int field_16_fcPic) + public void setFcPic( int field_35_fcPic ) { - this.field_16_fcPic = field_16_fcPic; + this.field_35_fcPic = field_35_fcPic; } /** - * Get the fcObj field for the CHP record. + * 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).. */ public int getFcObj() { - return field_17_fcObj; + return field_36_fcObj; } /** - * Set the fcObj field for the CHP record. + * 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).. */ - public void setFcObj(int field_17_fcObj) + public void setFcObj( int field_36_fcObj ) { - this.field_17_fcObj = field_17_fcObj; + this.field_36_fcObj = field_36_fcObj; } /** - * Get the lTagObj field for the CHP record. + * An object ID for an OLE object, only set if chp.fSpec and chp.fOle2 are both true, and chp.fObj.. */ public int getLTagObj() { - return field_18_lTagObj; + return field_37_lTagObj; } /** - * Set the lTagObj field for the CHP record. + * An object ID for an OLE object, only set if chp.fSpec and chp.fOle2 are both true, and chp.fObj.. */ - public void setLTagObj(int field_18_lTagObj) + public void setLTagObj( int field_37_lTagObj ) { - this.field_18_lTagObj = field_18_lTagObj; + this.field_37_lTagObj = field_37_lTagObj; } /** - * Get the ibstRMark field for the CHP record. + * Points to location of picture data, only if chp.fSpec is true.. */ - public int getIbstRMark() + public int getFcData() + { + return field_38_fcData; + } + + /** + * Points to location of picture data, only if chp.fSpec is true.. + */ + public void setFcData( int field_38_fcData ) + { + this.field_38_fcData = field_38_fcData; + } + + /** + * Get the hresiOld field for the CHP record. + */ + public Hyphenation getHresiOld() { - return field_19_ibstRMark; + return field_39_hresiOld; } /** - * Set the ibstRMark field for the CHP record. + * Set the hresiOld field for the CHP record. */ - public void setIbstRMark(int field_19_ibstRMark) + public void setHresiOld( Hyphenation field_39_hresiOld ) { - this.field_19_ibstRMark = field_19_ibstRMark; + this.field_39_hresiOld = field_39_hresiOld; } /** - * Get the ibstRMarkDel field for the CHP record. + * Index to author IDs stored in hsttbfRMark. Used when text in run was deleted when revision marking was enabled.. */ public int getIbstRMarkDel() { - return field_20_ibstRMarkDel; + return field_40_ibstRMarkDel; } /** - * Set the ibstRMarkDel field for the CHP record. + * Index to author IDs stored in hsttbfRMark. Used when text in run was deleted when revision marking was enabled.. */ - public void setIbstRMarkDel(int field_20_ibstRMarkDel) + public void setIbstRMarkDel( int field_40_ibstRMarkDel ) { - this.field_20_ibstRMarkDel = field_20_ibstRMarkDel; + this.field_40_ibstRMarkDel = field_40_ibstRMarkDel; } /** - * Get the dttmRMark field for the CHP record. + * Date/time at which this run of text was entered/modified by the author (Only recorded when revision marking is on.). */ public DateAndTime getDttmRMark() { - return field_21_dttmRMark; + return field_41_dttmRMark; } /** - * Set the dttmRMark field for the CHP record. + * Date/time at which this run of text was entered/modified by the author (Only recorded when revision marking is on.). */ - public void setDttmRMark(DateAndTime field_21_dttmRMark) + public void setDttmRMark( DateAndTime field_41_dttmRMark ) { - this.field_21_dttmRMark = field_21_dttmRMark; + this.field_41_dttmRMark = field_41_dttmRMark; } /** - * Get the dttmRMarkDel field for the CHP record. + * Date/time at which this run of text was deleted by the author (Only recorded when revision marking is on.). */ public DateAndTime getDttmRMarkDel() { - return field_22_dttmRMarkDel; + return field_42_dttmRMarkDel; } /** - * Set the dttmRMarkDel field for the CHP record. + * Date/time at which this run of text was deleted by the author (Only recorded when revision marking is on.). */ - public void setDttmRMarkDel(DateAndTime field_22_dttmRMarkDel) + public void setDttmRMarkDel( DateAndTime field_42_dttmRMarkDel ) { - this.field_22_dttmRMarkDel = field_22_dttmRMarkDel; + this.field_42_dttmRMarkDel = field_42_dttmRMarkDel; } /** - * Get the istd field for the CHP record. + * 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.. */ public int getIstd() { - return field_23_istd; + return field_43_istd; } /** - * Set the istd field for the CHP record. + * 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.. */ - public void setIstd(int field_23_istd) + public void setIstd( int field_43_istd ) { - this.field_23_istd = field_23_istd; + this.field_43_istd = field_43_istd; } /** - * Get the baseIstd field for the CHP record. + * An index to strings displayed as reasons for actions taken by Word‘s AutoFormat code. */ - public int getBaseIstd() + public int getIdslRMReason() { - return field_24_baseIstd; + return field_44_idslRMReason; } /** - * Set the baseIstd field for the CHP record. + * An index to strings displayed as reasons for actions taken by Word‘s AutoFormat code. */ - public void setBaseIstd(int field_24_baseIstd) + public void setIdslRMReason( int field_44_idslRMReason ) { - this.field_24_baseIstd = field_24_baseIstd; + this.field_44_idslRMReason = field_44_idslRMReason; } /** - * Get the ftcSym field for the CHP record. + * An index to strings displayed as reasons for actions taken by Word‘s AutoFormat code. */ - public int getFtcSym() + public int getIdslReasonDel() { - return field_25_ftcSym; + return field_45_idslReasonDel; } /** - * Set the ftcSym field for the CHP record. + * An index to strings displayed as reasons for actions taken by Word‘s AutoFormat code. */ - public void setFtcSym(int field_25_ftcSym) + public void setIdslReasonDel( int field_45_idslReasonDel ) { - this.field_25_ftcSym = field_25_ftcSym; + this.field_45_idslReasonDel = field_45_idslReasonDel; } /** - * Get the xchSym field for the CHP record. + * Code page of run in pre-Unicode files. */ - public int getXchSym() + public int getCpg() { - return field_26_xchSym; + return field_46_cpg; } /** - * Set the xchSym field for the CHP record. + * Code page of run in pre-Unicode files. */ - public void setXchSym(int field_26_xchSym) + public void setCpg( int field_46_cpg ) { - this.field_26_xchSym = field_26_xchSym; + this.field_46_cpg = field_46_cpg; } /** - * Get the idslRMReason field for the CHP record. + * Get the Highlight field for the CHP record. */ - public int getIdslRMReason() + public short getHighlight() { - return field_27_idslRMReason; + return field_47_Highlight; } /** - * Set the idslRMReason field for the CHP record. + * Set the Highlight field for the CHP record. */ - public void setIdslRMReason(int field_27_idslRMReason) + public void setHighlight( short field_47_Highlight ) { - this.field_27_idslRMReason = field_27_idslRMReason; + this.field_47_Highlight = field_47_Highlight; } /** - * Get the idslReasonDel field for the CHP record. + * Get the CharsetFlags field for the CHP record. */ - public int getIdslReasonDel() + public short getCharsetFlags() { - return field_28_idslReasonDel; + return field_48_CharsetFlags; } /** - * Set the idslReasonDel field for the CHP record. + * Set the CharsetFlags field for the CHP record. */ - public void setIdslReasonDel(int field_28_idslReasonDel) + public void setCharsetFlags( short field_48_CharsetFlags ) { - this.field_28_idslReasonDel = field_28_idslReasonDel; + this.field_48_CharsetFlags = field_48_CharsetFlags; } /** - * Get the ysr field for the CHP record. + * Get the chse field for the CHP record. */ - public byte getYsr() + public short getChse() { - return field_29_ysr; + return field_49_chse; } /** - * Set the ysr field for the CHP record. + * Set the chse field for the CHP record. */ - public void setYsr(byte field_29_ysr) + public void setChse( short field_49_chse ) { - this.field_29_ysr = field_29_ysr; + this.field_49_chse = field_49_chse; } /** - * Get the chYsr field for the CHP record. + * properties have been changed with revision marking on. */ - public byte getChYsr() + public boolean getFPropRMark() { - return field_30_chYsr; + return field_50_fPropRMark; } /** - * Set the chYsr field for the CHP record. + * properties have been changed with revision marking on. */ - public void setChYsr(byte field_30_chYsr) + public void setFPropRMark( boolean field_50_fPropRMark ) { - this.field_30_chYsr = field_30_chYsr; + this.field_50_fPropRMark = field_50_fPropRMark; } /** - * Get the hpsKern field for the CHP record. + * Index to author IDs stored in hsttbfRMark. Used when properties have been changed when revision marking was enabled.. */ - public int getHpsKern() + public int getIbstPropRMark() { - return field_31_hpsKern; + return field_51_ibstPropRMark; } /** - * Set the hpsKern field for the CHP record. + * Index to author IDs stored in hsttbfRMark. Used when properties have been changed when revision marking was enabled.. */ - public void setHpsKern(int field_31_hpsKern) + public void setIbstPropRMark( int field_51_ibstPropRMark ) { - this.field_31_hpsKern = field_31_hpsKern; + this.field_51_ibstPropRMark = field_51_ibstPropRMark; } /** - * Get the Highlight field for the CHP record. + * Date/time at which properties of this were changed for this run of text by the author. (Only recorded when revision marking is on.). */ - public short getHighlight() + public DateAndTime getDttmPropRMark() { - return field_32_Highlight; + return field_52_dttmPropRMark; } /** - * Set the Highlight field for the CHP record. + * Date/time at which properties of this were changed for this run of text by the author. (Only recorded when revision marking is on.). */ - public void setHighlight(short field_32_Highlight) + public void setDttmPropRMark( DateAndTime field_52_dttmPropRMark ) { - this.field_32_Highlight = field_32_Highlight; + this.field_52_dttmPropRMark = field_52_dttmPropRMark; } /** - * Get the InternalFlags field for the CHP record. + * 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.. */ - public short getInternalFlags() + public boolean getFConflictOrig() { - return field_33_InternalFlags; + return field_53_fConflictOrig; } /** - * Set the InternalFlags field for the CHP record. + * 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.. */ - public void setInternalFlags(short field_33_InternalFlags) + public void setFConflictOrig( boolean field_53_fConflictOrig ) { - this.field_33_InternalFlags = field_33_InternalFlags; + this.field_53_fConflictOrig = field_53_fConflictOrig; } /** - * Get the EncodingFlags field for the CHP record. + * When fConflictOtherDel==fTrue, the other side of a reconciliation conflict causes this text to be deleted. */ - public short getEncodingFlags() + public boolean getFConflictOtherDel() { - return field_34_EncodingFlags; + return field_54_fConflictOtherDel; } /** - * Set the EncodingFlags field for the CHP record. + * When fConflictOtherDel==fTrue, the other side of a reconciliation conflict causes this text to be deleted. */ - public void setEncodingFlags(short field_34_EncodingFlags) + public void setFConflictOtherDel( boolean field_54_fConflictOtherDel ) { - this.field_34_EncodingFlags = field_34_EncodingFlags; + this.field_54_fConflictOtherDel = field_54_fConflictOtherDel; } /** - * 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 != 0, index number that identifies all text participating in a particular conflict incident. */ - public short getChse() + public int getWConflict() { - return field_35_chse; + return field_55_wConflict; } /** - * 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 != 0, index number that identifies all text participating in a particular conflict incident. */ - public void setChse(short field_35_chse) + public void setWConflict( int field_55_wConflict ) { - this.field_35_chse = field_35_chse; + this.field_55_wConflict = field_55_wConflict; } /** - * Get the fPropMark field for the CHP record. + * Who made this change for this side of the conflict.. */ - public short getFPropMark() + public int getIbstConflict() { - return field_36_fPropMark; + return field_56_IbstConflict; } /** - * Set the fPropMark field for the CHP record. + * Who made this change for this side of the conflict.. */ - public void setFPropMark(short field_36_fPropMark) + public void setIbstConflict( int field_56_IbstConflict ) { - this.field_36_fPropMark = field_36_fPropMark; + this.field_56_IbstConflict = field_56_IbstConflict; } /** - * Get the ibstPropRMark field for the CHP record. + * When the change was made. */ - public int getIbstPropRMark() + public DateAndTime getDttmConflict() { - return field_37_ibstPropRMark; + return field_57_dttmConflict; } /** - * Set the ibstPropRMark field for the CHP record. + * When the change was made. */ - public void setIbstPropRMark(int field_37_ibstPropRMark) + public void setDttmConflict( DateAndTime field_57_dttmConflict ) { - this.field_37_ibstPropRMark = field_37_ibstPropRMark; + this.field_57_dttmConflict = field_57_dttmConflict; } /** - * Get the dttmPropRMark field for the CHP record. + * 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.. */ - public DateAndTime getDttmPropRMark() + public boolean getFDispFldRMark() { - return field_38_dttmPropRMark; + return field_58_fDispFldRMark; } /** - * Set the dttmPropRMark field for the CHP record. + * 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.. */ - public void setDttmPropRMark(DateAndTime field_38_dttmPropRMark) + public void setFDispFldRMark( boolean field_58_fDispFldRMark ) { - this.field_38_dttmPropRMark = field_38_dttmPropRMark; + this.field_58_fDispFldRMark = field_58_fDispFldRMark; } /** - * Get the sfxtText field for the CHP record. + * Index to author IDs stored in hsttbfRMark. Used when ListNum field numbering has been changed when revision marking was enabled.. */ - public byte getSfxtText() + public int getIbstDispFldRMark() { - return field_39_sfxtText; + return field_59_ibstDispFldRMark; } /** - * Set the sfxtText field for the CHP record. + * Index to author IDs stored in hsttbfRMark. Used when ListNum field numbering has been changed when revision marking was enabled.. */ - public void setSfxtText(byte field_39_sfxtText) + public void setIbstDispFldRMark( int field_59_ibstDispFldRMark ) { - this.field_39_sfxtText = field_39_sfxtText; + this.field_59_ibstDispFldRMark = field_59_ibstDispFldRMark; } /** - * Get the fDispFldRMark field for the CHP record. + * The date for the ListNum field number change. */ - public byte getFDispFldRMark() + public DateAndTime getDttmDispFldRMark() { - return field_40_fDispFldRMark; + return field_60_dttmDispFldRMark; } /** - * Set the fDispFldRMark field for the CHP record. + * The date for the ListNum field number change. */ - public void setFDispFldRMark(byte field_40_fDispFldRMark) + public void setDttmDispFldRMark( DateAndTime field_60_dttmDispFldRMark ) { - this.field_40_fDispFldRMark = field_40_fDispFldRMark; + this.field_60_dttmDispFldRMark = field_60_dttmDispFldRMark; } /** - * Get the ibstDispFldRMark field for the CHP record. + * The string value of the ListNum field when revision mark tracking began. */ - public int getIbstDispFldRMark() + public byte[] getXstDispFldRMark() { - return field_41_ibstDispFldRMark; + return field_61_xstDispFldRMark; } /** - * Set the ibstDispFldRMark field for the CHP record. + * The string value of the ListNum field when revision mark tracking began. */ - public void setIbstDispFldRMark(int field_41_ibstDispFldRMark) + public void setXstDispFldRMark( byte[] field_61_xstDispFldRMark ) { - this.field_41_ibstDispFldRMark = field_41_ibstDispFldRMark; + this.field_61_xstDispFldRMark = field_61_xstDispFldRMark; } /** - * Get the dttmDispFldRMark field for the CHP record. + * Offset in the data stream indicating the location of OLE object data. */ - public DateAndTime getDttmDispFldRMark() + public int getFcObjp() { - return field_42_dttmDispFldRMark; + return field_62_fcObjp; } /** - * Set the dttmDispFldRMark field for the CHP record. + * Offset in the data stream indicating the location of OLE object data. */ - public void setDttmDispFldRMark(DateAndTime field_42_dttmDispFldRMark) + public void setFcObjp( int field_62_fcObjp ) { - this.field_42_dttmDispFldRMark = field_42_dttmDispFldRMark; + this.field_62_fcObjp = field_62_fcObjp; } /** - * Get the xstDispFldRMark field for the CHP record. + * Line BReak code for xchCRJ. + * + * @return One of + *
  • {@link #LBRCRJ_NONE} + *
  • {@link #LBRCRJ_LEFT} + *
  • {@link #LBRCRJ_RIGHT} + *
  • {@link #LBRCRJ_BOTH} */ - public byte[] getXstDispFldRMark() + public byte getLbrCRJ() { - return field_43_xstDispFldRMark; + return field_63_lbrCRJ; } /** - * Set the xstDispFldRMark field for the CHP record. + * Line BReak code for xchCRJ. + * + * @param field_63_lbrCRJ + * One of + *
  • {@link #LBRCRJ_NONE} + *
  • {@link #LBRCRJ_LEFT} + *
  • {@link #LBRCRJ_RIGHT} + *
  • {@link #LBRCRJ_BOTH} */ - public void setXstDispFldRMark(byte[] field_43_xstDispFldRMark) + public void setLbrCRJ( byte field_63_lbrCRJ ) { - this.field_43_xstDispFldRMark = field_43_xstDispFldRMark; + this.field_63_lbrCRJ = field_63_lbrCRJ; } /** - * Get the shd field for the CHP record. + * Special hidden for leading emphasis (always hidden). */ - public ShadingDescriptor getShd() + public boolean getFSpecVanish() { - return field_44_shd; + return field_64_fSpecVanish; } /** - * Set the shd field for the CHP record. + * Special hidden for leading emphasis (always hidden). */ - public void setShd(ShadingDescriptor field_44_shd) + public void setFSpecVanish( boolean field_64_fSpecVanish ) { - this.field_44_shd = field_44_shd; + this.field_64_fSpecVanish = field_64_fSpecVanish; } /** - * Get the brc field for the CHP record. + * Used for character property revision marking. The chp at the time fHasOldProps is set to 1, the is the old chp.. */ - public BorderCode getBrc() + public boolean getFHasOldProps() + { + return field_65_fHasOldProps; + } + + /** + * Used for character property revision marking. The chp at the time fHasOldProps is set to 1, the is the old chp.. + */ + public void setFHasOldProps( boolean field_65_fHasOldProps ) + { + this.field_65_fHasOldProps = field_65_fHasOldProps; + } + + /** + * Mark the character as hidden.. + */ + public boolean getFSdtVanish() { - return field_45_brc; + return field_66_fSdtVanish; } /** - * Set the brc field for the CHP record. + * Mark the character as hidden.. */ - public void setBrc(BorderCode field_45_brc) + public void setFSdtVanish( boolean field_66_fSdtVanish ) { - this.field_45_brc = field_45_brc; + this.field_66_fSdtVanish = field_66_fSdtVanish; + } + + /** + * Get the wCharScale field for the CHP record. + */ + public int getWCharScale() + { + return field_67_wCharScale; + } + + /** + * Set the wCharScale field for the CHP record. + */ + public void setWCharScale( int field_67_wCharScale ) + { + this.field_67_wCharScale = field_67_wCharScale; } /** * Sets the fBold field value. - * + * Text is bold */ - public void setFBold(boolean value) + public void setFBold( boolean value ) { - field_1_format_flags = (int)fBold.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fBold.setBoolean(field_1_grpfChp, value); } /** - * + * Text is bold * @return the fBold field value. */ public boolean isFBold() { - return fBold.isSet(field_1_format_flags); + return fBold.isSet(field_1_grpfChp); } /** * Sets the fItalic field value. - * + * Italic */ - public void setFItalic(boolean value) + public void setFItalic( boolean value ) { - field_1_format_flags = (int)fItalic.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fItalic.setBoolean(field_1_grpfChp, value); } /** - * + * Italic * @return the fItalic field value. */ public boolean isFItalic() { - return fItalic.isSet(field_1_format_flags); + return fItalic.isSet(field_1_grpfChp); } /** * Sets the fRMarkDel field value. - * + * has been deleted and will be displayed with strikethrough when revision marked text is to be displayed */ - public void setFRMarkDel(boolean value) + public void setFRMarkDel( boolean value ) { - field_1_format_flags = (int)fRMarkDel.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fRMarkDel.setBoolean(field_1_grpfChp, value); } /** - * + * has been deleted and will be displayed with strikethrough when revision marked text is to be displayed * @return the fRMarkDel field value. */ public boolean isFRMarkDel() { - return fRMarkDel.isSet(field_1_format_flags); + return fRMarkDel.isSet(field_1_grpfChp); } /** * Sets the fOutline field value. - * + * Outlined */ - public void setFOutline(boolean value) + public void setFOutline( boolean value ) { - field_1_format_flags = (int)fOutline.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fOutline.setBoolean(field_1_grpfChp, value); } /** - * + * Outlined * @return the fOutline field value. */ public boolean isFOutline() { - return fOutline.isSet(field_1_format_flags); + return fOutline.isSet(field_1_grpfChp); } /** * Sets the fFldVanish field value. - * + * Used internally by Word */ - public void setFFldVanish(boolean value) + public void setFFldVanish( boolean value ) { - field_1_format_flags = (int)fFldVanish.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fFldVanish.setBoolean(field_1_grpfChp, value); } /** - * + * Used internally by Word * @return the fFldVanish field value. */ public boolean isFFldVanish() { - return fFldVanish.isSet(field_1_format_flags); + return fFldVanish.isSet(field_1_grpfChp); } /** * Sets the fSmallCaps field value. - * + * Displayed with small caps */ - public void setFSmallCaps(boolean value) + public void setFSmallCaps( boolean value ) { - field_1_format_flags = (int)fSmallCaps.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fSmallCaps.setBoolean(field_1_grpfChp, value); } /** - * + * Displayed with small caps * @return the fSmallCaps field value. */ public boolean isFSmallCaps() { - return fSmallCaps.isSet(field_1_format_flags); + return fSmallCaps.isSet(field_1_grpfChp); } /** * Sets the fCaps field value. - * + * Displayed with caps */ - public void setFCaps(boolean value) + public void setFCaps( boolean value ) { - field_1_format_flags = (int)fCaps.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fCaps.setBoolean(field_1_grpfChp, value); } /** - * + * Displayed with caps * @return the fCaps field value. */ public boolean isFCaps() { - return fCaps.isSet(field_1_format_flags); + return fCaps.isSet(field_1_grpfChp); } /** * Sets the fVanish field value. - * + * text has ―hidden‖ format, and is not displayed unless fPagHidden is set in the DOP */ - public void setFVanish(boolean value) + public void setFVanish( boolean value ) { - field_1_format_flags = (int)fVanish.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fVanish.setBoolean(field_1_grpfChp, value); } /** - * + * text has ―hidden‖ format, and is not displayed unless fPagHidden is set in the DOP * @return the fVanish field value. */ public boolean isFVanish() { - return fVanish.isSet(field_1_format_flags); + return fVanish.isSet(field_1_grpfChp); } /** * Sets the fRMark field value. - * + * 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 */ - public void setFRMark(boolean value) + public void setFRMark( boolean value ) { - field_1_format_flags = (int)fRMark.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fRMark.setBoolean(field_1_grpfChp, value); } /** - * + * 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 * @return the fRMark field value. */ public boolean isFRMark() { - return fRMark.isSet(field_1_format_flags); + return fRMark.isSet(field_1_grpfChp); } /** * Sets the fSpec field value. - * + * Character is a Word special character */ - public void setFSpec(boolean value) + public void setFSpec( boolean value ) { - field_1_format_flags = (int)fSpec.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fSpec.setBoolean(field_1_grpfChp, value); } /** - * + * Character is a Word special character * @return the fSpec field value. */ public boolean isFSpec() { - return fSpec.isSet(field_1_format_flags); + return fSpec.isSet(field_1_grpfChp); } /** * Sets the fStrike field value. - * + * Displayed with strikethrough */ - public void setFStrike(boolean value) + public void setFStrike( boolean value ) { - field_1_format_flags = (int)fStrike.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fStrike.setBoolean(field_1_grpfChp, value); } /** - * + * Displayed with strikethrough * @return the fStrike field value. */ public boolean isFStrike() { - return fStrike.isSet(field_1_format_flags); + return fStrike.isSet(field_1_grpfChp); } /** * Sets the fObj field value. - * + * Embedded objec */ - public void setFObj(boolean value) + public void setFObj( boolean value ) { - field_1_format_flags = (int)fObj.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fObj.setBoolean(field_1_grpfChp, value); } /** - * + * Embedded objec * @return the fObj field value. */ public boolean isFObj() { - return fObj.isSet(field_1_format_flags); + return fObj.isSet(field_1_grpfChp); } /** * Sets the fShadow field value. - * + * Character is drawn with a shadow */ - public void setFShadow(boolean value) + public void setFShadow( boolean value ) { - field_1_format_flags = (int)fShadow.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fShadow.setBoolean(field_1_grpfChp, value); } /** - * + * Character is drawn with a shadow * @return the fShadow field value. */ public boolean isFShadow() { - return fShadow.isSet(field_1_format_flags); + return fShadow.isSet(field_1_grpfChp); } /** * Sets the fLowerCase field value. - * + * Character is displayed in lower case. This field may be set to 1 only when chp.fSmallCaps is 1. */ - public void setFLowerCase(boolean value) + public void setFLowerCase( boolean value ) { - field_1_format_flags = (int)fLowerCase.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fLowerCase.setBoolean(field_1_grpfChp, value); } /** - * + * Character is displayed in lower case. This field may be set to 1 only when chp.fSmallCaps is 1. * @return the fLowerCase field value. */ public boolean isFLowerCase() { - return fLowerCase.isSet(field_1_format_flags); + return fLowerCase.isSet(field_1_grpfChp); } /** * Sets the fData field value. - * + * 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) */ - public void setFData(boolean value) + public void setFData( boolean value ) { - field_1_format_flags = (int)fData.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fData.setBoolean(field_1_grpfChp, value); } /** - * + * 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) * @return the fData field value. */ public boolean isFData() { - return fData.isSet(field_1_format_flags); + return fData.isSet(field_1_grpfChp); } /** * Sets the fOle2 field value. - * + * 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). */ - public void setFOle2(boolean value) + public void setFOle2( boolean value ) { - field_1_format_flags = (int)fOle2.setBoolean(field_1_format_flags, value); + field_1_grpfChp = (int)fOle2.setBoolean(field_1_grpfChp, value); } /** - * + * 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). * @return the fOle2 field value. */ public boolean isFOle2() { - return fOle2.isSet(field_1_format_flags); + return fOle2.isSet(field_1_grpfChp); } /** * Sets the fEmboss field value. - * + * Text is embossed */ - public void setFEmboss(boolean value) + public void setFEmboss( boolean value ) { - field_2_format_flags1 = (int)fEmboss.setBoolean(field_2_format_flags1, value); + field_1_grpfChp = (int)fEmboss.setBoolean(field_1_grpfChp, value); } /** - * + * Text is embossed * @return the fEmboss field value. */ public boolean isFEmboss() { - return fEmboss.isSet(field_2_format_flags1); + return fEmboss.isSet(field_1_grpfChp); } /** * Sets the fImprint field value. - * + * Text is engraved */ - public void setFImprint(boolean value) + public void setFImprint( boolean value ) { - field_2_format_flags1 = (int)fImprint.setBoolean(field_2_format_flags1, value); + field_1_grpfChp = (int)fImprint.setBoolean(field_1_grpfChp, value); } /** - * + * Text is engraved * @return the fImprint field value. */ public boolean isFImprint() { - return fImprint.isSet(field_2_format_flags1); + return fImprint.isSet(field_1_grpfChp); } /** * Sets the fDStrike field value. - * + * Displayed with double strikethrough */ - public void setFDStrike(boolean value) + public void setFDStrike( boolean value ) { - field_2_format_flags1 = (int)fDStrike.setBoolean(field_2_format_flags1, value); + field_1_grpfChp = (int)fDStrike.setBoolean(field_1_grpfChp, value); } /** - * + * Displayed with double strikethrough * @return the fDStrike field value. */ public boolean isFDStrike() { - return fDStrike.isSet(field_2_format_flags1); + return fDStrike.isSet(field_1_grpfChp); } /** * Sets the fUsePgsuSettings field value. - * + * Used internally by Word */ - public void setFUsePgsuSettings(boolean value) + public void setFUsePgsuSettings( boolean value ) { - field_2_format_flags1 = (int)fUsePgsuSettings.setBoolean(field_2_format_flags1, value); + field_1_grpfChp = (int)fUsePgsuSettings.setBoolean(field_1_grpfChp, value); } /** - * + * Used internally by Word * @return the fUsePgsuSettings field value. */ public boolean isFUsePgsuSettings() { - return fUsePgsuSettings.isSet(field_2_format_flags1); + return fUsePgsuSettings.isSet(field_1_grpfChp); } /** - * Sets the icoHighlight field value. - * Highlight color (see chp.ico) + * Sets the fBoldBi field value. + * Complex Scripts text is bold */ - public void setIcoHighlight(byte value) + public void setFBoldBi( boolean value ) { - field_32_Highlight = (short)icoHighlight.setValue(field_32_Highlight, value); + field_1_grpfChp = (int)fBoldBi.setBoolean(field_1_grpfChp, value); } /** - * Highlight color (see chp.ico) - * @return the icoHighlight field value. + * Complex Scripts text is bold + * @return the fBoldBi field value. */ - public byte getIcoHighlight() + public boolean isFBoldBi() { - return ( byte )icoHighlight.getValue(field_32_Highlight); + return fBoldBi.isSet(field_1_grpfChp); } /** - * Sets the fHighlight field value. - * When 1, characters are highlighted with color specified by chp.icoHighlight + * Sets the fComplexScripts field value. + * Complex Scripts text that requires special processing to display and process */ - public void setFHighlight(boolean value) + public void setFComplexScripts( boolean value ) { - field_32_Highlight = (short)fHighlight.setBoolean(field_32_Highlight, value); + field_1_grpfChp = (int)fComplexScripts.setBoolean(field_1_grpfChp, value); } /** - * When 1, characters are highlighted with color specified by chp.icoHighlight - * @return the fHighlight field value. + * Complex Scripts text that requires special processing to display and process + * @return the fComplexScripts field value. */ - public boolean isFHighlight() + public boolean isFComplexScripts() { - return fHighlight.isSet(field_32_Highlight); + return fComplexScripts.isSet(field_1_grpfChp); } /** - * Sets the fNavHighlight field value. - * Used internally by Word + * Sets the fItalicBi field value. + * Complex Scripts text is italics */ - public void setFNavHighlight(boolean value) + public void setFItalicBi( boolean value ) { - field_32_Highlight = (short)fNavHighlight.setBoolean(field_32_Highlight, value); + field_1_grpfChp = (int)fItalicBi.setBoolean(field_1_grpfChp, value); } /** - * Used internally by Word - * @return the fNavHighlight field value. + * Complex Scripts text is italics + * @return the fItalicBi field value. */ - public boolean isFNavHighlight() + public boolean isFItalicBi() { - return fNavHighlight.isSet(field_32_Highlight); + return fItalicBi.isSet(field_1_grpfChp); } /** - * Sets the iatrUndetType field value. - * Used internally by Word + * Sets the fBiDi field value. + * 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) */ - public void setIatrUndetType(byte value) + public void setFBiDi( boolean value ) { - field_33_InternalFlags = (short)iatrUndetType.setValue(field_33_InternalFlags, value); + field_1_grpfChp = (int)fBiDi.setBoolean(field_1_grpfChp, value); } /** - * Used internally by Word - * @return the iatrUndetType field value. + * 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) + * @return the fBiDi field value. */ - public byte getIatrUndetType() + public boolean isFBiDi() { - return ( byte )iatrUndetType.getValue(field_33_InternalFlags); + return fBiDi.isSet(field_1_grpfChp); } /** - * Sets the fUlGap field value. - * Used internally by Word 8 + * Sets the itypFELayout field value. + * */ - public void setFUlGap(boolean value) + public void setItypFELayout( short value ) { - field_33_InternalFlags = (short)fUlGap.setBoolean(field_33_InternalFlags, value); + field_28_ufel = (short)itypFELayout.setValue(field_28_ufel, value); } /** - * Used internally by Word 8 - * @return the fUlGap field value. + * + * @return the itypFELayout field value. */ - public boolean isFUlGap() + public short getItypFELayout() { - return fUlGap.isSet(field_33_InternalFlags); + return ( short )itypFELayout.getValue(field_28_ufel); } /** - * Sets the fScriptAnchor field value. - * Used internally by Word + * Sets the fTNY field value. + * Tatenakayoko: Horizontal–in-vertical (range of text in a direction perpendicular to the text flow) is used */ - public void setFScriptAnchor(boolean value) + public void setFTNY( boolean value ) { - field_33_InternalFlags = (short)fScriptAnchor.setBoolean(field_33_InternalFlags, value); + field_28_ufel = (short)fTNY.setBoolean(field_28_ufel, value); } /** - * Used internally by Word - * @return the fScriptAnchor field value. + * Tatenakayoko: Horizontal–in-vertical (range of text in a direction perpendicular to the text flow) is used + * @return the fTNY field value. */ - public boolean isFScriptAnchor() + public boolean isFTNY() { - return fScriptAnchor.isSet(field_33_InternalFlags); + return fTNY.isSet(field_28_ufel); } /** - * Sets the fFixedObj field value. - * Used internally by Word + * Sets the fWarichu field value. + * Two lines in one (text in the group is displayed as two half-height lines within a line) */ - public void setFFixedObj(boolean value) + public void setFWarichu( boolean value ) { - field_33_InternalFlags = (short)fFixedObj.setBoolean(field_33_InternalFlags, value); + field_28_ufel = (short)fWarichu.setBoolean(field_28_ufel, value); } /** - * Used internally by Word - * @return the fFixedObj field value. + * Two lines in one (text in the group is displayed as two half-height lines within a line) + * @return the fWarichu field value. */ - public boolean isFFixedObj() + public boolean isFWarichu() { - return fFixedObj.isSet(field_33_InternalFlags); + return fWarichu.isSet(field_28_ufel); } /** - * Sets the spare2 field value. - * Not used + * Sets the fKumimoji field value. + * combine characters */ - public void setSpare2(boolean value) + public void setFKumimoji( boolean value ) { - field_33_InternalFlags = (short)spare2.setBoolean(field_33_InternalFlags, value); + field_28_ufel = (short)fKumimoji.setBoolean(field_28_ufel, value); } /** - * Not used - * @return the spare2 field value. + * combine characters + * @return the fKumimoji field value. */ - public boolean isSpare2() + public boolean isFKumimoji() { - return spare2.isSet(field_33_InternalFlags); + return fKumimoji.isSet(field_28_ufel); } /** - * Sets the fChsDiff field value. - * Pre-Unicode files, char's char set different from FIB char set + * Sets the fRuby field value. + * Phonetic guide */ - public void setFChsDiff(boolean value) + public void setFRuby( boolean value ) { - field_34_EncodingFlags = (short)fChsDiff.setBoolean(field_34_EncodingFlags, value); + field_28_ufel = (short)fRuby.setBoolean(field_28_ufel, value); } /** - * Pre-Unicode files, char's char set different from FIB char set - * @return the fChsDiff field value. + * Phonetic guide + * @return the fRuby field value. */ - public boolean isFChsDiff() + public boolean isFRuby() { - return fChsDiff.isSet(field_34_EncodingFlags); + return fRuby.isSet(field_28_ufel); } /** - * Sets the fMacChs field value. - * fTrue if char's are Macintosh char set + * Sets the fLSFitText field value. + * fit text */ - public void setFMacChs(boolean value) + public void setFLSFitText( boolean value ) { - field_34_EncodingFlags = (short)fMacChs.setBoolean(field_34_EncodingFlags, value); + field_28_ufel = (short)fLSFitText.setBoolean(field_28_ufel, value); } /** - * fTrue if char's are Macintosh char set - * @return the fMacChs field value. + * fit text + * @return the fLSFitText field value. */ - public boolean isFMacChs() + public boolean isFLSFitText() { - return fMacChs.isSet(field_34_EncodingFlags); + return fLSFitText.isSet(field_28_ufel); } /** - * Sets the fFtcAsciSym field value. - * Used internally by Word + * Sets the spare field value. + * Unused */ - public void setFFtcAsciSym(boolean value) + public void setSpare( byte value ) { - field_34_EncodingFlags = (short)fFtcAsciSym.setBoolean(field_34_EncodingFlags, value); + field_28_ufel = (short)spare.setValue(field_28_ufel, value); } /** - * Used internally by Word - * @return the fFtcAsciSym field value. + * Unused + * @return the spare field value. */ - public boolean isFFtcAsciSym() + public byte getSpare() { - return fFtcAsciSym.isSet(field_34_EncodingFlags); + return ( byte )spare.getValue(field_28_ufel); } /** - * Sets the fFtcReq field value. - * Used internally by Word + * Sets the iWarichuBracket field value. + * Bracket character for two-lines-in-one */ - public void setFFtcReq(boolean value) + public void setIWarichuBracket( byte value ) { - field_34_EncodingFlags = (short)fFtcReq.setBoolean(field_34_EncodingFlags, value); + field_29_copt = (byte)iWarichuBracket.setValue(field_29_copt, value); } /** - * Used internally by Word - * @return the fFtcReq field value. + * Bracket character for two-lines-in-one + * @return the iWarichuBracket field value. */ - public boolean isFFtcReq() + public byte getIWarichuBracket() { - return fFtcReq.isSet(field_34_EncodingFlags); + return ( byte )iWarichuBracket.getValue(field_29_copt); } /** - * Sets the fLangApplied field value. - * Used internally by Word + * Sets the fWarichuNoOpenBracket field value. + * Two-lines-in-one uses no open */ - public void setFLangApplied(boolean value) + public void setFWarichuNoOpenBracket( boolean value ) { - field_34_EncodingFlags = (short)fLangApplied.setBoolean(field_34_EncodingFlags, value); + field_29_copt = (byte)fWarichuNoOpenBracket.setBoolean(field_29_copt, value); } /** - * Used internally by Word - * @return the fLangApplied field value. + * Two-lines-in-one uses no open + * @return the fWarichuNoOpenBracket field value. */ - public boolean isFLangApplied() + public boolean isFWarichuNoOpenBracket() { - return fLangApplied.isSet(field_34_EncodingFlags); + return fWarichuNoOpenBracket.isSet(field_29_copt); } /** - * Sets the fSpareLangApplied field value. - * Used internally by Word + * Sets the fTNYCompress field value. + * fit text in line */ - public void setFSpareLangApplied(boolean value) + public void setFTNYCompress( boolean value ) { - field_34_EncodingFlags = (short)fSpareLangApplied.setBoolean(field_34_EncodingFlags, value); + field_29_copt = (byte)fTNYCompress.setBoolean(field_29_copt, value); } /** - * Used internally by Word - * @return the fSpareLangApplied field value. + * fit text in line + * @return the fTNYCompress field value. */ - public boolean isFSpareLangApplied() + public boolean isFTNYCompress() { - return fSpareLangApplied.isSet(field_34_EncodingFlags); + return fTNYCompress.isSet(field_29_copt); } /** - * Sets the fForcedCvAuto field value. - * Used internally by Word + * Sets the fTNYFetchTxm field value. + * fetch text metrics */ - public void setFForcedCvAuto(boolean value) + public void setFTNYFetchTxm( boolean value ) { - field_34_EncodingFlags = (short)fForcedCvAuto.setBoolean(field_34_EncodingFlags, value); + field_29_copt = (byte)fTNYFetchTxm.setBoolean(field_29_copt, value); } /** - * Used internally by Word - * @return the fForcedCvAuto field value. + * fetch text metrics + * @return the fTNYFetchTxm field value. + */ + public boolean isFTNYFetchTxm() + { + return fTNYFetchTxm.isSet(field_29_copt); + + } + + /** + * Sets the fCellFitText field value. + * Fit text in cell + */ + public void setFCellFitText( boolean value ) + { + field_29_copt = (byte)fCellFitText.setBoolean(field_29_copt, value); + + + } + + /** + * Fit text in cell + * @return the fCellFitText field value. */ - public boolean isFForcedCvAuto() + public boolean isFCellFitText() { - return fForcedCvAuto.isSet(field_34_EncodingFlags); + return fCellFitText.isSet(field_29_copt); } + /** + * Sets the unused field value. + * Not used + */ + public void setUnused( boolean value ) + { + field_29_copt = (byte)unused.setBoolean(field_29_copt, value); + + + } + + /** + * Not used + * @return the unused field value. + */ + public boolean isUnused() + { + return unused.isSet(field_29_copt); + + } + /** + * Sets the icoHighlight field value. + * Highlight color (see chp.ico) + */ + public void setIcoHighlight( byte value ) + { + field_47_Highlight = (short)icoHighlight.setValue(field_47_Highlight, value); + + + } + + /** + * Highlight color (see chp.ico) + * @return the icoHighlight field value. + */ + public byte getIcoHighlight() + { + return ( byte )icoHighlight.getValue(field_47_Highlight); + + } + + /** + * Sets the fHighlight field value. + * When 1, characters are highlighted with color specified by chp.icoHighlight + */ + public void setFHighlight( boolean value ) + { + field_47_Highlight = (short)fHighlight.setBoolean(field_47_Highlight, value); + + + } + + /** + * When 1, characters are highlighted with color specified by chp.icoHighlight + * @return the fHighlight field value. + */ + public boolean isFHighlight() + { + return fHighlight.isSet(field_47_Highlight); + + } + + /** + * Sets the fChsDiff field value. + * Pre-Unicode files, char's char set different from FIB char set + */ + public void setFChsDiff( boolean value ) + { + field_48_CharsetFlags = (short)fChsDiff.setBoolean(field_48_CharsetFlags, value); + + + } + + /** + * Pre-Unicode files, char's char set different from FIB char set + * @return the fChsDiff field value. + */ + public boolean isFChsDiff() + { + return fChsDiff.isSet(field_48_CharsetFlags); + + } + + /** + * Sets the fMacChs field value. + * fTrue if char's are Macintosh char set + */ + public void setFMacChs( boolean value ) + { + field_48_CharsetFlags = (short)fMacChs.setBoolean(field_48_CharsetFlags, value); + + + } + + /** + * fTrue if char's are Macintosh char set + * @return the fMacChs field value. + */ + public boolean isFMacChs() + { + return fMacChs.isSet(field_48_CharsetFlags); + + } -} +} // END OF CLASS diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/HRESIAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/HRESIAbstractType.java new file mode 100644 index 0000000000..03a026b8cc --- /dev/null +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/HRESIAbstractType.java @@ -0,0 +1,133 @@ +/* ==================================================================== + 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. +==================================================================== */ + +package org.apache.poi.hwpf.model.types; + +/** + * Hyphenation (HRESI). + *

    + * Class and fields descriptions are quoted from Microsoft Office Word 97-2007 + * Binary File Format (.doc) Specification + * + * NOTE: This source is automatically generated please do not modify this file. + * Either subclass or remove the record in src/types/definitions. + * + * @author Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary + * File Format (.doc) Specification + */ +public abstract class HRESIAbstractType +{ + + protected byte field_1_hres; + /**/public final static byte HRES_NO = 0; + /**/public final static byte HRES_NORMAL = 1; + /**/public final static byte HRES_ADD_LETTER_BEFORE = 2; + /**/public final static byte HRES_CHANGE_LETTER_BEFORE = 3; + /**/public final static byte HRES_DELETE_LETTER_BEFORE = 4; + /**/public final static byte HRES_CHANGE_LETTER_AFTER = 5; + /**/public final static byte HRES_DELETE_BEFORE_CHANGE_BEFORE = 6; + protected byte field_2_chHres; + + protected HRESIAbstractType() + { + } + + protected void fillFields( byte[] data, int offset ) + { + field_1_hres = data[ 0x0 + offset ]; + field_2_chHres = data[ 0x1 + offset ]; + } + + public void serialize( byte[] data, int offset ) + { + data[ 0x0 + offset] = field_1_hres; + data[ 0x1 + offset] = field_2_chHres; + } + + /** + * Size of record (exluding 4 byte header) + */ + public static int getSize() + { + return 4 + + 1 + 1; + } + + public String toString() + { + StringBuilder builder = new StringBuilder(); + builder.append("[HRESI]\n"); + builder.append(" .hres = "); + builder.append(" (").append(getHres()).append(" )\n"); + builder.append(" .chHres = "); + builder.append(" (").append(getChHres()).append(" )\n"); + + builder.append("[/HRESI]\n"); + return builder.toString(); + } + + /** + * Hyphenation rule. + * + * @return One of + *

  • {@link #HRES_NO} + *
  • {@link #HRES_NORMAL} + *
  • {@link #HRES_ADD_LETTER_BEFORE} + *
  • {@link #HRES_CHANGE_LETTER_BEFORE} + *
  • {@link #HRES_DELETE_LETTER_BEFORE} + *
  • {@link #HRES_CHANGE_LETTER_AFTER} + *
  • {@link #HRES_DELETE_BEFORE_CHANGE_BEFORE} + */ + public byte getHres() + { + return field_1_hres; + } + + /** + * Hyphenation rule. + * + * @param field_1_hres + * One of + *
  • {@link #HRES_NO} + *
  • {@link #HRES_NORMAL} + *
  • {@link #HRES_ADD_LETTER_BEFORE} + *
  • {@link #HRES_CHANGE_LETTER_BEFORE} + *
  • {@link #HRES_DELETE_LETTER_BEFORE} + *
  • {@link #HRES_CHANGE_LETTER_AFTER} + *
  • {@link #HRES_DELETE_BEFORE_CHANGE_BEFORE} + */ + public void setHres( byte field_1_hres ) + { + this.field_1_hres = field_1_hres; + } + + /** + * The character that will be used to add or change a letter when hres is 2, 3, 5 or 6. + */ + public byte getChHres() + { + return field_2_chHres; + } + + /** + * The character that will be used to add or change a letter when hres is 2, 3, 5 or 6. + */ + public void setChHres( byte field_2_chHres ) + { + this.field_2_chHres = field_2_chHres; + } + +} // END OF CLASS diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmCompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmCompressor.java index e653827819..27bc5a48ef 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmCompressor.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmCompressor.java @@ -209,9 +209,9 @@ public final class CharacterSprmCompressor { size += SprmUtils.addSprm((short)0x484b, newCHP.getHpsKern(), null, sprmList); } - if (newCHP.getYsr() != oldCHP.getYsr()) + if (newCHP.getHresi().equals( oldCHP.getHresi() )) { - size += SprmUtils.addSprm((short)0x484e, newCHP.getYsr(), null, sprmList); + size += SprmUtils.addSprm((short)0x484e, newCHP.getHresi().getValue(), null, sprmList); } if (newCHP.getFtcAscii() != oldCHP.getFtcAscii()) { diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java index fefd7afc0d..52c915f4d2 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java @@ -17,6 +17,7 @@ package org.apache.poi.hwpf.sprm; +import org.apache.poi.hwpf.model.Hyphenation; import org.apache.poi.hwpf.usermodel.BorderCode; import org.apache.poi.hwpf.usermodel.CharacterProperties; import org.apache.poi.hwpf.usermodel.DateAndTime; @@ -437,18 +438,25 @@ public final class CharacterSprmUncompressor extends SprmUncompressor case 0x4b: newCHP.setHpsKern (sprm.getOperand()); break; - case 0x4c: -// unCompressCHPOperation (oldCHP, newCHP, 0x47, param, varParam, -// styleSheet, opSize); - break; - case 0x4d: - float percentage = sprm.getOperand() / 100.0f; - int add = (int) (percentage * newCHP.getHps ()); - newCHP.setHps (newCHP.getHps () + add); - break; - case 0x4e: - newCHP.setYsr ((byte) sprm.getOperand()); - break; + // Microsoft Office Word 97-2007 Binary File Format (.doc) Specification + // Page 59 of 210 + case 0x4c: + // sprmCMajority50 -- 0xCA4C + // unCompressCHPOperation (oldCHP, newCHP, 0x47, param, varParam, + // styleSheet, opSize); + break; + case 0x4d: + // sprmCHpsMul -- 0x4A4D + float percentage = sprm.getOperand() / 100.0f; + int add = (int) ( percentage * newCHP.getHps() ); + newCHP.setHps( newCHP.getHps() + add ); + break; + case 0x4e: + // sprmCHresi -- 0x484e + Hyphenation hyphenation = new Hyphenation( + (short) sprm.getOperand() ); + newCHP.setHresi( hyphenation ); + break; case 0x4f: newCHP.setFtcAscii ((short) sprm.getOperand()); break; @@ -473,13 +481,25 @@ public final class CharacterSprmUncompressor extends SprmUncompressor case 0x56: newCHP.setFObj (getFlag (sprm.getOperand())); break; - case 0x57: - byte[] buf = sprm.getGrpprl(); - int offset = sprm.getGrpprlOffset(); - newCHP.setFPropMark (buf[offset]); - newCHP.setIbstPropRMark (LittleEndian.getShort (buf, offset + 1)); - newCHP.setDttmPropRMark (new DateAndTime(buf, offset +3)); - break; + case 0x57: + // sprmCPropRMark -- 0xCA57 + /* + * Microsoft Office Word 97-2007 Binary File Format (.doc) + * Specification + * + * Page 78 of 210 + * + * 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. + */ + byte[] buf = sprm.getGrpprl(); + int offset = sprm.getGrpprlOffset(); + newCHP.setFPropRMark( buf[offset] != 0 ); + newCHP.setIbstPropRMark( LittleEndian.getShort( buf, offset + 1 ) ); + newCHP.setDttmPropRMark( new DateAndTime( buf, offset + 3 ) ); + break; case 0x58: newCHP.setFEmboss (getFlag (sprm.getOperand())); break; @@ -509,16 +529,29 @@ public final class CharacterSprmUncompressor extends SprmUncompressor case 0x61: // sprmCHpsBi break; - case 0x62: - byte[] xstDispFldRMark = new byte[32]; - buf = sprm.getGrpprl(); - offset = sprm.getGrpprlOffset(); - newCHP.setFDispFldRMark (buf[offset]); - newCHP.setIbstDispFldRMark (LittleEndian.getShort (buf, offset + 1)); - newCHP.setDttmDispFldRMark (new DateAndTime(buf, offset + 3)); - System.arraycopy (buf, offset + 7, xstDispFldRMark, 0, 32); - newCHP.setXstDispFldRMark (xstDispFldRMark); - break; + case 0x62: + // sprmCDispFldRMark -- 0xCA62 + /* + * Microsoft Office Word 97-2007 Binary File Format (.doc) + * Specification + * + * Page 78 of 210 + * + * 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. + */ + byte[] xstDispFldRMark = new byte[32]; + buf = sprm.getGrpprl(); + offset = sprm.getGrpprlOffset(); + newCHP.setFDispFldRMark( 0 != buf[offset] ); + newCHP.setIbstDispFldRMark( LittleEndian.getShort( buf, offset + 1 ) ); + newCHP.setDttmDispFldRMark( new DateAndTime( buf, offset + 3 ) ); + System.arraycopy( buf, offset + 7, xstDispFldRMark, 0, 32 ); + newCHP.setXstDispFldRMark( xstDispFldRMark ); + break; case 0x63: newCHP.setIbstRMarkDel ((short) sprm.getOperand()); break; diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java index 4a88b19f64..aef7714f23 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterProperties.java @@ -80,20 +80,8 @@ public final class CharacterProperties public CharacterProperties() { - setDttmRMark( new DateAndTime() ); - setDttmRMarkDel( new DateAndTime() ); - setDttmPropRMark( new DateAndTime() ); - setDttmDispFldRMark( new DateAndTime() ); + setFUsePgsuSettings( true ); setXstDispFldRMark( new byte[36] ); - setShd( new ShadingDescriptor() ); - setBrc( new BorderCode() ); - - setFcPic( -1 ); - setHps( 20 ); - setIstd( 10 ); - setWCharScale( 100 ); - setLidDefault( 0x0400 ); - setLidFE( 0x0400 ); } public boolean isMarkedDeleted() @@ -294,7 +282,7 @@ public final class CharacterProperties public void setVerticalOffset(int hpsPos) { - super.setHpsPos(hpsPos); + super.setHpsPos((short) hpsPos); } public int getKerning() diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java index 02068d0471..763ad2a638 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java @@ -397,7 +397,7 @@ public final class CharacterRun public void setVerticalOffset(int hpsPos) { - _props.setHpsPos(hpsPos); + _props.setHpsPos((short) hpsPos); _chpx.updateSprm(SPRM_HPSPOS, (byte)hpsPos); } 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 @@ AbstractType @@ -23,91 +23,331 @@ Character Properties. S. Ryan Ackley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ + + + + AbstractType + Hyphenation (HRESI). <p>Class and fields descriptions are + quoted from + Microsoft Office Word 97-2007 Binary File Format (.doc) Specification + + Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format (.doc) + Specification + + + + + + + + + + + + + + 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 Abstrac - - protected void fillFields(byte[] data, int offset) - { + + +protected void fillFields( byte[] data, int offset ) + { + - - = ; - - } + + + + + = + + ; + + + + } + - public void serialize(byte[] data, int offset) + + + + public void serialize( byte[] data, int offset ) { + - - ; - - } - + + + + + + + + } + /** * Size of record (exluding 4 byte header) */ @@ -182,7 +200,7 @@ public abstract class Abstrac * Sets the field value. * */ - public void set( value) + public void set( value ) { = ; @@ -284,7 +302,7 @@ public abstract class Abstrac * @param * One of */ - public void set( ) + public void set( ) { this. = ; } -- 2.39.5