From: Sergey Vladimirov Date: Tue, 20 Sep 2011 14:12:44 +0000 (+0000) Subject: add tabs handling and additional SPRMs; update ShadingDescription definition (in... X-Git-Tag: REL_3_8_BETA5~153 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b3ddfb24dc86b0ba8f6c75ce0e550d6b424203e;p=poi.git add tabs handling and additional SPRMs; update ShadingDescription definition (in fact, replace) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1173157 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/util/LittleEndian.java b/src/java/org/apache/poi/util/LittleEndian.java index f13fbf6a8e..9aab8012bd 100644 --- a/src/java/org/apache/poi/util/LittleEndian.java +++ b/src/java/org/apache/poi/util/LittleEndian.java @@ -226,7 +226,6 @@ public class LittleEndian implements LittleEndianConsts { data[i++] = (byte)((value >>> 24) & 0xFF); } - /** * put an int value into beginning of a byte array * @@ -237,6 +236,32 @@ public class LittleEndian implements LittleEndianConsts { putInt(data, 0, value); } + /** + * put an unsigned int value into a byte array + * + * @param data the byte array + * @param offset a starting offset into the byte array + * @param value the int (32-bit) value + * + * @exception ArrayIndexOutOfBoundsException may be thrown + */ + public static void putUInt(byte[] data, int offset, long value) { + int i = offset; + data[i++] = (byte)((value >>> 0) & 0xFF); + data[i++] = (byte)((value >>> 8) & 0xFF); + data[i++] = (byte)((value >>> 16) & 0xFF); + data[i++] = (byte)((value >>> 24) & 0xFF); + } + + /** + * put an unsigned int value into beginning of a byte array + * + *@param data the byte array + *@param value the int (32-bit) value + */ + public static void putUInt(byte[] data, long value) { + putUInt(data, 0, value); + } /** * put a long value into a byte array diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/Colorref.java b/src/scratchpad/src/org/apache/poi/hwpf/model/Colorref.java index f4281d9d26..6162f137fb 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/Colorref.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/Colorref.java @@ -27,6 +27,48 @@ import org.apache.poi.util.LittleEndian; @Internal public class Colorref implements Cloneable { + public static Colorref valueOfIco( int ico ) + { + + switch ( ico ) + { + case 1: + return new Colorref( 0x00000000 ); + case 2: + return new Colorref( 0x00FF0000 ); + case 3: + return new Colorref( 0x00FFFF00 ); + case 4: + return new Colorref( 0x0000FF00 ); + case 5: + return new Colorref( 0x00FF00FF ); + case 6: + return new Colorref( 0x000000FF ); + case 7: + return new Colorref( 0x0000FFFF ); + case 8: + return new Colorref( 0x00FFFFFF ); + case 9: + return new Colorref( 0x008B0000 ); + case 10: + return new Colorref( 0x008B8B00 ); + case 11: + return new Colorref( 0x00006400 ); + case 12: + return new Colorref( 0x008B008B ); + case 13: + return new Colorref( 0x0000008B ); + case 14: + return new Colorref( 0x0000CCFF ); + case 15: + return new Colorref( 0x00A9A9A9 ); + case 16: + return new Colorref( 0x00C0C0C0 ); + default: + return new Colorref( 0x00000000 ); + } + } + private int value; public Colorref() @@ -81,6 +123,11 @@ public class Colorref implements Cloneable return value == -1; } + public void serialize( byte[] data, int offset ) + { + LittleEndian.putInt( data, offset, this.value ); + } + public void setValue( int value ) { this.value = value; @@ -93,7 +140,7 @@ public class Colorref implements Cloneable "Structure state (EMPTY) is not good for serialization" ); byte[] bs = new byte[4]; - LittleEndian.putInt( bs, 0, this.value ); + serialize( bs, 0 ); return bs; } diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/TabDescriptor.java b/src/scratchpad/src/org/apache/poi/hwpf/model/TabDescriptor.java new file mode 100644 index 0000000000..472b667b58 --- /dev/null +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/TabDescriptor.java @@ -0,0 +1,46 @@ +/* ==================================================================== + 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.TBDAbstractType; +import org.apache.poi.hwpf.usermodel.ParagraphProperties; + +/** + * Tab descriptor. Part of {@link ParagraphProperties}. + * + * @author vlsergey + */ +public class TabDescriptor extends TBDAbstractType +{ + + public TabDescriptor() + { + } + + public TabDescriptor( byte[] bytes, int offset ) + { + fillFields( bytes, offset ); + } + + public byte[] toByteArray() + { + byte[] buf = new byte[getSize()]; + serialize( buf, 0 ); + return buf; + } + +} diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/PAPAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/PAPAbstractType.java index cfb3951b28..5415f18248 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/types/PAPAbstractType.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/PAPAbstractType.java @@ -17,6 +17,8 @@ package org.apache.poi.hwpf.model.types; + +import org.apache.poi.hwpf.model.TabDescriptor; import org.apache.poi.hwpf.usermodel.BorderCode; import org.apache.poi.hwpf.usermodel.DateAndTime; import org.apache.poi.hwpf.usermodel.DropCapSpecifier; @@ -27,8 +29,12 @@ import org.apache.poi.util.Internal; /** * Paragraph Properties. + *

* NOTE: This source is automatically generated please do not modify this file. Either subclass or - * remove the record in src/records/definitions. + * remove the record in src/types/definitions. + *

+ * This class is internal. It content or properties may change without notice + * due to changes in our knowledge of internal Microsoft Word binary structures. * @author S. Ryan Ackley */ @@ -42,16 +48,16 @@ public abstract class PAPAbstractType protected boolean field_4_fKeepFollow; protected boolean field_5_fPageBreakBefore; protected byte field_6_brcl; - /**/public final static byte BRCL_SINGLE = 0; - /**/public final static byte BRCL_THICK = 1; - /**/public final static byte BRCL_DOUBLE = 2; - /**/public final static byte BRCL_SHADOW = 3; + /**/protected final static byte BRCL_SINGLE = 0; + /**/protected final static byte BRCL_THICK = 1; + /**/protected final static byte BRCL_DOUBLE = 2; + /**/protected final static byte BRCL_SHADOW = 3; protected byte field_7_brcp; - /**/public final static byte BRCP_NONE = 0; - /**/public final static byte BRCP_BORDER_ABOVE = 1; - /**/public final static byte BRCP_BORDER_BELOW = 2; - /**/public final static byte BRCP_BOX_AROUND = 15; - /**/public final static byte BRCP_BAR_TO_LEFT_OF_PARAGRAPH = 16; + /**/protected final static byte BRCP_NONE = 0; + /**/protected final static byte BRCP_BORDER_ABOVE = 1; + /**/protected final static byte BRCP_BORDER_BELOW = 2; + /**/protected final static byte BRCP_BOX_AROUND = 15; + /**/protected final static byte BRCP_BAR_TO_LEFT_OF_PARAGRAPH = 16; protected byte field_8_ilvl; protected int field_9_ilfo; protected boolean field_10_fNoLnn; @@ -72,8 +78,8 @@ public abstract class PAPAbstractType protected boolean field_25_fNoAutoHyph; protected int field_26_dyaHeight; protected boolean field_27_fMinHeight; - /**/public final static boolean FMINHEIGHT_EXACT = false; - /**/public final static boolean FMINHEIGHT_AT_LEAST = true; + /**/protected final static boolean FMINHEIGHT_EXACT = false; + /**/protected final static boolean FMINHEIGHT_AT_LEAST = true; protected DropCapSpecifier field_28_dcs; protected int field_29_dyaFromText; protected int field_30_dxaFromText; @@ -86,15 +92,15 @@ public abstract class PAPAbstractType protected boolean field_37_fAutoSpaceDE; protected boolean field_38_fAutoSpaceDN; protected int field_39_wAlignFont; - /**/public final static byte WALIGNFONT_HANGING = 0; - /**/public final static byte WALIGNFONT_CENTERED = 1; - /**/public final static byte WALIGNFONT_ROMAN = 2; - /**/public final static byte WALIGNFONT_VARIABLE = 3; - /**/public final static byte WALIGNFONT_AUTO = 4; + /**/protected final static byte WALIGNFONT_HANGING = 0; + /**/protected final static byte WALIGNFONT_CENTERED = 1; + /**/protected final static byte WALIGNFONT_ROMAN = 2; + /**/protected final static byte WALIGNFONT_VARIABLE = 3; + /**/protected final static byte WALIGNFONT_AUTO = 4; protected short field_40_fontAlign; - private static BitField fVertical = new BitField(0x0001); - private static BitField fBackward = new BitField(0x0002); - private static BitField fRotateFont = new BitField(0x0004); + /**/private static BitField fVertical = new BitField(0x0001); + /**/private static BitField fBackward = new BitField(0x0002); + /**/private static BitField fRotateFont = new BitField(0x0004); protected byte field_41_lvl; protected boolean field_42_fBiDi; protected boolean field_43_fNumRMIns; @@ -114,24 +120,26 @@ public abstract class PAPAbstractType protected int field_57_dxaLeft; protected int field_58_dxaLeft1; protected byte field_59_jc; - protected boolean field_60_fNoAllowOverlap; - protected BorderCode field_61_brcTop; - protected BorderCode field_62_brcLeft; - protected BorderCode field_63_brcBottom; - protected BorderCode field_64_brcRight; - protected BorderCode field_65_brcBetween; - protected BorderCode field_66_brcBar; - protected ShadingDescriptor field_67_shd; - protected byte[] field_68_anld; - protected byte[] field_69_phe; - protected boolean field_70_fPropRMark; - protected int field_71_ibstPropRMark; - protected DateAndTime field_72_dttmPropRMark; - protected int field_73_itbdMac; - protected int[] field_74_rgdxaTab; - protected byte[] field_75_rgtbd; - protected byte[] field_76_numrm; - protected byte[] field_77_ptap; + protected BorderCode field_60_brcTop; + protected BorderCode field_61_brcLeft; + protected BorderCode field_62_brcBottom; + protected BorderCode field_63_brcRight; + protected BorderCode field_64_brcBetween; + protected BorderCode field_65_brcBar; + protected ShadingDescriptor field_66_shd; + protected byte[] field_67_anld; + protected byte[] field_68_phe; + protected boolean field_69_fPropRMark; + protected int field_70_ibstPropRMark; + protected DateAndTime field_71_dttmPropRMark; + protected int field_72_itbdMac; + protected int[] field_73_rgdxaTab; + protected TabDescriptor[] field_74_rgtbd; + protected byte[] field_75_numrm; + protected byte[] field_76_ptap; + protected boolean field_77_fNoAllowOverlap; + protected long field_78_ipgp; + protected long field_79_rsid; protected PAPAbstractType() { @@ -140,20 +148,20 @@ public abstract class PAPAbstractType this.field_28_dcs = new DropCapSpecifier(); this.field_32_fWidowControl = true; this.field_41_lvl = 9; - this.field_61_brcTop = new BorderCode(); - this.field_62_brcLeft = new BorderCode(); - this.field_63_brcBottom = new BorderCode(); - this.field_64_brcRight = new BorderCode(); - this.field_65_brcBetween = new BorderCode(); - this.field_66_brcBar = new BorderCode(); - this.field_67_shd = new ShadingDescriptor(); - this.field_68_anld = new byte[0]; - this.field_69_phe = new byte[0]; - this.field_72_dttmPropRMark = new DateAndTime(); - this.field_74_rgdxaTab = new int[0]; - this.field_75_rgtbd = new byte[0]; - this.field_76_numrm = new byte[0]; - this.field_77_ptap = new byte[0]; + this.field_60_brcTop = new BorderCode(); + this.field_61_brcLeft = new BorderCode(); + this.field_62_brcBottom = new BorderCode(); + this.field_63_brcRight = new BorderCode(); + this.field_64_brcBetween = new BorderCode(); + this.field_65_brcBar = new BorderCode(); + this.field_66_shd = new ShadingDescriptor(); + this.field_67_anld = new byte[0]; + this.field_68_phe = new byte[0]; + this.field_71_dttmPropRMark = new DateAndTime(); + this.field_73_rgdxaTab = new int[0]; + this.field_74_rgtbd = new TabDescriptor[0]; + this.field_75_numrm = new byte[0]; + this.field_76_ptap = new byte[0]; } @@ -282,8 +290,6 @@ public abstract class PAPAbstractType builder.append(" (").append(getDxaLeft1()).append(" )\n"); builder.append(" .jc = "); builder.append(" (").append(getJc()).append(" )\n"); - builder.append(" .fNoAllowOverlap = "); - builder.append(" (").append(getFNoAllowOverlap()).append(" )\n"); builder.append(" .brcTop = "); builder.append(" (").append(getBrcTop()).append(" )\n"); builder.append(" .brcLeft = "); @@ -318,6 +324,12 @@ public abstract class PAPAbstractType builder.append(" (").append(getNumrm()).append(" )\n"); builder.append(" .ptap = "); builder.append(" (").append(getPtap()).append(" )\n"); + builder.append(" .fNoAllowOverlap = "); + builder.append(" (").append(getFNoAllowOverlap()).append(" )\n"); + builder.append(" .ipgp = "); + builder.append(" (").append(getIpgp()).append(" )\n"); + builder.append(" .rsid = "); + builder.append(" (").append(getRsid()).append(" )\n"); builder.append("[/PAP]\n"); return builder.toString(); @@ -326,6 +338,7 @@ public abstract class PAPAbstractType /** * Index to style descriptor. */ + @Internal public int getIstd() { return field_1_istd; @@ -334,7 +347,8 @@ public abstract class PAPAbstractType /** * Index to style descriptor. */ - public void setIstd(int field_1_istd) + @Internal + public void setIstd( int field_1_istd ) { this.field_1_istd = field_1_istd; } @@ -342,6 +356,7 @@ public abstract class PAPAbstractType /** * Get the fSideBySide field for the PAP record. */ + @Internal public boolean getFSideBySide() { return field_2_fSideBySide; @@ -350,7 +365,8 @@ public abstract class PAPAbstractType /** * Set the fSideBySide field for the PAP record. */ - public void setFSideBySide(boolean field_2_fSideBySide) + @Internal + public void setFSideBySide( boolean field_2_fSideBySide ) { this.field_2_fSideBySide = field_2_fSideBySide; } @@ -358,6 +374,7 @@ public abstract class PAPAbstractType /** * Get the fKeep field for the PAP record. */ + @Internal public boolean getFKeep() { return field_3_fKeep; @@ -366,7 +383,8 @@ public abstract class PAPAbstractType /** * Set the fKeep field for the PAP record. */ - public void setFKeep(boolean field_3_fKeep) + @Internal + public void setFKeep( boolean field_3_fKeep ) { this.field_3_fKeep = field_3_fKeep; } @@ -374,6 +392,7 @@ public abstract class PAPAbstractType /** * Get the fKeepFollow field for the PAP record. */ + @Internal public boolean getFKeepFollow() { return field_4_fKeepFollow; @@ -382,7 +401,8 @@ public abstract class PAPAbstractType /** * Set the fKeepFollow field for the PAP record. */ - public void setFKeepFollow(boolean field_4_fKeepFollow) + @Internal + public void setFKeepFollow( boolean field_4_fKeepFollow ) { this.field_4_fKeepFollow = field_4_fKeepFollow; } @@ -390,6 +410,7 @@ public abstract class PAPAbstractType /** * Get the fPageBreakBefore field for the PAP record. */ + @Internal public boolean getFPageBreakBefore() { return field_5_fPageBreakBefore; @@ -398,7 +419,8 @@ public abstract class PAPAbstractType /** * Set the fPageBreakBefore field for the PAP record. */ - public void setFPageBreakBefore(boolean field_5_fPageBreakBefore) + @Internal + public void setFPageBreakBefore( boolean field_5_fPageBreakBefore ) { this.field_5_fPageBreakBefore = field_5_fPageBreakBefore; } @@ -412,6 +434,7 @@ public abstract class PAPAbstractType *

  • {@link #BRCL_DOUBLE} *
  • {@link #BRCL_SHADOW} */ + @Internal public byte getBrcl() { return field_6_brcl; @@ -427,7 +450,8 @@ public abstract class PAPAbstractType *
  • {@link #BRCL_DOUBLE} *
  • {@link #BRCL_SHADOW} */ - public void setBrcl(byte field_6_brcl) + @Internal + public void setBrcl( byte field_6_brcl ) { this.field_6_brcl = field_6_brcl; } @@ -442,6 +466,7 @@ public abstract class PAPAbstractType *
  • {@link #BRCP_BOX_AROUND} *
  • {@link #BRCP_BAR_TO_LEFT_OF_PARAGRAPH} */ + @Internal public byte getBrcp() { return field_7_brcp; @@ -458,7 +483,8 @@ public abstract class PAPAbstractType *
  • {@link #BRCP_BOX_AROUND} *
  • {@link #BRCP_BAR_TO_LEFT_OF_PARAGRAPH} */ - public void setBrcp(byte field_7_brcp) + @Internal + public void setBrcp( byte field_7_brcp ) { this.field_7_brcp = field_7_brcp; } @@ -466,6 +492,7 @@ public abstract class PAPAbstractType /** * List level if non-zero. */ + @Internal public byte getIlvl() { return field_8_ilvl; @@ -474,7 +501,8 @@ public abstract class PAPAbstractType /** * List level if non-zero. */ - public void setIlvl(byte field_8_ilvl) + @Internal + public void setIlvl( byte field_8_ilvl ) { this.field_8_ilvl = field_8_ilvl; } @@ -482,6 +510,7 @@ public abstract class PAPAbstractType /** * 1-based index into the pllfo (lists structure), if non-zero. */ + @Internal public int getIlfo() { return field_9_ilfo; @@ -490,7 +519,8 @@ public abstract class PAPAbstractType /** * 1-based index into the pllfo (lists structure), if non-zero. */ - public void setIlfo(int field_9_ilfo) + @Internal + public void setIlfo( int field_9_ilfo ) { this.field_9_ilfo = field_9_ilfo; } @@ -498,6 +528,7 @@ public abstract class PAPAbstractType /** * No line numbering. */ + @Internal public boolean getFNoLnn() { return field_10_fNoLnn; @@ -506,7 +537,8 @@ public abstract class PAPAbstractType /** * No line numbering. */ - public void setFNoLnn(boolean field_10_fNoLnn) + @Internal + public void setFNoLnn( boolean field_10_fNoLnn ) { this.field_10_fNoLnn = field_10_fNoLnn; } @@ -514,6 +546,7 @@ public abstract class PAPAbstractType /** * Line spacing descriptor. */ + @Internal public LineSpacingDescriptor getLspd() { return field_11_lspd; @@ -522,7 +555,8 @@ public abstract class PAPAbstractType /** * Line spacing descriptor. */ - public void setLspd(LineSpacingDescriptor field_11_lspd) + @Internal + public void setLspd( LineSpacingDescriptor field_11_lspd ) { this.field_11_lspd = field_11_lspd; } @@ -530,6 +564,7 @@ public abstract class PAPAbstractType /** * Space before paragraph. */ + @Internal public int getDyaBefore() { return field_12_dyaBefore; @@ -538,7 +573,8 @@ public abstract class PAPAbstractType /** * Space before paragraph. */ - public void setDyaBefore(int field_12_dyaBefore) + @Internal + public void setDyaBefore( int field_12_dyaBefore ) { this.field_12_dyaBefore = field_12_dyaBefore; } @@ -546,6 +582,7 @@ public abstract class PAPAbstractType /** * Space after paragraph. */ + @Internal public int getDyaAfter() { return field_13_dyaAfter; @@ -554,7 +591,8 @@ public abstract class PAPAbstractType /** * Space after paragraph. */ - public void setDyaAfter(int field_13_dyaAfter) + @Internal + public void setDyaAfter( int field_13_dyaAfter ) { this.field_13_dyaAfter = field_13_dyaAfter; } @@ -562,6 +600,7 @@ public abstract class PAPAbstractType /** * Paragraph is in table flag. */ + @Internal public boolean getFInTable() { return field_14_fInTable; @@ -570,7 +609,8 @@ public abstract class PAPAbstractType /** * Paragraph is in table flag. */ - public void setFInTable(boolean field_14_fInTable) + @Internal + public void setFInTable( boolean field_14_fInTable ) { this.field_14_fInTable = field_14_fInTable; } @@ -578,6 +618,7 @@ public abstract class PAPAbstractType /** * Archaic paragraph is in table flag. */ + @Internal public boolean getFinTableW97() { return field_15_finTableW97; @@ -586,7 +627,8 @@ public abstract class PAPAbstractType /** * Archaic paragraph is in table flag. */ - public void setFinTableW97(boolean field_15_finTableW97) + @Internal + public void setFinTableW97( boolean field_15_finTableW97 ) { this.field_15_finTableW97 = field_15_finTableW97; } @@ -594,6 +636,7 @@ public abstract class PAPAbstractType /** * Table trailer paragraph (last in table row). */ + @Internal public boolean getFTtp() { return field_16_fTtp; @@ -602,7 +645,8 @@ public abstract class PAPAbstractType /** * Table trailer paragraph (last in table row). */ - public void setFTtp(boolean field_16_fTtp) + @Internal + public void setFTtp( boolean field_16_fTtp ) { this.field_16_fTtp = field_16_fTtp; } @@ -610,6 +654,7 @@ public abstract class PAPAbstractType /** * Get the dxaAbs field for the PAP record. */ + @Internal public int getDxaAbs() { return field_17_dxaAbs; @@ -618,7 +663,8 @@ public abstract class PAPAbstractType /** * Set the dxaAbs field for the PAP record. */ - public void setDxaAbs(int field_17_dxaAbs) + @Internal + public void setDxaAbs( int field_17_dxaAbs ) { this.field_17_dxaAbs = field_17_dxaAbs; } @@ -626,6 +672,7 @@ public abstract class PAPAbstractType /** * Get the dyaAbs field for the PAP record. */ + @Internal public int getDyaAbs() { return field_18_dyaAbs; @@ -634,7 +681,8 @@ public abstract class PAPAbstractType /** * Set the dyaAbs field for the PAP record. */ - public void setDyaAbs(int field_18_dyaAbs) + @Internal + public void setDyaAbs( int field_18_dyaAbs ) { this.field_18_dyaAbs = field_18_dyaAbs; } @@ -642,6 +690,7 @@ public abstract class PAPAbstractType /** * Get the dxaWidth field for the PAP record. */ + @Internal public int getDxaWidth() { return field_19_dxaWidth; @@ -650,7 +699,8 @@ public abstract class PAPAbstractType /** * Set the dxaWidth field for the PAP record. */ - public void setDxaWidth(int field_19_dxaWidth) + @Internal + public void setDxaWidth( int field_19_dxaWidth ) { this.field_19_dxaWidth = field_19_dxaWidth; } @@ -658,6 +708,7 @@ public abstract class PAPAbstractType /** * Get the fBrLnAbove field for the PAP record. */ + @Internal public boolean getFBrLnAbove() { return field_20_fBrLnAbove; @@ -666,7 +717,8 @@ public abstract class PAPAbstractType /** * Set the fBrLnAbove field for the PAP record. */ - public void setFBrLnAbove(boolean field_20_fBrLnAbove) + @Internal + public void setFBrLnAbove( boolean field_20_fBrLnAbove ) { this.field_20_fBrLnAbove = field_20_fBrLnAbove; } @@ -674,6 +726,7 @@ public abstract class PAPAbstractType /** * Get the fBrLnBelow field for the PAP record. */ + @Internal public boolean getFBrLnBelow() { return field_21_fBrLnBelow; @@ -682,7 +735,8 @@ public abstract class PAPAbstractType /** * Set the fBrLnBelow field for the PAP record. */ - public void setFBrLnBelow(boolean field_21_fBrLnBelow) + @Internal + public void setFBrLnBelow( boolean field_21_fBrLnBelow ) { this.field_21_fBrLnBelow = field_21_fBrLnBelow; } @@ -690,6 +744,7 @@ public abstract class PAPAbstractType /** * Get the pcVert field for the PAP record. */ + @Internal public byte getPcVert() { return field_22_pcVert; @@ -698,7 +753,8 @@ public abstract class PAPAbstractType /** * Set the pcVert field for the PAP record. */ - public void setPcVert(byte field_22_pcVert) + @Internal + public void setPcVert( byte field_22_pcVert ) { this.field_22_pcVert = field_22_pcVert; } @@ -706,6 +762,7 @@ public abstract class PAPAbstractType /** * Get the pcHorz field for the PAP record. */ + @Internal public byte getPcHorz() { return field_23_pcHorz; @@ -714,7 +771,8 @@ public abstract class PAPAbstractType /** * Set the pcHorz field for the PAP record. */ - public void setPcHorz(byte field_23_pcHorz) + @Internal + public void setPcHorz( byte field_23_pcHorz ) { this.field_23_pcHorz = field_23_pcHorz; } @@ -722,6 +780,7 @@ public abstract class PAPAbstractType /** * Get the wr field for the PAP record. */ + @Internal public byte getWr() { return field_24_wr; @@ -730,7 +789,8 @@ public abstract class PAPAbstractType /** * Set the wr field for the PAP record. */ - public void setWr(byte field_24_wr) + @Internal + public void setWr( byte field_24_wr ) { this.field_24_wr = field_24_wr; } @@ -738,6 +798,7 @@ public abstract class PAPAbstractType /** * Get the fNoAutoHyph field for the PAP record. */ + @Internal public boolean getFNoAutoHyph() { return field_25_fNoAutoHyph; @@ -746,7 +807,8 @@ public abstract class PAPAbstractType /** * Set the fNoAutoHyph field for the PAP record. */ - public void setFNoAutoHyph(boolean field_25_fNoAutoHyph) + @Internal + public void setFNoAutoHyph( boolean field_25_fNoAutoHyph ) { this.field_25_fNoAutoHyph = field_25_fNoAutoHyph; } @@ -754,6 +816,7 @@ public abstract class PAPAbstractType /** * Get the dyaHeight field for the PAP record. */ + @Internal public int getDyaHeight() { return field_26_dyaHeight; @@ -762,7 +825,8 @@ public abstract class PAPAbstractType /** * Set the dyaHeight field for the PAP record. */ - public void setDyaHeight(int field_26_dyaHeight) + @Internal + public void setDyaHeight( int field_26_dyaHeight ) { this.field_26_dyaHeight = field_26_dyaHeight; } @@ -774,6 +838,7 @@ public abstract class PAPAbstractType *
  • {@link #FMINHEIGHT_EXACT} *
  • {@link #FMINHEIGHT_AT_LEAST} */ + @Internal public boolean getFMinHeight() { return field_27_fMinHeight; @@ -787,7 +852,8 @@ public abstract class PAPAbstractType *
  • {@link #FMINHEIGHT_EXACT} *
  • {@link #FMINHEIGHT_AT_LEAST} */ - public void setFMinHeight(boolean field_27_fMinHeight) + @Internal + public void setFMinHeight( boolean field_27_fMinHeight ) { this.field_27_fMinHeight = field_27_fMinHeight; } @@ -795,6 +861,7 @@ public abstract class PAPAbstractType /** * Get the dcs field for the PAP record. */ + @Internal public DropCapSpecifier getDcs() { return field_28_dcs; @@ -803,7 +870,8 @@ public abstract class PAPAbstractType /** * Set the dcs field for the PAP record. */ - public void setDcs(DropCapSpecifier field_28_dcs) + @Internal + public void setDcs( DropCapSpecifier field_28_dcs ) { this.field_28_dcs = field_28_dcs; } @@ -811,6 +879,7 @@ public abstract class PAPAbstractType /** * Vertical distance between text and absolutely positioned object. */ + @Internal public int getDyaFromText() { return field_29_dyaFromText; @@ -819,7 +888,8 @@ public abstract class PAPAbstractType /** * Vertical distance between text and absolutely positioned object. */ - public void setDyaFromText(int field_29_dyaFromText) + @Internal + public void setDyaFromText( int field_29_dyaFromText ) { this.field_29_dyaFromText = field_29_dyaFromText; } @@ -827,6 +897,7 @@ public abstract class PAPAbstractType /** * Horizontal distance between text and absolutely positioned object. */ + @Internal public int getDxaFromText() { return field_30_dxaFromText; @@ -835,7 +906,8 @@ public abstract class PAPAbstractType /** * Horizontal distance between text and absolutely positioned object. */ - public void setDxaFromText(int field_30_dxaFromText) + @Internal + public void setDxaFromText( int field_30_dxaFromText ) { this.field_30_dxaFromText = field_30_dxaFromText; } @@ -843,6 +915,7 @@ public abstract class PAPAbstractType /** * Anchor of an absolutely positioned frame is locked. */ + @Internal public boolean getFLocked() { return field_31_fLocked; @@ -851,7 +924,8 @@ public abstract class PAPAbstractType /** * Anchor of an absolutely positioned frame is locked. */ - public void setFLocked(boolean field_31_fLocked) + @Internal + public void setFLocked( boolean field_31_fLocked ) { this.field_31_fLocked = field_31_fLocked; } @@ -859,6 +933,7 @@ public abstract class PAPAbstractType /** * 1, Word will prevent widowed lines in this paragraph from being placed at the beginning of a page. */ + @Internal public boolean getFWidowControl() { return field_32_fWidowControl; @@ -867,7 +942,8 @@ public abstract class PAPAbstractType /** * 1, Word will prevent widowed lines in this paragraph from being placed at the beginning of a page. */ - public void setFWidowControl(boolean field_32_fWidowControl) + @Internal + public void setFWidowControl( boolean field_32_fWidowControl ) { this.field_32_fWidowControl = field_32_fWidowControl; } @@ -875,6 +951,7 @@ public abstract class PAPAbstractType /** * apply Kinsoku rules when performing line wrapping. */ + @Internal public boolean getFKinsoku() { return field_33_fKinsoku; @@ -883,7 +960,8 @@ public abstract class PAPAbstractType /** * apply Kinsoku rules when performing line wrapping. */ - public void setFKinsoku(boolean field_33_fKinsoku) + @Internal + public void setFKinsoku( boolean field_33_fKinsoku ) { this.field_33_fKinsoku = field_33_fKinsoku; } @@ -891,6 +969,7 @@ public abstract class PAPAbstractType /** * perform word wrap. */ + @Internal public boolean getFWordWrap() { return field_34_fWordWrap; @@ -899,7 +978,8 @@ public abstract class PAPAbstractType /** * perform word wrap. */ - public void setFWordWrap(boolean field_34_fWordWrap) + @Internal + public void setFWordWrap( boolean field_34_fWordWrap ) { this.field_34_fWordWrap = field_34_fWordWrap; } @@ -907,6 +987,7 @@ public abstract class PAPAbstractType /** * apply overflow punctuation rules when performing line wrapping. */ + @Internal public boolean getFOverflowPunct() { return field_35_fOverflowPunct; @@ -915,7 +996,8 @@ public abstract class PAPAbstractType /** * apply overflow punctuation rules when performing line wrapping. */ - public void setFOverflowPunct(boolean field_35_fOverflowPunct) + @Internal + public void setFOverflowPunct( boolean field_35_fOverflowPunct ) { this.field_35_fOverflowPunct = field_35_fOverflowPunct; } @@ -923,6 +1005,7 @@ public abstract class PAPAbstractType /** * perform top line punctuation processing. */ + @Internal public boolean getFTopLinePunct() { return field_36_fTopLinePunct; @@ -931,7 +1014,8 @@ public abstract class PAPAbstractType /** * perform top line punctuation processing. */ - public void setFTopLinePunct(boolean field_36_fTopLinePunct) + @Internal + public void setFTopLinePunct( boolean field_36_fTopLinePunct ) { this.field_36_fTopLinePunct = field_36_fTopLinePunct; } @@ -939,6 +1023,7 @@ public abstract class PAPAbstractType /** * auto space East Asian and alphabetic characters. */ + @Internal public boolean getFAutoSpaceDE() { return field_37_fAutoSpaceDE; @@ -947,7 +1032,8 @@ public abstract class PAPAbstractType /** * auto space East Asian and alphabetic characters. */ - public void setFAutoSpaceDE(boolean field_37_fAutoSpaceDE) + @Internal + public void setFAutoSpaceDE( boolean field_37_fAutoSpaceDE ) { this.field_37_fAutoSpaceDE = field_37_fAutoSpaceDE; } @@ -955,6 +1041,7 @@ public abstract class PAPAbstractType /** * auto space East Asian and numeric characters. */ + @Internal public boolean getFAutoSpaceDN() { return field_38_fAutoSpaceDN; @@ -963,7 +1050,8 @@ public abstract class PAPAbstractType /** * auto space East Asian and numeric characters. */ - public void setFAutoSpaceDN(boolean field_38_fAutoSpaceDN) + @Internal + public void setFAutoSpaceDN( boolean field_38_fAutoSpaceDN ) { this.field_38_fAutoSpaceDN = field_38_fAutoSpaceDN; } @@ -978,6 +1066,7 @@ public abstract class PAPAbstractType *
  • {@link #WALIGNFONT_VARIABLE} *
  • {@link #WALIGNFONT_AUTO} */ + @Internal public int getWAlignFont() { return field_39_wAlignFont; @@ -994,7 +1083,8 @@ public abstract class PAPAbstractType *
  • {@link #WALIGNFONT_VARIABLE} *
  • {@link #WALIGNFONT_AUTO} */ - public void setWAlignFont(int field_39_wAlignFont) + @Internal + public void setWAlignFont( int field_39_wAlignFont ) { this.field_39_wAlignFont = field_39_wAlignFont; } @@ -1002,6 +1092,7 @@ public abstract class PAPAbstractType /** * Used internally by Word. */ + @Internal public short getFontAlign() { return field_40_fontAlign; @@ -1010,7 +1101,8 @@ public abstract class PAPAbstractType /** * Used internally by Word. */ - public void setFontAlign(short field_40_fontAlign) + @Internal + public void setFontAlign( short field_40_fontAlign ) { this.field_40_fontAlign = field_40_fontAlign; } @@ -1018,6 +1110,7 @@ public abstract class PAPAbstractType /** * Outline level. */ + @Internal public byte getLvl() { return field_41_lvl; @@ -1026,7 +1119,8 @@ public abstract class PAPAbstractType /** * Outline level. */ - public void setLvl(byte field_41_lvl) + @Internal + public void setLvl( byte field_41_lvl ) { this.field_41_lvl = field_41_lvl; } @@ -1034,6 +1128,7 @@ public abstract class PAPAbstractType /** * Get the fBiDi field for the PAP record. */ + @Internal public boolean getFBiDi() { return field_42_fBiDi; @@ -1042,7 +1137,8 @@ public abstract class PAPAbstractType /** * Set the fBiDi field for the PAP record. */ - public void setFBiDi(boolean field_42_fBiDi) + @Internal + public void setFBiDi( boolean field_42_fBiDi ) { this.field_42_fBiDi = field_42_fBiDi; } @@ -1050,6 +1146,7 @@ public abstract class PAPAbstractType /** * Get the fNumRMIns field for the PAP record. */ + @Internal public boolean getFNumRMIns() { return field_43_fNumRMIns; @@ -1058,7 +1155,8 @@ public abstract class PAPAbstractType /** * Set the fNumRMIns field for the PAP record. */ - public void setFNumRMIns(boolean field_43_fNumRMIns) + @Internal + public void setFNumRMIns( boolean field_43_fNumRMIns ) { this.field_43_fNumRMIns = field_43_fNumRMIns; } @@ -1066,6 +1164,7 @@ public abstract class PAPAbstractType /** * Get the fCrLf field for the PAP record. */ + @Internal public boolean getFCrLf() { return field_44_fCrLf; @@ -1074,7 +1173,8 @@ public abstract class PAPAbstractType /** * Set the fCrLf field for the PAP record. */ - public void setFCrLf(boolean field_44_fCrLf) + @Internal + public void setFCrLf( boolean field_44_fCrLf ) { this.field_44_fCrLf = field_44_fCrLf; } @@ -1082,6 +1182,7 @@ public abstract class PAPAbstractType /** * Get the fUsePgsuSettings field for the PAP record. */ + @Internal public boolean getFUsePgsuSettings() { return field_45_fUsePgsuSettings; @@ -1090,7 +1191,8 @@ public abstract class PAPAbstractType /** * Set the fUsePgsuSettings field for the PAP record. */ - public void setFUsePgsuSettings(boolean field_45_fUsePgsuSettings) + @Internal + public void setFUsePgsuSettings( boolean field_45_fUsePgsuSettings ) { this.field_45_fUsePgsuSettings = field_45_fUsePgsuSettings; } @@ -1098,6 +1200,7 @@ public abstract class PAPAbstractType /** * Get the fAdjustRight field for the PAP record. */ + @Internal public boolean getFAdjustRight() { return field_46_fAdjustRight; @@ -1106,7 +1209,8 @@ public abstract class PAPAbstractType /** * Set the fAdjustRight field for the PAP record. */ - public void setFAdjustRight(boolean field_46_fAdjustRight) + @Internal + public void setFAdjustRight( boolean field_46_fAdjustRight ) { this.field_46_fAdjustRight = field_46_fAdjustRight; } @@ -1114,6 +1218,7 @@ public abstract class PAPAbstractType /** * Table nesting level. */ + @Internal public int getItap() { return field_47_itap; @@ -1122,7 +1227,8 @@ public abstract class PAPAbstractType /** * Table nesting level. */ - public void setItap(int field_47_itap) + @Internal + public void setItap( int field_47_itap ) { this.field_47_itap = field_47_itap; } @@ -1130,6 +1236,7 @@ public abstract class PAPAbstractType /** * When 1, the end of paragraph mark is really an end of cell mark for a nested table cell. */ + @Internal public boolean getFInnerTableCell() { return field_48_fInnerTableCell; @@ -1138,7 +1245,8 @@ public abstract class PAPAbstractType /** * When 1, the end of paragraph mark is really an end of cell mark for a nested table cell. */ - public void setFInnerTableCell(boolean field_48_fInnerTableCell) + @Internal + public void setFInnerTableCell( boolean field_48_fInnerTableCell ) { this.field_48_fInnerTableCell = field_48_fInnerTableCell; } @@ -1146,6 +1254,7 @@ public abstract class PAPAbstractType /** * Ensure the Table Cell char doesn't show up as zero height. */ + @Internal public boolean getFOpenTch() { return field_49_fOpenTch; @@ -1154,7 +1263,8 @@ public abstract class PAPAbstractType /** * Ensure the Table Cell char doesn't show up as zero height. */ - public void setFOpenTch(boolean field_49_fOpenTch) + @Internal + public void setFOpenTch( boolean field_49_fOpenTch ) { this.field_49_fOpenTch = field_49_fOpenTch; } @@ -1162,6 +1272,7 @@ public abstract class PAPAbstractType /** * Word 97 compatibility indicates this end of paragraph mark is really an end of row marker for a nested table. */ + @Internal public boolean getFTtpEmbedded() { return field_50_fTtpEmbedded; @@ -1170,7 +1281,8 @@ public abstract class PAPAbstractType /** * Word 97 compatibility indicates this end of paragraph mark is really an end of row marker for a nested table. */ - public void setFTtpEmbedded(boolean field_50_fTtpEmbedded) + @Internal + public void setFTtpEmbedded( boolean field_50_fTtpEmbedded ) { this.field_50_fTtpEmbedded = field_50_fTtpEmbedded; } @@ -1178,6 +1290,7 @@ public abstract class PAPAbstractType /** * Right indent in character units. */ + @Internal public short getDxcRight() { return field_51_dxcRight; @@ -1186,7 +1299,8 @@ public abstract class PAPAbstractType /** * Right indent in character units. */ - public void setDxcRight(short field_51_dxcRight) + @Internal + public void setDxcRight( short field_51_dxcRight ) { this.field_51_dxcRight = field_51_dxcRight; } @@ -1194,6 +1308,7 @@ public abstract class PAPAbstractType /** * Left indent in character units. */ + @Internal public short getDxcLeft() { return field_52_dxcLeft; @@ -1202,7 +1317,8 @@ public abstract class PAPAbstractType /** * Left indent in character units. */ - public void setDxcLeft(short field_52_dxcLeft) + @Internal + public void setDxcLeft( short field_52_dxcLeft ) { this.field_52_dxcLeft = field_52_dxcLeft; } @@ -1210,6 +1326,7 @@ public abstract class PAPAbstractType /** * First line indent in character units. */ + @Internal public short getDxcLeft1() { return field_53_dxcLeft1; @@ -1218,7 +1335,8 @@ public abstract class PAPAbstractType /** * First line indent in character units. */ - public void setDxcLeft1(short field_53_dxcLeft1) + @Internal + public void setDxcLeft1( short field_53_dxcLeft1 ) { this.field_53_dxcLeft1 = field_53_dxcLeft1; } @@ -1226,6 +1344,7 @@ public abstract class PAPAbstractType /** * Vertical spacing before is automatic. */ + @Internal public boolean getFDyaBeforeAuto() { return field_54_fDyaBeforeAuto; @@ -1234,7 +1353,8 @@ public abstract class PAPAbstractType /** * Vertical spacing before is automatic. */ - public void setFDyaBeforeAuto(boolean field_54_fDyaBeforeAuto) + @Internal + public void setFDyaBeforeAuto( boolean field_54_fDyaBeforeAuto ) { this.field_54_fDyaBeforeAuto = field_54_fDyaBeforeAuto; } @@ -1242,6 +1362,7 @@ public abstract class PAPAbstractType /** * Vertical spacing after is automatic. */ + @Internal public boolean getFDyaAfterAuto() { return field_55_fDyaAfterAuto; @@ -1250,7 +1371,8 @@ public abstract class PAPAbstractType /** * Vertical spacing after is automatic. */ - public void setFDyaAfterAuto(boolean field_55_fDyaAfterAuto) + @Internal + public void setFDyaAfterAuto( boolean field_55_fDyaAfterAuto ) { this.field_55_fDyaAfterAuto = field_55_fDyaAfterAuto; } @@ -1258,6 +1380,7 @@ public abstract class PAPAbstractType /** * Get the dxaRight field for the PAP record. */ + @Internal public int getDxaRight() { return field_56_dxaRight; @@ -1266,7 +1389,8 @@ public abstract class PAPAbstractType /** * Set the dxaRight field for the PAP record. */ - public void setDxaRight(int field_56_dxaRight) + @Internal + public void setDxaRight( int field_56_dxaRight ) { this.field_56_dxaRight = field_56_dxaRight; } @@ -1274,6 +1398,7 @@ public abstract class PAPAbstractType /** * Get the dxaLeft field for the PAP record. */ + @Internal public int getDxaLeft() { return field_57_dxaLeft; @@ -1282,7 +1407,8 @@ public abstract class PAPAbstractType /** * Set the dxaLeft field for the PAP record. */ - public void setDxaLeft(int field_57_dxaLeft) + @Internal + public void setDxaLeft( int field_57_dxaLeft ) { this.field_57_dxaLeft = field_57_dxaLeft; } @@ -1290,6 +1416,7 @@ public abstract class PAPAbstractType /** * Get the dxaLeft1 field for the PAP record. */ + @Internal public int getDxaLeft1() { return field_58_dxaLeft1; @@ -1298,7 +1425,8 @@ public abstract class PAPAbstractType /** * Set the dxaLeft1 field for the PAP record. */ - public void setDxaLeft1(int field_58_dxaLeft1) + @Internal + public void setDxaLeft1( int field_58_dxaLeft1 ) { this.field_58_dxaLeft1 = field_58_dxaLeft1; } @@ -1306,6 +1434,7 @@ public abstract class PAPAbstractType /** * Get the jc field for the PAP record. */ + @Internal public byte getJc() { return field_59_jc; @@ -1314,360 +1443,430 @@ public abstract class PAPAbstractType /** * Set the jc field for the PAP record. */ - public void setJc(byte field_59_jc) + @Internal + public void setJc( byte field_59_jc ) { this.field_59_jc = field_59_jc; } - /** - * Get the fNoAllowOverlap field for the PAP record. - */ - public boolean getFNoAllowOverlap() - { - return field_60_fNoAllowOverlap; - } - - /** - * Set the fNoAllowOverlap field for the PAP record. - */ - public void setFNoAllowOverlap(boolean field_60_fNoAllowOverlap) - { - this.field_60_fNoAllowOverlap = field_60_fNoAllowOverlap; - } - /** * Get the brcTop field for the PAP record. */ + @Internal public BorderCode getBrcTop() { - return field_61_brcTop; + return field_60_brcTop; } /** * Set the brcTop field for the PAP record. */ - public void setBrcTop(BorderCode field_61_brcTop) + @Internal + public void setBrcTop( BorderCode field_60_brcTop ) { - this.field_61_brcTop = field_61_brcTop; + this.field_60_brcTop = field_60_brcTop; } /** * Get the brcLeft field for the PAP record. */ + @Internal public BorderCode getBrcLeft() { - return field_62_brcLeft; + return field_61_brcLeft; } /** * Set the brcLeft field for the PAP record. */ - public void setBrcLeft(BorderCode field_62_brcLeft) + @Internal + public void setBrcLeft( BorderCode field_61_brcLeft ) { - this.field_62_brcLeft = field_62_brcLeft; + this.field_61_brcLeft = field_61_brcLeft; } /** * Get the brcBottom field for the PAP record. */ + @Internal public BorderCode getBrcBottom() { - return field_63_brcBottom; + return field_62_brcBottom; } /** * Set the brcBottom field for the PAP record. */ - public void setBrcBottom(BorderCode field_63_brcBottom) + @Internal + public void setBrcBottom( BorderCode field_62_brcBottom ) { - this.field_63_brcBottom = field_63_brcBottom; + this.field_62_brcBottom = field_62_brcBottom; } /** * Get the brcRight field for the PAP record. */ + @Internal public BorderCode getBrcRight() { - return field_64_brcRight; + return field_63_brcRight; } /** * Set the brcRight field for the PAP record. */ - public void setBrcRight(BorderCode field_64_brcRight) + @Internal + public void setBrcRight( BorderCode field_63_brcRight ) { - this.field_64_brcRight = field_64_brcRight; + this.field_63_brcRight = field_63_brcRight; } /** * Get the brcBetween field for the PAP record. */ + @Internal public BorderCode getBrcBetween() { - return field_65_brcBetween; + return field_64_brcBetween; } /** * Set the brcBetween field for the PAP record. */ - public void setBrcBetween(BorderCode field_65_brcBetween) + @Internal + public void setBrcBetween( BorderCode field_64_brcBetween ) { - this.field_65_brcBetween = field_65_brcBetween; + this.field_64_brcBetween = field_64_brcBetween; } /** * Get the brcBar field for the PAP record. */ + @Internal public BorderCode getBrcBar() { - return field_66_brcBar; + return field_65_brcBar; } /** * Set the brcBar field for the PAP record. */ - public void setBrcBar(BorderCode field_66_brcBar) + @Internal + public void setBrcBar( BorderCode field_65_brcBar ) { - this.field_66_brcBar = field_66_brcBar; + this.field_65_brcBar = field_65_brcBar; } /** * Get the shd field for the PAP record. */ + @Internal public ShadingDescriptor getShd() { - return field_67_shd; + return field_66_shd; } /** * Set the shd field for the PAP record. */ - public void setShd(ShadingDescriptor field_67_shd) + @Internal + public void setShd( ShadingDescriptor field_66_shd ) { - this.field_67_shd = field_67_shd; + this.field_66_shd = field_66_shd; } /** * Get the anld field for the PAP record. */ + @Internal public byte[] getAnld() { - return field_68_anld; + return field_67_anld; } /** * Set the anld field for the PAP record. */ - public void setAnld(byte[] field_68_anld) + @Internal + public void setAnld( byte[] field_67_anld ) { - this.field_68_anld = field_68_anld; + this.field_67_anld = field_67_anld; } /** * Get the phe field for the PAP record. */ + @Internal public byte[] getPhe() { - return field_69_phe; + return field_68_phe; } /** * Set the phe field for the PAP record. */ - public void setPhe(byte[] field_69_phe) + @Internal + public void setPhe( byte[] field_68_phe ) { - this.field_69_phe = field_69_phe; + this.field_68_phe = field_68_phe; } /** * Get the fPropRMark field for the PAP record. */ + @Internal public boolean getFPropRMark() { - return field_70_fPropRMark; + return field_69_fPropRMark; } /** * Set the fPropRMark field for the PAP record. */ - public void setFPropRMark(boolean field_70_fPropRMark) + @Internal + public void setFPropRMark( boolean field_69_fPropRMark ) { - this.field_70_fPropRMark = field_70_fPropRMark; + this.field_69_fPropRMark = field_69_fPropRMark; } /** * Get the ibstPropRMark field for the PAP record. */ + @Internal public int getIbstPropRMark() { - return field_71_ibstPropRMark; + return field_70_ibstPropRMark; } /** * Set the ibstPropRMark field for the PAP record. */ - public void setIbstPropRMark(int field_71_ibstPropRMark) + @Internal + public void setIbstPropRMark( int field_70_ibstPropRMark ) { - this.field_71_ibstPropRMark = field_71_ibstPropRMark; + this.field_70_ibstPropRMark = field_70_ibstPropRMark; } /** * Get the dttmPropRMark field for the PAP record. */ + @Internal public DateAndTime getDttmPropRMark() { - return field_72_dttmPropRMark; + return field_71_dttmPropRMark; } /** * Set the dttmPropRMark field for the PAP record. */ - public void setDttmPropRMark(DateAndTime field_72_dttmPropRMark) + @Internal + public void setDttmPropRMark( DateAndTime field_71_dttmPropRMark ) { - this.field_72_dttmPropRMark = field_72_dttmPropRMark; + this.field_71_dttmPropRMark = field_71_dttmPropRMark; } /** - * Get the itbdMac field for the PAP record. + * Number of tabs stops defined for paragraph. Must be >= 0 and <= 64.. */ + @Internal public int getItbdMac() { - return field_73_itbdMac; + return field_72_itbdMac; } /** - * Set the itbdMac field for the PAP record. + * Number of tabs stops defined for paragraph. Must be >= 0 and <= 64.. */ - public void setItbdMac(int field_73_itbdMac) + @Internal + public void setItbdMac( int field_72_itbdMac ) { - this.field_73_itbdMac = field_73_itbdMac; + this.field_72_itbdMac = field_72_itbdMac; } /** - * Get the rgdxaTab field for the PAP record. + * Array of positions of itbdMac tab stops. itbdMax==64. */ + @Internal public int[] getRgdxaTab() { - return field_74_rgdxaTab; + return field_73_rgdxaTab; } /** - * Set the rgdxaTab field for the PAP record. + * Array of positions of itbdMac tab stops. itbdMax==64. */ - public void setRgdxaTab(int[] field_74_rgdxaTab) + @Internal + public void setRgdxaTab( int[] field_73_rgdxaTab ) { - this.field_74_rgdxaTab = field_74_rgdxaTab; + this.field_73_rgdxaTab = field_73_rgdxaTab; } /** - * Get the rgtbd field for the PAP record. + * Array of itbdMac tab descriptors. */ - public byte[] getRgtbd() + @Internal + public TabDescriptor[] getRgtbd() { - return field_75_rgtbd; + return field_74_rgtbd; } /** - * Set the rgtbd field for the PAP record. + * Array of itbdMac tab descriptors. */ - public void setRgtbd(byte[] field_75_rgtbd) + @Internal + public void setRgtbd( TabDescriptor[] field_74_rgtbd ) { - this.field_75_rgtbd = field_75_rgtbd; + this.field_74_rgtbd = field_74_rgtbd; } /** * Get the numrm field for the PAP record. */ + @Internal public byte[] getNumrm() { - return field_76_numrm; + return field_75_numrm; } /** * Set the numrm field for the PAP record. */ - public void setNumrm(byte[] field_76_numrm) + @Internal + public void setNumrm( byte[] field_75_numrm ) { - this.field_76_numrm = field_76_numrm; + this.field_75_numrm = field_75_numrm; } /** * Get the ptap field for the PAP record. */ + @Internal public byte[] getPtap() { - return field_77_ptap; + return field_76_ptap; } /** * Set the ptap field for the PAP record. */ - public void setPtap(byte[] field_77_ptap) + @Internal + public void setPtap( byte[] field_76_ptap ) + { + this.field_76_ptap = field_76_ptap; + } + + /** + * When 1, absolutely positioned paragraph cannot overlap with another paragraph. + */ + @Internal + public boolean getFNoAllowOverlap() + { + return field_77_fNoAllowOverlap; + } + + /** + * When 1, absolutely positioned paragraph cannot overlap with another paragraph. + */ + @Internal + public void setFNoAllowOverlap( boolean field_77_fNoAllowOverlap ) + { + this.field_77_fNoAllowOverlap = field_77_fNoAllowOverlap; + } + + /** + * HTML DIV ID for this paragraph. + */ + @Internal + public long getIpgp() { - this.field_77_ptap = field_77_ptap; + return field_78_ipgp; + } + + /** + * HTML DIV ID for this paragraph. + */ + @Internal + public void setIpgp( long field_78_ipgp ) + { + this.field_78_ipgp = field_78_ipgp; + } + + /** + * Save ID for last time this PAP was revised. + */ + @Internal + public long getRsid() + { + return field_79_rsid; + } + + /** + * Save ID for last time this PAP was revised. + */ + @Internal + public void setRsid( long field_79_rsid ) + { + this.field_79_rsid = field_79_rsid; } /** * Sets the fVertical field value. * */ - public void setFVertical(boolean value) + @Internal + public void setFVertical( boolean value ) { field_40_fontAlign = (short)fVertical.setBoolean(field_40_fontAlign, value); - - } /** * * @return the fVertical field value. */ + @Internal public boolean isFVertical() { return fVertical.isSet(field_40_fontAlign); - } /** * Sets the fBackward field value. * */ - public void setFBackward(boolean value) + @Internal + public void setFBackward( boolean value ) { field_40_fontAlign = (short)fBackward.setBoolean(field_40_fontAlign, value); - - } /** * * @return the fBackward field value. */ + @Internal public boolean isFBackward() { return fBackward.isSet(field_40_fontAlign); - } /** * Sets the fRotateFont field value. * */ - public void setFRotateFont(boolean value) + @Internal + public void setFRotateFont( boolean value ) { field_40_fontAlign = (short)fRotateFont.setBoolean(field_40_fontAlign, value); - - } /** * * @return the fRotateFont field value. */ + @Internal public boolean isFRotateFont() { return fRotateFont.isSet(field_40_fontAlign); - } } // END OF CLASS diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/SHD80AbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/SHD80AbstractType.java new file mode 100644 index 0000000000..2a91c4b34f --- /dev/null +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/SHD80AbstractType.java @@ -0,0 +1,163 @@ +/* ==================================================================== + 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; + + +import org.apache.poi.util.BitField; +import org.apache.poi.util.Internal; +import org.apache.poi.util.LittleEndian; + +/** + * The SHD80 is a substructure of the CHP and PAP, and TC for Word 97.

    Class + and fields descriptions are quoted from + Microsoft Office Word 97-2007 Binary File Format + + *

    + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * remove the record in src/types/definitions. + *

    + * This class is internal. It content or properties may change without notice + * due to changes in our knowledge of internal Microsoft Word binary structures. + + * @author Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format + Specification [*.doc] + + */ +@Internal +public abstract class SHD80AbstractType +{ + + protected short field_1_value; + /**/private static BitField icoFore = new BitField(0x001F); + /**/private static BitField icoBack = new BitField(0x03E0); + /**/private static BitField ipat = new BitField(0xFC00); + + protected SHD80AbstractType() + { + } + + protected void fillFields( byte[] data, int offset ) + { + field_1_value = LittleEndian.getShort(data, 0x0 + offset); + } + + public void serialize( byte[] data, int offset ) + { + LittleEndian.putShort(data, 0x0 + offset, (short)field_1_value); + } + + /** + * Size of record + */ + public static int getSize() + { + return 0 + 2; + } + + public String toString() + { + StringBuilder builder = new StringBuilder(); + builder.append("[SHD80]\n"); + builder.append(" .value = "); + builder.append(" (").append(getValue()).append(" )\n"); + builder.append(" .icoFore = ").append(getIcoFore()).append('\n'); + builder.append(" .icoBack = ").append(getIcoBack()).append('\n'); + builder.append(" .ipat = ").append(getIpat()).append('\n'); + + builder.append("[/SHD80]\n"); + return builder.toString(); + } + + /** + * Get the value field for the SHD80 record. + */ + @Internal + public short getValue() + { + return field_1_value; + } + + /** + * Set the value field for the SHD80 record. + */ + @Internal + public void setValue( short field_1_value ) + { + this.field_1_value = field_1_value; + } + + /** + * Sets the icoFore field value. + * Foreground color + */ + @Internal + public void setIcoFore( byte value ) + { + field_1_value = (short)icoFore.setValue(field_1_value, value); + } + + /** + * Foreground color + * @return the icoFore field value. + */ + @Internal + public byte getIcoFore() + { + return ( byte )icoFore.getValue(field_1_value); + } + + /** + * Sets the icoBack field value. + * Background color + */ + @Internal + public void setIcoBack( byte value ) + { + field_1_value = (short)icoBack.setValue(field_1_value, value); + } + + /** + * Background color + * @return the icoBack field value. + */ + @Internal + public byte getIcoBack() + { + return ( byte )icoBack.getValue(field_1_value); + } + + /** + * Sets the ipat field value. + * Shading pattern + */ + @Internal + public void setIpat( byte value ) + { + field_1_value = (short)ipat.setValue(field_1_value, value); + } + + /** + * Shading pattern + * @return the ipat field value. + */ + @Internal + public byte getIpat() + { + return ( byte )ipat.getValue(field_1_value); + } + +} // END OF CLASS diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/SHDAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/SHDAbstractType.java new file mode 100644 index 0000000000..16b99e1c33 --- /dev/null +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/SHDAbstractType.java @@ -0,0 +1,145 @@ +/* ==================================================================== + 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; + + +import org.apache.poi.hwpf.model.Colorref; +import org.apache.poi.util.Internal; +import org.apache.poi.util.LittleEndian; + +/** + * The SHD is a substructure of the CHP, PAP, and TC for Word 2000.

    Class + and + fields descriptions are quoted from Microsoft Office Word 97-2007 Binary File Format + + *

    + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * remove the record in src/types/definitions. + *

    + * This class is internal. It content or properties may change without notice + * due to changes in our knowledge of internal Microsoft Word binary structures. + + * @author Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format + Specification [*.doc] + + */ +@Internal +public abstract class SHDAbstractType +{ + + protected Colorref field_1_cvFore; + protected Colorref field_2_cvBack; + protected int field_3_ipat; + + protected SHDAbstractType() + { + this.field_1_cvFore = new Colorref(); + this.field_2_cvBack = new Colorref(); + } + + protected void fillFields( byte[] data, int offset ) + { + field_1_cvFore = new Colorref(data, 0x0 + offset); + field_2_cvBack = new Colorref(data, 0x4 + offset); + field_3_ipat = LittleEndian.getShort(data, 0x8 + offset); + } + + public void serialize( byte[] data, int offset ) + { + field_1_cvFore.serialize(data, 0x0 + offset); + field_2_cvBack.serialize(data, 0x4 + offset); + LittleEndian.putShort(data, 0x8 + offset, (short)field_3_ipat); + } + + /** + * Size of record + */ + public static int getSize() + { + return 0 + 4 + 4 + 2; + } + + public String toString() + { + StringBuilder builder = new StringBuilder(); + builder.append("[SHD]\n"); + builder.append(" .cvFore = "); + builder.append(" (").append(getCvFore()).append(" )\n"); + builder.append(" .cvBack = "); + builder.append(" (").append(getCvBack()).append(" )\n"); + builder.append(" .ipat = "); + builder.append(" (").append(getIpat()).append(" )\n"); + + builder.append("[/SHD]\n"); + return builder.toString(); + } + + /** + * 24-bit foreground color. + */ + @Internal + public Colorref getCvFore() + { + return field_1_cvFore; + } + + /** + * 24-bit foreground color. + */ + @Internal + public void setCvFore( Colorref field_1_cvFore ) + { + this.field_1_cvFore = field_1_cvFore; + } + + /** + * 24-bit background color. + */ + @Internal + public Colorref getCvBack() + { + return field_2_cvBack; + } + + /** + * 24-bit background color. + */ + @Internal + public void setCvBack( Colorref field_2_cvBack ) + { + this.field_2_cvBack = field_2_cvBack; + } + + /** + * Shading pattern. + */ + @Internal + public int getIpat() + { + return field_3_ipat; + } + + /** + * Shading pattern. + */ + @Internal + public void setIpat( int field_3_ipat ) + { + this.field_3_ipat = field_3_ipat; + } + +} // END OF CLASS diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/TAPAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/TAPAbstractType.java index 58d83584f2..f652399f25 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/types/TAPAbstractType.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/TAPAbstractType.java @@ -17,30 +17,25 @@ package org.apache.poi.hwpf.model.types; -import org.apache.poi.hdf.model.hdftypes.HDFType; -import org.apache.poi.hwpf.usermodel.BorderCode; -import org.apache.poi.hwpf.usermodel.ShadingDescriptor; -import org.apache.poi.hwpf.usermodel.TableAutoformatLookSpecifier; -import org.apache.poi.hwpf.usermodel.TableCellDescriptor; -import org.apache.poi.util.BitField; -import org.apache.poi.util.Internal; + +import org.apache.poi.hwpf.usermodel.*; +import org.apache.poi.util.*; /** - * "Table Properties (TAP). This structure is never written out to disk but can - * be built from the appropriate property modifiers. For this reason no offsets - * into the structure are given." + * Table Properties. Properties descriptions quoted from official 97-2007 binary file + format specification. + *

    - * Class and properties descriptions quoted from Microsoft Office Word 97-2007 - * Binary File Format Specification [*.doc] + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * remove the record in src/types/definitions. *

    - * NOTE: This source is automatically generated please do not modify this file. - * Either subclass or remove the record in src/records/definitions. - * + * This class is internal. It content or properties may change without notice + * due to changes in our knowledge of internal Microsoft Word binary structures. + * @author S. Ryan Ackley - * @author Sergey Vladimirov (vlsergey {at} gmail {dot} com) */ @Internal -public abstract class TAPAbstractType implements HDFType +public abstract class TAPAbstractType { protected short field_1_istd; @@ -56,19 +51,19 @@ public abstract class TAPAbstractType implements HDFType protected short field_11_wWidthBefore; protected short field_12_wWidthAfter; protected int field_13_widthAndFitsFlags; - private static BitField fAutofit = new BitField( 0x00000001 ); - private static BitField fKeepFollow = new BitField( 0x00000002 ); - private static BitField ftsWidth = new BitField( 0x0000001c ); - private static BitField ftsWidthIndent = new BitField( 0x000000e0 ); - private static BitField ftsWidthBefore = new BitField( 0x00000700 ); - private static BitField ftsWidthAfter = new BitField( 0x00003800 ); - private static BitField fNeverBeenAutofit = new BitField( 0x00004000 ); - private static BitField fInvalAutofit = new BitField( 0x00008000 ); - private static BitField widthAndFitsFlags_empty1 = new BitField( 0x00070000 ); - private static BitField fVert = new BitField( 0x00080000 ); - private static BitField pcVert = new BitField( 0x00300000 ); - private static BitField pcHorz = new BitField( 0x00c00000 ); - private static BitField widthAndFitsFlags_empty2 = new BitField( 0xff000000 ); + /**/private static BitField fAutofit = new BitField(0x00000001); + /**/private static BitField fKeepFollow = new BitField(0x00000002); + /**/private static BitField ftsWidth = new BitField(0x0000001c); + /**/private static BitField ftsWidthIndent = new BitField(0x000000e0); + /**/private static BitField ftsWidthBefore = new BitField(0x00000700); + /**/private static BitField ftsWidthAfter = new BitField(0x00003800); + /**/private static BitField fNeverBeenAutofit = new BitField(0x00004000); + /**/private static BitField fInvalAutofit = new BitField(0x00008000); + /**/private static BitField widthAndFitsFlags_empty1 = new BitField(0x00070000); + /**/private static BitField fVert = new BitField(0x00080000); + /**/private static BitField pcVert = new BitField(0x00300000); + /**/private static BitField pcHorz = new BitField(0x00c00000); + /**/private static BitField widthAndFitsFlags_empty2 = new BitField(0xff000000); protected int field_14_dxaAbs; protected int field_15_dyaAbs; protected int field_16_dxaFromText; @@ -81,12 +76,12 @@ public abstract class TAPAbstractType implements HDFType protected byte field_23_fSpare; protected int field_24_grpfTap; protected int field_25_internalFlags; - private static BitField fFirstRow = new BitField( 0x0001 ); - private static BitField fLastRow = new BitField( 0x0002 ); - private static BitField fOutline = new BitField( 0x0004 ); - private static BitField fOrigWordTableRules = new BitField( 0x0008 ); - private static BitField fCellSpacing = new BitField( 0x0010 ); - private static BitField grpfTap_unused = new BitField( 0xffe0 ); + /**/private static BitField fFirstRow = new BitField(0x0001); + /**/private static BitField fLastRow = new BitField(0x0002); + /**/private static BitField fOutline = new BitField(0x0004); + /**/private static BitField fOrigWordTableRules = new BitField(0x0008); + /**/private static BitField fCellSpacing = new BitField(0x0010); + /**/private static BitField grpfTap_unused = new BitField(0xffe0); protected short field_26_itcMac; protected int field_27_dxaAdjust; protected int field_28_dxaWebView; @@ -94,12 +89,12 @@ public abstract class TAPAbstractType implements HDFType protected int field_30_dxaColWidthWwd; protected short field_31_pctWwd; protected int field_32_viewFlags; - private static BitField fWrapToWwd = new BitField( 0x0001 ); - private static BitField fNotPageView = new BitField( 0x0002 ); - private static BitField viewFlags_unused1 = new BitField( 0x0004 ); - private static BitField fWebView = new BitField( 0x0008 ); - private static BitField fAdjusted = new BitField( 0x0010 ); - private static BitField viewFlags_unused2 = new BitField( 0xffe0 ); + /**/private static BitField fWrapToWwd = new BitField(0x0001); + /**/private static BitField fNotPageView = new BitField(0x0002); + /**/private static BitField viewFlags_unused1 = new BitField(0x0004); + /**/private static BitField fWebView = new BitField(0x0008); + /**/private static BitField fAdjusted = new BitField(0x0010); + /**/private static BitField viewFlags_unused2 = new BitField(0xffe0); protected short[] field_33_rgdxaCenter; protected short[] field_34_rgdxaCenterPrint; protected ShadingDescriptor field_35_shdTable; @@ -150,548 +145,432 @@ public abstract class TAPAbstractType implements HDFType protected BorderCode field_80_rgbrcInsideDefault_0; protected BorderCode field_81_rgbrcInsideDefault_1; - public TAPAbstractType() + protected TAPAbstractType() { - + this.field_8_tlp = new TableAutoformatLookSpecifier(); + this.field_33_rgdxaCenter = new short[0]; + this.field_34_rgdxaCenterPrint = new short[0]; + this.field_35_shdTable = new ShadingDescriptor(); + this.field_36_brcBottom = new BorderCode(); + this.field_37_brcTop = new BorderCode(); + this.field_38_brcLeft = new BorderCode(); + this.field_39_brcRight = new BorderCode(); + this.field_40_brcVertical = new BorderCode(); + this.field_41_brcHorizontal = new BorderCode(); + this.field_74_rgtc = new TableCellDescriptor[0]; + this.field_75_rgshd = new ShadingDescriptor[0]; + this.field_80_rgbrcInsideDefault_0 = new BorderCode(); + this.field_81_rgbrcInsideDefault_1 = new BorderCode(); } - public String toString() - { - StringBuffer buffer = new StringBuffer(); - - buffer.append( "[TAP]\n" ); - - buffer.append( " .istd = " ); - buffer.append( " (" ).append( getIstd() ).append( " )\n" ); - - buffer.append( " .jc = " ); - buffer.append( " (" ).append( getJc() ).append( " )\n" ); - - buffer.append( " .dxaGapHalf = " ); - buffer.append( " (" ).append( getDxaGapHalf() ).append( " )\n" ); - - buffer.append( " .dyaRowHeight = " ); - buffer.append( " (" ).append( getDyaRowHeight() ).append( " )\n" ); - - buffer.append( " .fCantSplit = " ); - buffer.append( " (" ).append( getFCantSplit() ).append( " )\n" ); - - buffer.append( " .fCantSplit90 = " ); - buffer.append( " (" ).append( getFCantSplit90() ).append( " )\n" ); - - buffer.append( " .fTableHeader = " ); - buffer.append( " (" ).append( getFTableHeader() ).append( " )\n" ); - - buffer.append( " .tlp = " ); - buffer.append( " (" ).append( getTlp() ).append( " )\n" ); - - buffer.append( " .wWidth = " ); - buffer.append( " (" ).append( getWWidth() ).append( " )\n" ); - - buffer.append( " .wWidthIndent = " ); - buffer.append( " (" ).append( getWWidthIndent() ).append( " )\n" ); - - buffer.append( " .wWidthBefore = " ); - buffer.append( " (" ).append( getWWidthBefore() ).append( " )\n" ); - - buffer.append( " .wWidthAfter = " ); - buffer.append( " (" ).append( getWWidthAfter() ).append( " )\n" ); - - buffer.append( " .widthAndFitsFlags = " ); - buffer.append( " (" ).append( getWidthAndFitsFlags() ).append( " )\n" ); - buffer.append( " .fAutofit = " ) - .append( isFAutofit() ).append( '\n' ); - buffer.append( " .fKeepFollow = " ) - .append( isFKeepFollow() ).append( '\n' ); - buffer.append( " .ftsWidth = " ) - .append( getFtsWidth() ).append( '\n' ); - buffer.append( " .ftsWidthIndent = " ) - .append( getFtsWidthIndent() ).append( '\n' ); - buffer.append( " .ftsWidthBefore = " ) - .append( getFtsWidthBefore() ).append( '\n' ); - buffer.append( " .ftsWidthAfter = " ) - .append( getFtsWidthAfter() ).append( '\n' ); - buffer.append( " .fNeverBeenAutofit = " ) - .append( isFNeverBeenAutofit() ).append( '\n' ); - buffer.append( " .fInvalAutofit = " ) - .append( isFInvalAutofit() ).append( '\n' ); - buffer.append( " .widthAndFitsFlags_empty1 = " ) - .append( getWidthAndFitsFlags_empty1() ).append( '\n' ); - buffer.append( " .fVert = " ) - .append( isFVert() ).append( '\n' ); - buffer.append( " .pcVert = " ) - .append( getPcVert() ).append( '\n' ); - buffer.append( " .pcHorz = " ) - .append( getPcHorz() ).append( '\n' ); - buffer.append( " .widthAndFitsFlags_empty2 = " ) - .append( getWidthAndFitsFlags_empty2() ).append( '\n' ); - - buffer.append( " .dxaAbs = " ); - buffer.append( " (" ).append( getDxaAbs() ).append( " )\n" ); - - buffer.append( " .dyaAbs = " ); - buffer.append( " (" ).append( getDyaAbs() ).append( " )\n" ); - - buffer.append( " .dxaFromText = " ); - buffer.append( " (" ).append( getDxaFromText() ).append( " )\n" ); - - buffer.append( " .dyaFromText = " ); - buffer.append( " (" ).append( getDyaFromText() ).append( " )\n" ); - - buffer.append( " .dxaFromTextRight = " ); - buffer.append( " (" ).append( getDxaFromTextRight() ).append( " )\n" ); - - buffer.append( " .dyaFromTextBottom = " ); - buffer.append( " (" ).append( getDyaFromTextBottom() ).append( " )\n" ); - - buffer.append( " .fBiDi = " ); - buffer.append( " (" ).append( getFBiDi() ).append( " )\n" ); - - buffer.append( " .fRTL = " ); - buffer.append( " (" ).append( getFRTL() ).append( " )\n" ); - - buffer.append( " .fNoAllowOverlap = " ); - buffer.append( " (" ).append( getFNoAllowOverlap() ).append( " )\n" ); - - buffer.append( " .fSpare = " ); - buffer.append( " (" ).append( getFSpare() ).append( " )\n" ); - - buffer.append( " .grpfTap = " ); - buffer.append( " (" ).append( getGrpfTap() ).append( " )\n" ); - - buffer.append( " .internalFlags = " ); - buffer.append( " (" ).append( getInternalFlags() ).append( " )\n" ); - buffer.append( " .fFirstRow = " ) - .append( isFFirstRow() ).append( '\n' ); - buffer.append( " .fLastRow = " ) - .append( isFLastRow() ).append( '\n' ); - buffer.append( " .fOutline = " ) - .append( isFOutline() ).append( '\n' ); - buffer.append( " .fOrigWordTableRules = " ) - .append( isFOrigWordTableRules() ).append( '\n' ); - buffer.append( " .fCellSpacing = " ) - .append( isFCellSpacing() ).append( '\n' ); - buffer.append( " .grpfTap_unused = " ) - .append( getGrpfTap_unused() ).append( '\n' ); - - buffer.append( " .itcMac = " ); - buffer.append( " (" ).append( getItcMac() ).append( " )\n" ); - - buffer.append( " .dxaAdjust = " ); - buffer.append( " (" ).append( getDxaAdjust() ).append( " )\n" ); - - buffer.append( " .dxaWebView = " ); - buffer.append( " (" ).append( getDxaWebView() ).append( " )\n" ); - - buffer.append( " .dxaRTEWrapWidth = " ); - buffer.append( " (" ).append( getDxaRTEWrapWidth() ).append( " )\n" ); - - buffer.append( " .dxaColWidthWwd = " ); - buffer.append( " (" ).append( getDxaColWidthWwd() ).append( " )\n" ); - - buffer.append( " .pctWwd = " ); - buffer.append( " (" ).append( getPctWwd() ).append( " )\n" ); - - buffer.append( " .viewFlags = " ); - buffer.append( " (" ).append( getViewFlags() ).append( " )\n" ); - buffer.append( " .fWrapToWwd = " ) - .append( isFWrapToWwd() ).append( '\n' ); - buffer.append( " .fNotPageView = " ) - .append( isFNotPageView() ).append( '\n' ); - buffer.append( " .viewFlags_unused1 = " ) - .append( isViewFlags_unused1() ).append( '\n' ); - buffer.append( " .fWebView = " ) - .append( isFWebView() ).append( '\n' ); - buffer.append( " .fAdjusted = " ) - .append( isFAdjusted() ).append( '\n' ); - buffer.append( " .viewFlags_unused2 = " ) - .append( getViewFlags_unused2() ).append( '\n' ); - - buffer.append( " .rgdxaCenter = " ); - buffer.append( " (" ).append( getRgdxaCenter() ).append( " )\n" ); - - buffer.append( " .rgdxaCenterPrint = " ); - buffer.append( " (" ).append( getRgdxaCenterPrint() ).append( " )\n" ); - - buffer.append( " .shdTable = " ); - buffer.append( " (" ).append( getShdTable() ).append( " )\n" ); - - buffer.append( " .brcBottom = " ); - buffer.append( " (" ).append( getBrcBottom() ).append( " )\n" ); - - buffer.append( " .brcTop = " ); - buffer.append( " (" ).append( getBrcTop() ).append( " )\n" ); - - buffer.append( " .brcLeft = " ); - buffer.append( " (" ).append( getBrcLeft() ).append( " )\n" ); - - buffer.append( " .brcRight = " ); - buffer.append( " (" ).append( getBrcRight() ).append( " )\n" ); - - buffer.append( " .brcVertical = " ); - buffer.append( " (" ).append( getBrcVertical() ).append( " )\n" ); - - buffer.append( " .brcHorizontal = " ); - buffer.append( " (" ).append( getBrcHorizontal() ).append( " )\n" ); - - buffer.append( " .wCellPaddingDefaultTop = " ); - buffer.append( " (" ).append( getWCellPaddingDefaultTop() ) - .append( " )\n" ); - - buffer.append( " .wCellPaddingDefaultLeft = " ); - buffer.append( " (" ).append( getWCellPaddingDefaultLeft() ) - .append( " )\n" ); - - buffer.append( " .wCellPaddingDefaultBottom = " ); - buffer.append( " (" ).append( getWCellPaddingDefaultBottom() ) - .append( " )\n" ); - - buffer.append( " .wCellPaddingDefaultRight = " ); - buffer.append( " (" ).append( getWCellPaddingDefaultRight() ) - .append( " )\n" ); - - buffer.append( " .ftsCellPaddingDefaultTop = " ); - buffer.append( " (" ).append( getFtsCellPaddingDefaultTop() ) - .append( " )\n" ); - - buffer.append( " .ftsCellPaddingDefaultLeft = " ); - buffer.append( " (" ).append( getFtsCellPaddingDefaultLeft() ) - .append( " )\n" ); - - buffer.append( " .ftsCellPaddingDefaultBottom = " ); - buffer.append( " (" ).append( getFtsCellPaddingDefaultBottom() ) - .append( " )\n" ); - - buffer.append( " .ftsCellPaddingDefaultRight = " ); - buffer.append( " (" ).append( getFtsCellPaddingDefaultRight() ) - .append( " )\n" ); - - buffer.append( " .wCellSpacingDefaultTop = " ); - buffer.append( " (" ).append( getWCellSpacingDefaultTop() ) - .append( " )\n" ); - - buffer.append( " .wCellSpacingDefaultLeft = " ); - buffer.append( " (" ).append( getWCellSpacingDefaultLeft() ) - .append( " )\n" ); - - buffer.append( " .wCellSpacingDefaultBottom = " ); - buffer.append( " (" ).append( getWCellSpacingDefaultBottom() ) - .append( " )\n" ); - - buffer.append( " .wCellSpacingDefaultRight = " ); - buffer.append( " (" ).append( getWCellSpacingDefaultRight() ) - .append( " )\n" ); - - buffer.append( " .ftsCellSpacingDefaultTop = " ); - buffer.append( " (" ).append( getFtsCellSpacingDefaultTop() ) - .append( " )\n" ); - - buffer.append( " .ftsCellSpacingDefaultLeft = " ); - buffer.append( " (" ).append( getFtsCellSpacingDefaultLeft() ) - .append( " )\n" ); - - buffer.append( " .ftsCellSpacingDefaultBottom = " ); - buffer.append( " (" ).append( getFtsCellSpacingDefaultBottom() ) - .append( " )\n" ); - - buffer.append( " .ftsCellSpacingDefaultRight = " ); - buffer.append( " (" ).append( getFtsCellSpacingDefaultRight() ) - .append( " )\n" ); - - buffer.append( " .wCellPaddingOuterTop = " ); - buffer.append( " (" ).append( getWCellPaddingOuterTop() ) - .append( " )\n" ); - buffer.append( " .wCellPaddingOuterLeft = " ); - buffer.append( " (" ).append( getWCellPaddingOuterLeft() ) - .append( " )\n" ); - - buffer.append( " .wCellPaddingOuterBottom = " ); - buffer.append( " (" ).append( getWCellPaddingOuterBottom() ) - .append( " )\n" ); - - buffer.append( " .wCellPaddingOuterRight = " ); - buffer.append( " (" ).append( getWCellPaddingOuterRight() ) - .append( " )\n" ); - - buffer.append( " .ftsCellPaddingOuterTop = " ); - buffer.append( " (" ).append( getFtsCellPaddingOuterTop() ) - .append( " )\n" ); - - buffer.append( " .ftsCellPaddingOuterLeft = " ); - buffer.append( " (" ).append( getFtsCellPaddingOuterLeft() ) - .append( " )\n" ); - - buffer.append( " .ftsCellPaddingOuterBottom = " ); - buffer.append( " (" ).append( getFtsCellPaddingOuterBottom() ) - .append( " )\n" ); - - buffer.append( " .ftsCellPaddingOuterRight = " ); - buffer.append( " (" ).append( getFtsCellPaddingOuterRight() ) - .append( " )\n" ); - - buffer.append( " .wCellSpacingOuterTop = " ); - buffer.append( " (" ).append( getWCellSpacingOuterTop() ) - .append( " )\n" ); - - buffer.append( " .wCellSpacingOuterLeft = " ); - buffer.append( " (" ).append( getWCellSpacingOuterLeft() ) - .append( " )\n" ); - - buffer.append( " .wCellSpacingOuterBottom = " ); - buffer.append( " (" ).append( getWCellSpacingOuterBottom() ) - .append( " )\n" ); - - buffer.append( " .wCellSpacingOuterRight = " ); - buffer.append( " (" ).append( getWCellSpacingOuterRight() ) - .append( " )\n" ); - - buffer.append( " .ftsCellSpacingOuterTop = " ); - buffer.append( " (" ).append( getFtsCellSpacingOuterTop() ) - .append( " )\n" ); - - buffer.append( " .ftsCellSpacingOuterLeft = " ); - buffer.append( " (" ).append( getFtsCellSpacingOuterLeft() ) - .append( " )\n" ); - - buffer.append( " .ftsCellSpacingOuterBottom = " ); - buffer.append( " (" ).append( getFtsCellSpacingOuterBottom() ) - .append( " )\n" ); - - buffer.append( " .ftsCellSpacingOuterRight = " ); - buffer.append( " (" ).append( getFtsCellSpacingOuterRight() ) - .append( " )\n" ); - - buffer.append( " .rgtc = " ); - buffer.append( " (" ).append( getRgtc() ).append( " )\n" ); - - buffer.append( " .rgshd = " ); - buffer.append( " (" ).append( getRgshd() ).append( " )\n" ); - - buffer.append( " .fPropRMark = " ); - buffer.append( " (" ).append( getFPropRMark() ).append( " )\n" ); - - buffer.append( " .fHasOldProps = " ); - buffer.append( " (" ).append( getFHasOldProps() ).append( " )\n" ); - - buffer.append( " .cHorzBands = " ); - buffer.append( " (" ).append( getCHorzBands() ).append( " )\n" ); - - buffer.append( " .cVertBands = " ); - buffer.append( " (" ).append( getCVertBands() ).append( " )\n" ); - - buffer.append( " .rgbrcInsideDefault_0 = " ); - buffer.append( " (" ).append( getRgbrcInsideDefault_0() ) - .append( " )\n" ); - - buffer.append( " .rgbrcInsideDefault_1 = " ); - buffer.append( " (" ).append( getRgbrcInsideDefault_1() ) - .append( " )\n" ); - - buffer.append( "[/TAP]\n" ); - return buffer.toString(); - } - - /** - * Size of record (exluding 4 byte header) - */ - public int getSize() + public String toString() { - return 4 + +2 + 2 + 4 + 4 + 0 + 0 + 0 + 4 + 2 + 2 + 2 + 2 + 4 + 4 + 4 - + 4 + 4 + 4 + 4 + 1 + 1 + 1 + 1 + 2 + 2 + 2 + 4 + 4 + 4 + 4 + 2 - + 2 + 130 + 130 + 10 + 4 + 4 + 4 + 4 + 4 + 4 + 2 + 2 + 2 + 2 - + 1 + 1 + 1 + 1 + 2 + 2 + 2 + 2 + 1 + 1 + 1 + 1 + 2 + 2 + 2 + 2 - + 1 + 1 + 1 + 1 + 2 + 2 + 2 + 2 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 1 - + 1 + 1 + 8 + 8; - } - - /** - * Get the istd field for the TAP record. - */ + StringBuilder builder = new StringBuilder(); + builder.append("[TAP]\n"); + builder.append(" .istd = "); + builder.append(" (").append(getIstd()).append(" )\n"); + builder.append(" .jc = "); + builder.append(" (").append(getJc()).append(" )\n"); + builder.append(" .dxaGapHalf = "); + builder.append(" (").append(getDxaGapHalf()).append(" )\n"); + builder.append(" .dyaRowHeight = "); + builder.append(" (").append(getDyaRowHeight()).append(" )\n"); + builder.append(" .fCantSplit = "); + builder.append(" (").append(getFCantSplit()).append(" )\n"); + builder.append(" .fCantSplit90 = "); + builder.append(" (").append(getFCantSplit90()).append(" )\n"); + builder.append(" .fTableHeader = "); + builder.append(" (").append(getFTableHeader()).append(" )\n"); + builder.append(" .tlp = "); + builder.append(" (").append(getTlp()).append(" )\n"); + builder.append(" .wWidth = "); + builder.append(" (").append(getWWidth()).append(" )\n"); + builder.append(" .wWidthIndent = "); + builder.append(" (").append(getWWidthIndent()).append(" )\n"); + builder.append(" .wWidthBefore = "); + builder.append(" (").append(getWWidthBefore()).append(" )\n"); + builder.append(" .wWidthAfter = "); + builder.append(" (").append(getWWidthAfter()).append(" )\n"); + builder.append(" .widthAndFitsFlags = "); + builder.append(" (").append(getWidthAndFitsFlags()).append(" )\n"); + builder.append(" .fAutofit = ").append(isFAutofit()).append('\n'); + builder.append(" .fKeepFollow = ").append(isFKeepFollow()).append('\n'); + builder.append(" .ftsWidth = ").append(getFtsWidth()).append('\n'); + builder.append(" .ftsWidthIndent = ").append(getFtsWidthIndent()).append('\n'); + builder.append(" .ftsWidthBefore = ").append(getFtsWidthBefore()).append('\n'); + builder.append(" .ftsWidthAfter = ").append(getFtsWidthAfter()).append('\n'); + builder.append(" .fNeverBeenAutofit = ").append(isFNeverBeenAutofit()).append('\n'); + builder.append(" .fInvalAutofit = ").append(isFInvalAutofit()).append('\n'); + builder.append(" .widthAndFitsFlags_empty1 = ").append(getWidthAndFitsFlags_empty1()).append('\n'); + builder.append(" .fVert = ").append(isFVert()).append('\n'); + builder.append(" .pcVert = ").append(getPcVert()).append('\n'); + builder.append(" .pcHorz = ").append(getPcHorz()).append('\n'); + builder.append(" .widthAndFitsFlags_empty2 = ").append(getWidthAndFitsFlags_empty2()).append('\n'); + builder.append(" .dxaAbs = "); + builder.append(" (").append(getDxaAbs()).append(" )\n"); + builder.append(" .dyaAbs = "); + builder.append(" (").append(getDyaAbs()).append(" )\n"); + builder.append(" .dxaFromText = "); + builder.append(" (").append(getDxaFromText()).append(" )\n"); + builder.append(" .dyaFromText = "); + builder.append(" (").append(getDyaFromText()).append(" )\n"); + builder.append(" .dxaFromTextRight = "); + builder.append(" (").append(getDxaFromTextRight()).append(" )\n"); + builder.append(" .dyaFromTextBottom = "); + builder.append(" (").append(getDyaFromTextBottom()).append(" )\n"); + builder.append(" .fBiDi = "); + builder.append(" (").append(getFBiDi()).append(" )\n"); + builder.append(" .fRTL = "); + builder.append(" (").append(getFRTL()).append(" )\n"); + builder.append(" .fNoAllowOverlap = "); + builder.append(" (").append(getFNoAllowOverlap()).append(" )\n"); + builder.append(" .fSpare = "); + builder.append(" (").append(getFSpare()).append(" )\n"); + builder.append(" .grpfTap = "); + builder.append(" (").append(getGrpfTap()).append(" )\n"); + builder.append(" .internalFlags = "); + builder.append(" (").append(getInternalFlags()).append(" )\n"); + builder.append(" .fFirstRow = ").append(isFFirstRow()).append('\n'); + builder.append(" .fLastRow = ").append(isFLastRow()).append('\n'); + builder.append(" .fOutline = ").append(isFOutline()).append('\n'); + builder.append(" .fOrigWordTableRules = ").append(isFOrigWordTableRules()).append('\n'); + builder.append(" .fCellSpacing = ").append(isFCellSpacing()).append('\n'); + builder.append(" .grpfTap_unused = ").append(getGrpfTap_unused()).append('\n'); + builder.append(" .itcMac = "); + builder.append(" (").append(getItcMac()).append(" )\n"); + builder.append(" .dxaAdjust = "); + builder.append(" (").append(getDxaAdjust()).append(" )\n"); + builder.append(" .dxaWebView = "); + builder.append(" (").append(getDxaWebView()).append(" )\n"); + builder.append(" .dxaRTEWrapWidth = "); + builder.append(" (").append(getDxaRTEWrapWidth()).append(" )\n"); + builder.append(" .dxaColWidthWwd = "); + builder.append(" (").append(getDxaColWidthWwd()).append(" )\n"); + builder.append(" .pctWwd = "); + builder.append(" (").append(getPctWwd()).append(" )\n"); + builder.append(" .viewFlags = "); + builder.append(" (").append(getViewFlags()).append(" )\n"); + builder.append(" .fWrapToWwd = ").append(isFWrapToWwd()).append('\n'); + builder.append(" .fNotPageView = ").append(isFNotPageView()).append('\n'); + builder.append(" .viewFlags_unused1 = ").append(isViewFlags_unused1()).append('\n'); + builder.append(" .fWebView = ").append(isFWebView()).append('\n'); + builder.append(" .fAdjusted = ").append(isFAdjusted()).append('\n'); + builder.append(" .viewFlags_unused2 = ").append(getViewFlags_unused2()).append('\n'); + builder.append(" .rgdxaCenter = "); + builder.append(" (").append(getRgdxaCenter()).append(" )\n"); + builder.append(" .rgdxaCenterPrint = "); + builder.append(" (").append(getRgdxaCenterPrint()).append(" )\n"); + builder.append(" .shdTable = "); + builder.append(" (").append(getShdTable()).append(" )\n"); + builder.append(" .brcBottom = "); + builder.append(" (").append(getBrcBottom()).append(" )\n"); + builder.append(" .brcTop = "); + builder.append(" (").append(getBrcTop()).append(" )\n"); + builder.append(" .brcLeft = "); + builder.append(" (").append(getBrcLeft()).append(" )\n"); + builder.append(" .brcRight = "); + builder.append(" (").append(getBrcRight()).append(" )\n"); + builder.append(" .brcVertical = "); + builder.append(" (").append(getBrcVertical()).append(" )\n"); + builder.append(" .brcHorizontal = "); + builder.append(" (").append(getBrcHorizontal()).append(" )\n"); + builder.append(" .wCellPaddingDefaultTop = "); + builder.append(" (").append(getWCellPaddingDefaultTop()).append(" )\n"); + builder.append(" .wCellPaddingDefaultLeft = "); + builder.append(" (").append(getWCellPaddingDefaultLeft()).append(" )\n"); + builder.append(" .wCellPaddingDefaultBottom = "); + builder.append(" (").append(getWCellPaddingDefaultBottom()).append(" )\n"); + builder.append(" .wCellPaddingDefaultRight = "); + builder.append(" (").append(getWCellPaddingDefaultRight()).append(" )\n"); + builder.append(" .ftsCellPaddingDefaultTop = "); + builder.append(" (").append(getFtsCellPaddingDefaultTop()).append(" )\n"); + builder.append(" .ftsCellPaddingDefaultLeft = "); + builder.append(" (").append(getFtsCellPaddingDefaultLeft()).append(" )\n"); + builder.append(" .ftsCellPaddingDefaultBottom = "); + builder.append(" (").append(getFtsCellPaddingDefaultBottom()).append(" )\n"); + builder.append(" .ftsCellPaddingDefaultRight = "); + builder.append(" (").append(getFtsCellPaddingDefaultRight()).append(" )\n"); + builder.append(" .wCellSpacingDefaultTop = "); + builder.append(" (").append(getWCellSpacingDefaultTop()).append(" )\n"); + builder.append(" .wCellSpacingDefaultLeft = "); + builder.append(" (").append(getWCellSpacingDefaultLeft()).append(" )\n"); + builder.append(" .wCellSpacingDefaultBottom = "); + builder.append(" (").append(getWCellSpacingDefaultBottom()).append(" )\n"); + builder.append(" .wCellSpacingDefaultRight = "); + builder.append(" (").append(getWCellSpacingDefaultRight()).append(" )\n"); + builder.append(" .ftsCellSpacingDefaultTop = "); + builder.append(" (").append(getFtsCellSpacingDefaultTop()).append(" )\n"); + builder.append(" .ftsCellSpacingDefaultLeft = "); + builder.append(" (").append(getFtsCellSpacingDefaultLeft()).append(" )\n"); + builder.append(" .ftsCellSpacingDefaultBottom = "); + builder.append(" (").append(getFtsCellSpacingDefaultBottom()).append(" )\n"); + builder.append(" .ftsCellSpacingDefaultRight = "); + builder.append(" (").append(getFtsCellSpacingDefaultRight()).append(" )\n"); + builder.append(" .wCellPaddingOuterTop = "); + builder.append(" (").append(getWCellPaddingOuterTop()).append(" )\n"); + builder.append(" .wCellPaddingOuterLeft = "); + builder.append(" (").append(getWCellPaddingOuterLeft()).append(" )\n"); + builder.append(" .wCellPaddingOuterBottom = "); + builder.append(" (").append(getWCellPaddingOuterBottom()).append(" )\n"); + builder.append(" .wCellPaddingOuterRight = "); + builder.append(" (").append(getWCellPaddingOuterRight()).append(" )\n"); + builder.append(" .ftsCellPaddingOuterTop = "); + builder.append(" (").append(getFtsCellPaddingOuterTop()).append(" )\n"); + builder.append(" .ftsCellPaddingOuterLeft = "); + builder.append(" (").append(getFtsCellPaddingOuterLeft()).append(" )\n"); + builder.append(" .ftsCellPaddingOuterBottom = "); + builder.append(" (").append(getFtsCellPaddingOuterBottom()).append(" )\n"); + builder.append(" .ftsCellPaddingOuterRight = "); + builder.append(" (").append(getFtsCellPaddingOuterRight()).append(" )\n"); + builder.append(" .wCellSpacingOuterTop = "); + builder.append(" (").append(getWCellSpacingOuterTop()).append(" )\n"); + builder.append(" .wCellSpacingOuterLeft = "); + builder.append(" (").append(getWCellSpacingOuterLeft()).append(" )\n"); + builder.append(" .wCellSpacingOuterBottom = "); + builder.append(" (").append(getWCellSpacingOuterBottom()).append(" )\n"); + builder.append(" .wCellSpacingOuterRight = "); + builder.append(" (").append(getWCellSpacingOuterRight()).append(" )\n"); + builder.append(" .ftsCellSpacingOuterTop = "); + builder.append(" (").append(getFtsCellSpacingOuterTop()).append(" )\n"); + builder.append(" .ftsCellSpacingOuterLeft = "); + builder.append(" (").append(getFtsCellSpacingOuterLeft()).append(" )\n"); + builder.append(" .ftsCellSpacingOuterBottom = "); + builder.append(" (").append(getFtsCellSpacingOuterBottom()).append(" )\n"); + builder.append(" .ftsCellSpacingOuterRight = "); + builder.append(" (").append(getFtsCellSpacingOuterRight()).append(" )\n"); + builder.append(" .rgtc = "); + builder.append(" (").append(getRgtc()).append(" )\n"); + builder.append(" .rgshd = "); + builder.append(" (").append(getRgshd()).append(" )\n"); + builder.append(" .fPropRMark = "); + builder.append(" (").append(getFPropRMark()).append(" )\n"); + builder.append(" .fHasOldProps = "); + builder.append(" (").append(getFHasOldProps()).append(" )\n"); + builder.append(" .cHorzBands = "); + builder.append(" (").append(getCHorzBands()).append(" )\n"); + builder.append(" .cVertBands = "); + builder.append(" (").append(getCVertBands()).append(" )\n"); + builder.append(" .rgbrcInsideDefault_0 = "); + builder.append(" (").append(getRgbrcInsideDefault_0()).append(" )\n"); + builder.append(" .rgbrcInsideDefault_1 = "); + builder.append(" (").append(getRgbrcInsideDefault_1()).append(" )\n"); + + builder.append("[/TAP]\n"); + return builder.toString(); + } + + /** + * Table style for the Table. + */ + @Internal public short getIstd() { return field_1_istd; } /** - * Set the istd field for the TAP record. + * Table style for the Table. */ + @Internal public void setIstd( short field_1_istd ) { this.field_1_istd = field_1_istd; } /** - * Get the jc field for the TAP record. + * Justification code. specifies how table row should be justified within its column. 0 -- left justify, 1 -- center, 2 -- right justify. */ + @Internal public short getJc() { return field_2_jc; } /** - * Set the jc field for the TAP record. + * Justification code. specifies how table row should be justified within its column. 0 -- left justify, 1 -- center, 2 -- right justify. */ + @Internal public void setJc( short field_2_jc ) { this.field_2_jc = field_2_jc; } /** - * Get the dxaGapHalf field for the TAP record. + * Measures half of the white space that will be maintained between text in adjacent columns of a table row. A dxaGapHalf width of white space will be maintained on both sides of a column boundary.. */ + @Internal public int getDxaGapHalf() { return field_3_dxaGapHalf; } /** - * Set the dxaGapHalf field for the TAP record. + * Measures half of the white space that will be maintained between text in adjacent columns of a table row. A dxaGapHalf width of white space will be maintained on both sides of a column boundary.. */ + @Internal public void setDxaGapHalf( int field_3_dxaGapHalf ) { this.field_3_dxaGapHalf = field_3_dxaGapHalf; } /** - * Get the dyaRowHeight field for the TAP record. + * When greater than 0, guarantees that the height of the table will be at least dyaRowHeight high. When less than 0, guarantees that the height of the table will be exactly absolute value of dyaRowHeight high. When 0, table will be given a height large enough to represent all of the text in all of the cells of the table. Cells with vertical text flow make no contribution to the computation of the height of rows with auto or at least height. Neither do vertically merged cells, except in the last row of the vertical merge. If an auto height row consists entirely of cells which have vertical text direction or are vertically merged, and the row does not contain the last cell in any vertical cell merge, then the row is given height equal to that of the end of cell mark in the first cell.. */ + @Internal public int getDyaRowHeight() { return field_4_dyaRowHeight; } /** - * Set the dyaRowHeight field for the TAP record. + * When greater than 0, guarantees that the height of the table will be at least dyaRowHeight high. When less than 0, guarantees that the height of the table will be exactly absolute value of dyaRowHeight high. When 0, table will be given a height large enough to represent all of the text in all of the cells of the table. Cells with vertical text flow make no contribution to the computation of the height of rows with auto or at least height. Neither do vertically merged cells, except in the last row of the vertical merge. If an auto height row consists entirely of cells which have vertical text direction or are vertically merged, and the row does not contain the last cell in any vertical cell merge, then the row is given height equal to that of the end of cell mark in the first cell.. */ + @Internal public void setDyaRowHeight( int field_4_dyaRowHeight ) { this.field_4_dyaRowHeight = field_4_dyaRowHeight; } /** - * Get the fCantSplit field for the TAP record. + * When 1, table row may not be split across page bounds. */ + @Internal public boolean getFCantSplit() { return field_5_fCantSplit; } /** - * Set the fCantSplit field for the TAP record. + * When 1, table row may not be split across page bounds. */ + @Internal public void setFCantSplit( boolean field_5_fCantSplit ) { this.field_5_fCantSplit = field_5_fCantSplit; } /** - * Get the fCantSplit90 field for the TAP record. + * When 1, table row may not be split across page bounds. Used for Word 2000 and Word 97.. */ + @Internal public boolean getFCantSplit90() { return field_6_fCantSplit90; } /** - * Set the fCantSplit90 field for the TAP record. + * When 1, table row may not be split across page bounds. Used for Word 2000 and Word 97.. */ + @Internal public void setFCantSplit90( boolean field_6_fCantSplit90 ) { this.field_6_fCantSplit90 = field_6_fCantSplit90; } /** - * Get the fTableHeader field for the TAP record. + * When 1, table row is to be used as the header of the table. */ + @Internal public boolean getFTableHeader() { return field_7_fTableHeader; } /** - * Set the fTableHeader field for the TAP record. + * When 1, table row is to be used as the header of the table. */ + @Internal public void setFTableHeader( boolean field_7_fTableHeader ) { this.field_7_fTableHeader = field_7_fTableHeader; } /** - * Get the tlp field for the TAP record. + * Table look specifier. */ + @Internal public TableAutoformatLookSpecifier getTlp() { return field_8_tlp; } /** - * Set the tlp field for the TAP record. + * Table look specifier. */ + @Internal public void setTlp( TableAutoformatLookSpecifier field_8_tlp ) { this.field_8_tlp = field_8_tlp; } /** - * Get the wWidth field for the TAP record. + * Preferred table width. */ + @Internal public short getWWidth() { return field_9_wWidth; } /** - * Set the wWidth field for the TAP record. + * Preferred table width. */ + @Internal public void setWWidth( short field_9_wWidth ) { this.field_9_wWidth = field_9_wWidth; } /** - * Get the wWidthIndent field for the TAP record. + * Left Indent. */ + @Internal public short getWWidthIndent() { return field_10_wWidthIndent; } /** - * Set the wWidthIndent field for the TAP record. + * Left Indent. */ + @Internal public void setWWidthIndent( short field_10_wWidthIndent ) { this.field_10_wWidthIndent = field_10_wWidthIndent; } /** - * Get the wWidthBefore field for the TAP record. + * Width of invisible cell (used for layout purposes) before the first visible cell in the row.. */ + @Internal public short getWWidthBefore() { return field_11_wWidthBefore; } /** - * Set the wWidthBefore field for the TAP record. + * Width of invisible cell (used for layout purposes) before the first visible cell in the row.. */ + @Internal public void setWWidthBefore( short field_11_wWidthBefore ) { this.field_11_wWidthBefore = field_11_wWidthBefore; } /** - * Get the wWidthAfter field for the TAP record. + * Width of invisible cell (used for layout purposes) after the last visible cell in the row.. */ + @Internal public short getWWidthAfter() { return field_12_wWidthAfter; } /** - * Set the wWidthAfter field for the TAP record. + * Width of invisible cell (used for layout purposes) after the last visible cell in the row.. */ + @Internal public void setWWidthAfter( short field_12_wWidthAfter ) { this.field_12_wWidthAfter = field_12_wWidthAfter; @@ -700,6 +579,7 @@ public abstract class TAPAbstractType implements HDFType /** * Get the widthAndFitsFlags field for the TAP record. */ + @Internal public int getWidthAndFitsFlags() { return field_13_widthAndFitsFlags; @@ -708,358 +588,403 @@ public abstract class TAPAbstractType implements HDFType /** * Set the widthAndFitsFlags field for the TAP record. */ + @Internal public void setWidthAndFitsFlags( int field_13_widthAndFitsFlags ) { this.field_13_widthAndFitsFlags = field_13_widthAndFitsFlags; } /** - * Get the dxaAbs field for the TAP record. + * Absolute horizontal position. */ + @Internal public int getDxaAbs() { return field_14_dxaAbs; } /** - * Set the dxaAbs field for the TAP record. + * Absolute horizontal position. */ + @Internal public void setDxaAbs( int field_14_dxaAbs ) { this.field_14_dxaAbs = field_14_dxaAbs; } /** - * Get the dyaAbs field for the TAP record. + * Absolute vertical position. */ + @Internal public int getDyaAbs() { return field_15_dyaAbs; } /** - * Set the dyaAbs field for the TAP record. + * Absolute vertical position. */ + @Internal public void setDyaAbs( int field_15_dyaAbs ) { this.field_15_dyaAbs = field_15_dyaAbs; } /** - * Get the dxaFromText field for the TAP record. + * Left distance from surrounding text when absolutely positioned. */ + @Internal public int getDxaFromText() { return field_16_dxaFromText; } /** - * Set the dxaFromText field for the TAP record. + * Left distance from surrounding text when absolutely positioned. */ + @Internal public void setDxaFromText( int field_16_dxaFromText ) { this.field_16_dxaFromText = field_16_dxaFromText; } /** - * Get the dyaFromText field for the TAP record. + * Top distance from surrounding text when absolutely positioned. */ + @Internal public int getDyaFromText() { return field_17_dyaFromText; } /** - * Set the dyaFromText field for the TAP record. + * Top distance from surrounding text when absolutely positioned. */ + @Internal public void setDyaFromText( int field_17_dyaFromText ) { this.field_17_dyaFromText = field_17_dyaFromText; } /** - * Get the dxaFromTextRight field for the TAP record. + * Right distance from surrounding text when absolutely positioned. */ + @Internal public int getDxaFromTextRight() { return field_18_dxaFromTextRight; } /** - * Set the dxaFromTextRight field for the TAP record. + * Right distance from surrounding text when absolutely positioned. */ + @Internal public void setDxaFromTextRight( int field_18_dxaFromTextRight ) { this.field_18_dxaFromTextRight = field_18_dxaFromTextRight; } /** - * Get the dyaFromTextBottom field for the TAP record. + * Bottom distance from surrounding text when absolutely positioned. */ + @Internal public int getDyaFromTextBottom() { return field_19_dyaFromTextBottom; } /** - * Set the dyaFromTextBottom field for the TAP record. + * Bottom distance from surrounding text when absolutely positioned. */ + @Internal public void setDyaFromTextBottom( int field_19_dyaFromTextBottom ) { this.field_19_dyaFromTextBottom = field_19_dyaFromTextBottom; } /** - * Get the fBiDi field for the TAP record. + * When 1, table is right-to-left. Logical right-to-left table: The CP stream of a right-to-left table is meant to be displayed from right to left. So for example the first table cell is displayed on the right side of the table instead of the left.. */ + @Internal public byte getFBiDi() { return field_20_fBiDi; } /** - * Set the fBiDi field for the TAP record. + * When 1, table is right-to-left. Logical right-to-left table: The CP stream of a right-to-left table is meant to be displayed from right to left. So for example the first table cell is displayed on the right side of the table instead of the left.. */ + @Internal public void setFBiDi( byte field_20_fBiDi ) { this.field_20_fBiDi = field_20_fBiDi; } /** - * Get the fRTL field for the TAP record. + * Word 2000 style right-to-left table. Visual right-to-left table: The CP stream of a right-to-left table is displayed from left to right just as for a normal table. So, the text which is meant to be in the first (rightmost) table cell must be placed in the last table cell in the CP stream.. */ + @Internal public byte getFRTL() { return field_21_fRTL; } /** - * Set the fRTL field for the TAP record. + * Word 2000 style right-to-left table. Visual right-to-left table: The CP stream of a right-to-left table is displayed from left to right just as for a normal table. So, the text which is meant to be in the first (rightmost) table cell must be placed in the last table cell in the CP stream.. */ + @Internal public void setFRTL( byte field_21_fRTL ) { this.field_21_fRTL = field_21_fRTL; } /** - * Get the fNoAllowOverlap field for the TAP record. + * When set to 1, do not allow absolutely positioned table to overlap with other tables. */ + @Internal public byte getFNoAllowOverlap() { return field_22_fNoAllowOverlap; } /** - * Set the fNoAllowOverlap field for the TAP record. + * When set to 1, do not allow absolutely positioned table to overlap with other tables. */ + @Internal public void setFNoAllowOverlap( byte field_22_fNoAllowOverlap ) { this.field_22_fNoAllowOverlap = field_22_fNoAllowOverlap; } /** - * Get the fSpare field for the TAP record. + * Not used. */ + @Internal public byte getFSpare() { return field_23_fSpare; } /** - * Set the fSpare field for the TAP record. + * Not used. */ + @Internal public void setFSpare( byte field_23_fSpare ) { this.field_23_fSpare = field_23_fSpare; } /** - * Get the grpfTap field for the TAP record. + * Used internally by Word. */ + @Internal public int getGrpfTap() { return field_24_grpfTap; } /** - * Set the grpfTap field for the TAP record. + * Used internally by Word. */ + @Internal public void setGrpfTap( int field_24_grpfTap ) { this.field_24_grpfTap = field_24_grpfTap; } /** - * Get the internalFlags field for the TAP record. + * Used internally by Word. */ + @Internal public int getInternalFlags() { return field_25_internalFlags; } /** - * Set the internalFlags field for the TAP record. + * Used internally by Word. */ + @Internal public void setInternalFlags( int field_25_internalFlags ) { this.field_25_internalFlags = field_25_internalFlags; } /** - * Get the itcMac field for the TAP record. + * Count of cells defined for this row. itcMac must be >= 0 and less than or equal to 64.. */ + @Internal public short getItcMac() { return field_26_itcMac; } /** - * Set the itcMac field for the TAP record. + * Count of cells defined for this row. itcMac must be >= 0 and less than or equal to 64.. */ + @Internal public void setItcMac( short field_26_itcMac ) { this.field_26_itcMac = field_26_itcMac; } /** - * Get the dxaAdjust field for the TAP record. + * Used internally by Word. */ + @Internal public int getDxaAdjust() { return field_27_dxaAdjust; } /** - * Set the dxaAdjust field for the TAP record. + * Used internally by Word. */ + @Internal public void setDxaAdjust( int field_27_dxaAdjust ) { this.field_27_dxaAdjust = field_27_dxaAdjust; } /** - * Get the dxaWebView field for the TAP record. + * Used internally by Word. */ + @Internal public int getDxaWebView() { return field_28_dxaWebView; } /** - * Set the dxaWebView field for the TAP record. + * Used internally by Word. */ + @Internal public void setDxaWebView( int field_28_dxaWebView ) { this.field_28_dxaWebView = field_28_dxaWebView; } /** - * Get the dxaRTEWrapWidth field for the TAP record. + * Used internally by Word. */ + @Internal public int getDxaRTEWrapWidth() { return field_29_dxaRTEWrapWidth; } /** - * Set the dxaRTEWrapWidth field for the TAP record. + * Used internally by Word. */ + @Internal public void setDxaRTEWrapWidth( int field_29_dxaRTEWrapWidth ) { this.field_29_dxaRTEWrapWidth = field_29_dxaRTEWrapWidth; } /** - * Get the dxaColWidthWwd field for the TAP record. + * Used internally by Word. */ + @Internal public int getDxaColWidthWwd() { return field_30_dxaColWidthWwd; } /** - * Set the dxaColWidthWwd field for the TAP record. + * Used internally by Word. */ + @Internal public void setDxaColWidthWwd( int field_30_dxaColWidthWwd ) { this.field_30_dxaColWidthWwd = field_30_dxaColWidthWwd; } /** - * Get the pctWwd field for the TAP record. + * Used internally by Word: percent of Window size for AutoFit in WebView. */ + @Internal public short getPctWwd() { return field_31_pctWwd; } /** - * Set the pctWwd field for the TAP record. + * Used internally by Word: percent of Window size for AutoFit in WebView. */ + @Internal public void setPctWwd( short field_31_pctWwd ) { this.field_31_pctWwd = field_31_pctWwd; } /** - * Get the viewFlags field for the TAP record. + * Used internally by Word. */ + @Internal public int getViewFlags() { return field_32_viewFlags; } /** - * Set the viewFlags field for the TAP record. + * Used internally by Word. */ + @Internal public void setViewFlags( int field_32_viewFlags ) { this.field_32_viewFlags = field_32_viewFlags; } /** - * Get the rgdxaCenter field for the TAP record. + * rgdxaCenter[0] is the left boundary of cell 0 measured relative to margin rgdxaCenter[tap.itcMac - 1] is left boundary of last cell rgdxaCenter[tap.itcMac] is right boundary of last cell.. */ + @Internal public short[] getRgdxaCenter() { return field_33_rgdxaCenter; } /** - * Set the rgdxaCenter field for the TAP record. + * rgdxaCenter[0] is the left boundary of cell 0 measured relative to margin rgdxaCenter[tap.itcMac - 1] is left boundary of last cell rgdxaCenter[tap.itcMac] is right boundary of last cell.. */ + @Internal public void setRgdxaCenter( short[] field_33_rgdxaCenter ) { this.field_33_rgdxaCenter = field_33_rgdxaCenter; } /** - * Get the rgdxaCenterPrint field for the TAP record. + * Used internally by Word. */ + @Internal public short[] getRgdxaCenterPrint() { return field_34_rgdxaCenterPrint; } /** - * Set the rgdxaCenterPrint field for the TAP record. + * Used internally by Word. */ + @Internal public void setRgdxaCenterPrint( short[] field_34_rgdxaCenterPrint ) { this.field_34_rgdxaCenterPrint = field_34_rgdxaCenterPrint; } /** - * Get the shdTable field for the TAP record. + * Table shading. */ + @Internal public ShadingDescriptor getShdTable() { return field_35_shdTable; } /** - * Set the shdTable field for the TAP record. + * Table shading. */ + @Internal public void setShdTable( ShadingDescriptor field_35_shdTable ) { this.field_35_shdTable = field_35_shdTable; @@ -1068,6 +993,7 @@ public abstract class TAPAbstractType implements HDFType /** * Get the brcBottom field for the TAP record. */ + @Internal public BorderCode getBrcBottom() { return field_36_brcBottom; @@ -1076,6 +1002,7 @@ public abstract class TAPAbstractType implements HDFType /** * Set the brcBottom field for the TAP record. */ + @Internal public void setBrcBottom( BorderCode field_36_brcBottom ) { this.field_36_brcBottom = field_36_brcBottom; @@ -1084,6 +1011,7 @@ public abstract class TAPAbstractType implements HDFType /** * Get the brcTop field for the TAP record. */ + @Internal public BorderCode getBrcTop() { return field_37_brcTop; @@ -1092,6 +1020,7 @@ public abstract class TAPAbstractType implements HDFType /** * Set the brcTop field for the TAP record. */ + @Internal public void setBrcTop( BorderCode field_37_brcTop ) { this.field_37_brcTop = field_37_brcTop; @@ -1100,6 +1029,7 @@ public abstract class TAPAbstractType implements HDFType /** * Get the brcLeft field for the TAP record. */ + @Internal public BorderCode getBrcLeft() { return field_38_brcLeft; @@ -1108,6 +1038,7 @@ public abstract class TAPAbstractType implements HDFType /** * Set the brcLeft field for the TAP record. */ + @Internal public void setBrcLeft( BorderCode field_38_brcLeft ) { this.field_38_brcLeft = field_38_brcLeft; @@ -1116,6 +1047,7 @@ public abstract class TAPAbstractType implements HDFType /** * Get the brcRight field for the TAP record. */ + @Internal public BorderCode getBrcRight() { return field_39_brcRight; @@ -1124,6 +1056,7 @@ public abstract class TAPAbstractType implements HDFType /** * Set the brcRight field for the TAP record. */ + @Internal public void setBrcRight( BorderCode field_39_brcRight ) { this.field_39_brcRight = field_39_brcRight; @@ -1132,6 +1065,7 @@ public abstract class TAPAbstractType implements HDFType /** * Get the brcVertical field for the TAP record. */ + @Internal public BorderCode getBrcVertical() { return field_40_brcVertical; @@ -1140,6 +1074,7 @@ public abstract class TAPAbstractType implements HDFType /** * Set the brcVertical field for the TAP record. */ + @Internal public void setBrcVertical( BorderCode field_40_brcVertical ) { this.field_40_brcVertical = field_40_brcVertical; @@ -1148,6 +1083,7 @@ public abstract class TAPAbstractType implements HDFType /** * Get the brcHorizontal field for the TAP record. */ + @Internal public BorderCode getBrcHorizontal() { return field_41_brcHorizontal; @@ -1156,541 +1092,584 @@ public abstract class TAPAbstractType implements HDFType /** * Set the brcHorizontal field for the TAP record. */ + @Internal public void setBrcHorizontal( BorderCode field_41_brcHorizontal ) { this.field_41_brcHorizontal = field_41_brcHorizontal; } /** - * Get the wCellPaddingDefaultTop field for the TAP record. + * Default top cell margin/padding. */ + @Internal public short getWCellPaddingDefaultTop() { return field_42_wCellPaddingDefaultTop; } /** - * Set the wCellPaddingDefaultTop field for the TAP record. + * Default top cell margin/padding. */ + @Internal public void setWCellPaddingDefaultTop( short field_42_wCellPaddingDefaultTop ) { this.field_42_wCellPaddingDefaultTop = field_42_wCellPaddingDefaultTop; } /** - * Get the wCellPaddingDefaultLeft field for the TAP record. + * Default left cell margin/padding. */ + @Internal public short getWCellPaddingDefaultLeft() { return field_43_wCellPaddingDefaultLeft; } /** - * Set the wCellPaddingDefaultLeft field for the TAP record. + * Default left cell margin/padding. */ - public void setWCellPaddingDefaultLeft( - short field_43_wCellPaddingDefaultLeft ) + @Internal + public void setWCellPaddingDefaultLeft( short field_43_wCellPaddingDefaultLeft ) { this.field_43_wCellPaddingDefaultLeft = field_43_wCellPaddingDefaultLeft; } /** - * Get the wCellPaddingDefaultBottom field for the TAP record. + * Default bottom cell margin/padding. */ + @Internal public short getWCellPaddingDefaultBottom() { return field_44_wCellPaddingDefaultBottom; } /** - * Set the wCellPaddingDefaultBottom field for the TAP record. + * Default bottom cell margin/padding. */ - public void setWCellPaddingDefaultBottom( - short field_44_wCellPaddingDefaultBottom ) + @Internal + public void setWCellPaddingDefaultBottom( short field_44_wCellPaddingDefaultBottom ) { this.field_44_wCellPaddingDefaultBottom = field_44_wCellPaddingDefaultBottom; } /** - * Get the wCellPaddingDefaultRight field for the TAP record. + * Default right cell margin/padding. */ + @Internal public short getWCellPaddingDefaultRight() { return field_45_wCellPaddingDefaultRight; } /** - * Set the wCellPaddingDefaultRight field for the TAP record. + * Default right cell margin/padding. */ - public void setWCellPaddingDefaultRight( - short field_45_wCellPaddingDefaultRight ) + @Internal + public void setWCellPaddingDefaultRight( short field_45_wCellPaddingDefaultRight ) { this.field_45_wCellPaddingDefaultRight = field_45_wCellPaddingDefaultRight; } /** - * Get the ftsCellPaddingDefaultTop field for the TAP record. + * Default top cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellPaddingDefaultTop() { return field_46_ftsCellPaddingDefaultTop; } /** - * Set the ftsCellPaddingDefaultTop field for the TAP record. + * Default top cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellPaddingDefaultTop( - byte field_46_ftsCellPaddingDefaultTop ) + @Internal + public void setFtsCellPaddingDefaultTop( byte field_46_ftsCellPaddingDefaultTop ) { this.field_46_ftsCellPaddingDefaultTop = field_46_ftsCellPaddingDefaultTop; } /** - * Get the ftsCellPaddingDefaultLeft field for the TAP record. + * Default left cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellPaddingDefaultLeft() { return field_47_ftsCellPaddingDefaultLeft; } /** - * Set the ftsCellPaddingDefaultLeft field for the TAP record. + * Default left cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellPaddingDefaultLeft( - byte field_47_ftsCellPaddingDefaultLeft ) + @Internal + public void setFtsCellPaddingDefaultLeft( byte field_47_ftsCellPaddingDefaultLeft ) { this.field_47_ftsCellPaddingDefaultLeft = field_47_ftsCellPaddingDefaultLeft; } /** - * Get the ftsCellPaddingDefaultBottom field for the TAP record. + * Default bottom cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellPaddingDefaultBottom() { return field_48_ftsCellPaddingDefaultBottom; } /** - * Set the ftsCellPaddingDefaultBottom field for the TAP record. + * Default bottom cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellPaddingDefaultBottom( - byte field_48_ftsCellPaddingDefaultBottom ) + @Internal + public void setFtsCellPaddingDefaultBottom( byte field_48_ftsCellPaddingDefaultBottom ) { this.field_48_ftsCellPaddingDefaultBottom = field_48_ftsCellPaddingDefaultBottom; } /** - * Get the ftsCellPaddingDefaultRight field for the TAP record. + * Default right cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellPaddingDefaultRight() { return field_49_ftsCellPaddingDefaultRight; } /** - * Set the ftsCellPaddingDefaultRight field for the TAP record. + * Default right cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellPaddingDefaultRight( - byte field_49_ftsCellPaddingDefaultRight ) + @Internal + public void setFtsCellPaddingDefaultRight( byte field_49_ftsCellPaddingDefaultRight ) { this.field_49_ftsCellPaddingDefaultRight = field_49_ftsCellPaddingDefaultRight; } /** - * Get the wCellSpacingDefaultTop field for the TAP record. + * Default top cell spacings. */ + @Internal public short getWCellSpacingDefaultTop() { return field_50_wCellSpacingDefaultTop; } /** - * Set the wCellSpacingDefaultTop field for the TAP record. + * Default top cell spacings. */ + @Internal public void setWCellSpacingDefaultTop( short field_50_wCellSpacingDefaultTop ) { this.field_50_wCellSpacingDefaultTop = field_50_wCellSpacingDefaultTop; } /** - * Get the wCellSpacingDefaultLeft field for the TAP record. + * Default left cell spacings. */ + @Internal public short getWCellSpacingDefaultLeft() { return field_51_wCellSpacingDefaultLeft; } /** - * Set the wCellSpacingDefaultLeft field for the TAP record. + * Default left cell spacings. */ - public void setWCellSpacingDefaultLeft( - short field_51_wCellSpacingDefaultLeft ) + @Internal + public void setWCellSpacingDefaultLeft( short field_51_wCellSpacingDefaultLeft ) { this.field_51_wCellSpacingDefaultLeft = field_51_wCellSpacingDefaultLeft; } /** - * Get the wCellSpacingDefaultBottom field for the TAP record. + * Default bottom cell spacings. */ + @Internal public short getWCellSpacingDefaultBottom() { return field_52_wCellSpacingDefaultBottom; } /** - * Set the wCellSpacingDefaultBottom field for the TAP record. + * Default bottom cell spacings. */ - public void setWCellSpacingDefaultBottom( - short field_52_wCellSpacingDefaultBottom ) + @Internal + public void setWCellSpacingDefaultBottom( short field_52_wCellSpacingDefaultBottom ) { this.field_52_wCellSpacingDefaultBottom = field_52_wCellSpacingDefaultBottom; } /** - * Get the wCellSpacingDefaultRight field for the TAP record. + * Default right cell spacings. */ + @Internal public short getWCellSpacingDefaultRight() { return field_53_wCellSpacingDefaultRight; } /** - * Set the wCellSpacingDefaultRight field for the TAP record. + * Default right cell spacings. */ - public void setWCellSpacingDefaultRight( - short field_53_wCellSpacingDefaultRight ) + @Internal + public void setWCellSpacingDefaultRight( short field_53_wCellSpacingDefaultRight ) { this.field_53_wCellSpacingDefaultRight = field_53_wCellSpacingDefaultRight; } /** - * Get the ftsCellSpacingDefaultTop field for the TAP record. + * Default top cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellSpacingDefaultTop() { return field_54_ftsCellSpacingDefaultTop; } /** - * Set the ftsCellSpacingDefaultTop field for the TAP record. + * Default top cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellSpacingDefaultTop( - byte field_54_ftsCellSpacingDefaultTop ) + @Internal + public void setFtsCellSpacingDefaultTop( byte field_54_ftsCellSpacingDefaultTop ) { this.field_54_ftsCellSpacingDefaultTop = field_54_ftsCellSpacingDefaultTop; } /** - * Get the ftsCellSpacingDefaultLeft field for the TAP record. + * Default left cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellSpacingDefaultLeft() { return field_55_ftsCellSpacingDefaultLeft; } /** - * Set the ftsCellSpacingDefaultLeft field for the TAP record. + * Default left cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellSpacingDefaultLeft( - byte field_55_ftsCellSpacingDefaultLeft ) + @Internal + public void setFtsCellSpacingDefaultLeft( byte field_55_ftsCellSpacingDefaultLeft ) { this.field_55_ftsCellSpacingDefaultLeft = field_55_ftsCellSpacingDefaultLeft; } /** - * Get the ftsCellSpacingDefaultBottom field for the TAP record. + * Default bottom cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellSpacingDefaultBottom() { return field_56_ftsCellSpacingDefaultBottom; } /** - * Set the ftsCellSpacingDefaultBottom field for the TAP record. + * Default bottom cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellSpacingDefaultBottom( - byte field_56_ftsCellSpacingDefaultBottom ) + @Internal + public void setFtsCellSpacingDefaultBottom( byte field_56_ftsCellSpacingDefaultBottom ) { this.field_56_ftsCellSpacingDefaultBottom = field_56_ftsCellSpacingDefaultBottom; } /** - * Get the ftsCellSpacingDefaultRight field for the TAP record. + * Default right cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellSpacingDefaultRight() { return field_57_ftsCellSpacingDefaultRight; } /** - * Set the ftsCellSpacingDefaultRight field for the TAP record. + * Default right cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellSpacingDefaultRight( - byte field_57_ftsCellSpacingDefaultRight ) + @Internal + public void setFtsCellSpacingDefaultRight( byte field_57_ftsCellSpacingDefaultRight ) { this.field_57_ftsCellSpacingDefaultRight = field_57_ftsCellSpacingDefaultRight; } /** - * Get the wCellPaddingOuterTop field for the TAP record. + * Default outer top cell margin/padding. */ + @Internal public short getWCellPaddingOuterTop() { return field_58_wCellPaddingOuterTop; } /** - * Set the wCellPaddingOuterTop field for the TAP record. + * Default outer top cell margin/padding. */ + @Internal public void setWCellPaddingOuterTop( short field_58_wCellPaddingOuterTop ) { this.field_58_wCellPaddingOuterTop = field_58_wCellPaddingOuterTop; } /** - * Get the wCellPaddingOuterLeft field for the TAP record. + * Default outer left cell margin/padding. */ + @Internal public short getWCellPaddingOuterLeft() { return field_59_wCellPaddingOuterLeft; } /** - * Set the wCellPaddingOuterLeft field for the TAP record. + * Default outer left cell margin/padding. */ + @Internal public void setWCellPaddingOuterLeft( short field_59_wCellPaddingOuterLeft ) { this.field_59_wCellPaddingOuterLeft = field_59_wCellPaddingOuterLeft; } /** - * Get the wCellPaddingOuterBottom field for the TAP record. + * Default outer bottom cell margin/padding. */ + @Internal public short getWCellPaddingOuterBottom() { return field_60_wCellPaddingOuterBottom; } /** - * Set the wCellPaddingOuterBottom field for the TAP record. + * Default outer bottom cell margin/padding. */ - public void setWCellPaddingOuterBottom( - short field_60_wCellPaddingOuterBottom ) + @Internal + public void setWCellPaddingOuterBottom( short field_60_wCellPaddingOuterBottom ) { this.field_60_wCellPaddingOuterBottom = field_60_wCellPaddingOuterBottom; } /** - * Get the wCellPaddingOuterRight field for the TAP record. + * Default outer right cell margin/padding. */ + @Internal public short getWCellPaddingOuterRight() { return field_61_wCellPaddingOuterRight; } /** - * Set the wCellPaddingOuterRight field for the TAP record. + * Default outer right cell margin/padding. */ + @Internal public void setWCellPaddingOuterRight( short field_61_wCellPaddingOuterRight ) { this.field_61_wCellPaddingOuterRight = field_61_wCellPaddingOuterRight; } /** - * Get the ftsCellPaddingOuterTop field for the TAP record. + * Default outer top cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellPaddingOuterTop() { return field_62_ftsCellPaddingOuterTop; } /** - * Set the ftsCellPaddingOuterTop field for the TAP record. + * Default outer top cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public void setFtsCellPaddingOuterTop( byte field_62_ftsCellPaddingOuterTop ) { this.field_62_ftsCellPaddingOuterTop = field_62_ftsCellPaddingOuterTop; } /** - * Get the ftsCellPaddingOuterLeft field for the TAP record. + * Default outer left cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellPaddingOuterLeft() { return field_63_ftsCellPaddingOuterLeft; } /** - * Set the ftsCellPaddingOuterLeft field for the TAP record. + * Default outer left cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellPaddingOuterLeft( - byte field_63_ftsCellPaddingOuterLeft ) + @Internal + public void setFtsCellPaddingOuterLeft( byte field_63_ftsCellPaddingOuterLeft ) { this.field_63_ftsCellPaddingOuterLeft = field_63_ftsCellPaddingOuterLeft; } /** - * Get the ftsCellPaddingOuterBottom field for the TAP record. + * Default outer bottom cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellPaddingOuterBottom() { return field_64_ftsCellPaddingOuterBottom; } /** - * Set the ftsCellPaddingOuterBottom field for the TAP record. + * Default outer bottom cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellPaddingOuterBottom( - byte field_64_ftsCellPaddingOuterBottom ) + @Internal + public void setFtsCellPaddingOuterBottom( byte field_64_ftsCellPaddingOuterBottom ) { this.field_64_ftsCellPaddingOuterBottom = field_64_ftsCellPaddingOuterBottom; } /** - * Get the ftsCellPaddingOuterRight field for the TAP record. + * Default outer right cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellPaddingOuterRight() { return field_65_ftsCellPaddingOuterRight; } /** - * Set the ftsCellPaddingOuterRight field for the TAP record. + * Default outer right cell margin/padding units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellPaddingOuterRight( - byte field_65_ftsCellPaddingOuterRight ) + @Internal + public void setFtsCellPaddingOuterRight( byte field_65_ftsCellPaddingOuterRight ) { this.field_65_ftsCellPaddingOuterRight = field_65_ftsCellPaddingOuterRight; } /** - * Get the wCellSpacingOuterTop field for the TAP record. + * Default outer top cell spacing. */ + @Internal public short getWCellSpacingOuterTop() { return field_66_wCellSpacingOuterTop; } /** - * Set the wCellSpacingOuterTop field for the TAP record. + * Default outer top cell spacing. */ + @Internal public void setWCellSpacingOuterTop( short field_66_wCellSpacingOuterTop ) { this.field_66_wCellSpacingOuterTop = field_66_wCellSpacingOuterTop; } /** - * Get the wCellSpacingOuterLeft field for the TAP record. + * Default outer left cell spacing. */ + @Internal public short getWCellSpacingOuterLeft() { return field_67_wCellSpacingOuterLeft; } /** - * Set the wCellSpacingOuterLeft field for the TAP record. + * Default outer left cell spacing. */ + @Internal public void setWCellSpacingOuterLeft( short field_67_wCellSpacingOuterLeft ) { this.field_67_wCellSpacingOuterLeft = field_67_wCellSpacingOuterLeft; } /** - * Get the wCellSpacingOuterBottom field for the TAP record. + * Default outer bottom cell spacing. */ + @Internal public short getWCellSpacingOuterBottom() { return field_68_wCellSpacingOuterBottom; } /** - * Set the wCellSpacingOuterBottom field for the TAP record. + * Default outer bottom cell spacing. */ - public void setWCellSpacingOuterBottom( - short field_68_wCellSpacingOuterBottom ) + @Internal + public void setWCellSpacingOuterBottom( short field_68_wCellSpacingOuterBottom ) { this.field_68_wCellSpacingOuterBottom = field_68_wCellSpacingOuterBottom; } /** - * Get the wCellSpacingOuterRight field for the TAP record. + * Default outer right cell spacing. */ + @Internal public short getWCellSpacingOuterRight() { return field_69_wCellSpacingOuterRight; } /** - * Set the wCellSpacingOuterRight field for the TAP record. + * Default outer right cell spacing. */ + @Internal public void setWCellSpacingOuterRight( short field_69_wCellSpacingOuterRight ) { this.field_69_wCellSpacingOuterRight = field_69_wCellSpacingOuterRight; } /** - * Get the ftsCellSpacingOuterTop field for the TAP record. + * Default outer top cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellSpacingOuterTop() { return field_70_ftsCellSpacingOuterTop; } /** - * Set the ftsCellSpacingOuterTop field for the TAP record. + * Default outer top cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public void setFtsCellSpacingOuterTop( byte field_70_ftsCellSpacingOuterTop ) { this.field_70_ftsCellSpacingOuterTop = field_70_ftsCellSpacingOuterTop; } /** - * Get the ftsCellSpacingOuterLeft field for the TAP record. + * Default outer left cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellSpacingOuterLeft() { return field_71_ftsCellSpacingOuterLeft; } /** - * Set the ftsCellSpacingOuterLeft field for the TAP record. + * Default outer left cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellSpacingOuterLeft( - byte field_71_ftsCellSpacingOuterLeft ) + @Internal + public void setFtsCellSpacingOuterLeft( byte field_71_ftsCellSpacingOuterLeft ) { this.field_71_ftsCellSpacingOuterLeft = field_71_ftsCellSpacingOuterLeft; } /** - * Get the ftsCellSpacingOuterBottom field for the TAP record. + * Default outer bottom cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellSpacingOuterBottom() { return field_72_ftsCellSpacingOuterBottom; } /** - * Set the ftsCellSpacingOuterBottom field for the TAP record. + * Default outer bottom cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellSpacingOuterBottom( - byte field_72_ftsCellSpacingOuterBottom ) + @Internal + public void setFtsCellSpacingOuterBottom( byte field_72_ftsCellSpacingOuterBottom ) { this.field_72_ftsCellSpacingOuterBottom = field_72_ftsCellSpacingOuterBottom; } /** - * Get the ftsCellSpacingOuterRight field for the TAP record. + * Default outer right cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ + @Internal public byte getFtsCellSpacingOuterRight() { return field_73_ftsCellSpacingOuterRight; } /** - * Set the ftsCellSpacingOuterRight field for the TAP record. + * Default outer right cell spacings units. 0 -- null; 1-2 -- not relevant; 3 -- twips.. */ - public void setFtsCellSpacingOuterRight( - byte field_73_ftsCellSpacingOuterRight ) + @Internal + public void setFtsCellSpacingOuterRight( byte field_73_ftsCellSpacingOuterRight ) { this.field_73_ftsCellSpacingOuterRight = field_73_ftsCellSpacingOuterRight; } @@ -1698,6 +1677,7 @@ public abstract class TAPAbstractType implements HDFType /** * Get the rgtc field for the TAP record. */ + @Internal public TableCellDescriptor[] getRgtc() { return field_74_rgtc; @@ -1706,6 +1686,7 @@ public abstract class TAPAbstractType implements HDFType /** * Set the rgtc field for the TAP record. */ + @Internal public void setRgtc( TableCellDescriptor[] field_74_rgtc ) { this.field_74_rgtc = field_74_rgtc; @@ -1714,6 +1695,7 @@ public abstract class TAPAbstractType implements HDFType /** * Get the rgshd field for the TAP record. */ + @Internal public ShadingDescriptor[] getRgshd() { return field_75_rgshd; @@ -1722,667 +1704,618 @@ public abstract class TAPAbstractType implements HDFType /** * Set the rgshd field for the TAP record. */ + @Internal public void setRgshd( ShadingDescriptor[] field_75_rgshd ) { this.field_75_rgshd = field_75_rgshd; } /** - * Get the fPropRMark field for the TAP record. + * Set to 1 if property revision. */ + @Internal public byte getFPropRMark() { return field_76_fPropRMark; } /** - * Set the fPropRMark field for the TAP record. + * Set to 1 if property revision. */ + @Internal public void setFPropRMark( byte field_76_fPropRMark ) { this.field_76_fPropRMark = field_76_fPropRMark; } /** - * Get the fHasOldProps field for the TAP record. + * Has old properties. */ + @Internal public byte getFHasOldProps() { return field_77_fHasOldProps; } /** - * Set the fHasOldProps field for the TAP record. + * Has old properties. */ + @Internal public void setFHasOldProps( byte field_77_fHasOldProps ) { this.field_77_fHasOldProps = field_77_fHasOldProps; } /** - * Get the cHorzBands field for the TAP record. + * Size of each horizontal style band, in number of rows. */ + @Internal public short getCHorzBands() { return field_78_cHorzBands; } /** - * Set the cHorzBands field for the TAP record. + * Size of each horizontal style band, in number of rows. */ + @Internal public void setCHorzBands( short field_78_cHorzBands ) { this.field_78_cHorzBands = field_78_cHorzBands; } /** - * Get the cVertBands field for the TAP record. + * Size of a vertical style band, in number of columns. */ + @Internal public short getCVertBands() { return field_79_cVertBands; } /** - * Set the cVertBands field for the TAP record. + * Size of a vertical style band, in number of columns. */ + @Internal public void setCVertBands( short field_79_cVertBands ) { this.field_79_cVertBands = field_79_cVertBands; } /** - * Get the rgbrcInsideDefault_0 field for the TAP record. + * Border definition for inside horizontal borders. */ + @Internal public BorderCode getRgbrcInsideDefault_0() { return field_80_rgbrcInsideDefault_0; } /** - * Set the rgbrcInsideDefault_0 field for the TAP record. + * Border definition for inside horizontal borders. */ - public void setRgbrcInsideDefault_0( - BorderCode field_80_rgbrcInsideDefault_0 ) + @Internal + public void setRgbrcInsideDefault_0( BorderCode field_80_rgbrcInsideDefault_0 ) { this.field_80_rgbrcInsideDefault_0 = field_80_rgbrcInsideDefault_0; } /** - * Get the rgbrcInsideDefault_1 field for the TAP record. + * Border definition for inside vertical borders. */ + @Internal public BorderCode getRgbrcInsideDefault_1() { return field_81_rgbrcInsideDefault_1; } /** - * Set the rgbrcInsideDefault_1 field for the TAP record. + * Border definition for inside vertical borders. */ - public void setRgbrcInsideDefault_1( - BorderCode field_81_rgbrcInsideDefault_1 ) + @Internal + public void setRgbrcInsideDefault_1( BorderCode field_81_rgbrcInsideDefault_1 ) { this.field_81_rgbrcInsideDefault_1 = field_81_rgbrcInsideDefault_1; } /** - * Sets the fAutofit field value. When set to 1, AutoFit this table + * Sets the fAutofit field value. + * When set to 1, AutoFit this table */ + @Internal public void setFAutofit( boolean value ) { - field_13_widthAndFitsFlags = fAutofit.setBoolean( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)fAutofit.setBoolean(field_13_widthAndFitsFlags, value); } /** * When set to 1, AutoFit this table - * - * @return the fAutofit field value. + * @return the fAutofit field value. */ + @Internal public boolean isFAutofit() { - return fAutofit.isSet( field_13_widthAndFitsFlags ); - + return fAutofit.isSet(field_13_widthAndFitsFlags); } /** - * Sets the fKeepFollow field value. When set to 1, keep this row with the - * following row + * Sets the fKeepFollow field value. + * When set to 1, keep this row with the following row */ + @Internal public void setFKeepFollow( boolean value ) { - field_13_widthAndFitsFlags = fKeepFollow.setBoolean( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)fKeepFollow.setBoolean(field_13_widthAndFitsFlags, value); } /** * When set to 1, keep this row with the following row - * - * @return the fKeepFollow field value. + * @return the fKeepFollow field value. */ + @Internal public boolean isFKeepFollow() { - return fKeepFollow.isSet( field_13_widthAndFitsFlags ); - + return fKeepFollow.isSet(field_13_widthAndFitsFlags); } /** - * Sets the ftsWidth field value. Units for wWidth: 0 -- null; 1 -- auto, - * ignores wWidth, 2 -- percentage (in 50ths of a percent), 3 -- twips + * Sets the ftsWidth field value. + * Units for wWidth: 0 -- null; 1 -- auto, ignores wWidth, 2 -- percentage (in 50ths of a percent), 3 -- twips */ + @Internal public void setFtsWidth( byte value ) { - field_13_widthAndFitsFlags = ftsWidth.setValue( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)ftsWidth.setValue(field_13_widthAndFitsFlags, value); } /** - * Units for wWidth: 0 -- null; 1 -- auto, ignores wWidth, 2 -- percentage - * (in 50ths of a percent), 3 -- twips - * - * @return the ftsWidth field value. + * Units for wWidth: 0 -- null; 1 -- auto, ignores wWidth, 2 -- percentage (in 50ths of a percent), 3 -- twips + * @return the ftsWidth field value. */ + @Internal public byte getFtsWidth() { - return (byte) ftsWidth.getValue( field_13_widthAndFitsFlags ); - + return ( byte )ftsWidth.getValue(field_13_widthAndFitsFlags); } /** - * Sets the ftsWidthIndent field value. Units for wWidthIndent: 0 -- null; 1 - * -- auto, ignores wWidthIndent, 2 -- percentage (in 50ths of a percent), 3 - * -- twips + * Sets the ftsWidthIndent field value. + * Units for wWidthIndent: 0 -- null; 1 -- auto, ignores wWidthIndent, 2 -- percentage (in 50ths of a percent), 3 -- twips */ + @Internal public void setFtsWidthIndent( byte value ) { - field_13_widthAndFitsFlags = ftsWidthIndent.setValue( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)ftsWidthIndent.setValue(field_13_widthAndFitsFlags, value); } /** - * Units for wWidthIndent: 0 -- null; 1 -- auto, ignores wWidthIndent, 2 -- - * percentage (in 50ths of a percent), 3 -- twips - * - * @return the ftsWidthIndent field value. + * Units for wWidthIndent: 0 -- null; 1 -- auto, ignores wWidthIndent, 2 -- percentage (in 50ths of a percent), 3 -- twips + * @return the ftsWidthIndent field value. */ + @Internal public byte getFtsWidthIndent() { - return (byte) ftsWidthIndent.getValue( field_13_widthAndFitsFlags ); - + return ( byte )ftsWidthIndent.getValue(field_13_widthAndFitsFlags); } /** - * Sets the ftsWidthBefore field value. Units for wWidthBefore: 0 -- null; 1 - * -- auto, ignores wWidthBefore, 2 -- percentage (in 50ths of a percent), 3 - * -- twips + * Sets the ftsWidthBefore field value. + * Units for wWidthBefore: 0 -- null; 1 -- auto, ignores wWidthBefore, 2 -- percentage (in 50ths of a percent), 3 -- twips */ + @Internal public void setFtsWidthBefore( byte value ) { - field_13_widthAndFitsFlags = ftsWidthBefore.setValue( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)ftsWidthBefore.setValue(field_13_widthAndFitsFlags, value); } /** - * Units for wWidthBefore: 0 -- null; 1 -- auto, ignores wWidthBefore, 2 -- - * percentage (in 50ths of a percent), 3 -- twips - * - * @return the ftsWidthBefore field value. + * Units for wWidthBefore: 0 -- null; 1 -- auto, ignores wWidthBefore, 2 -- percentage (in 50ths of a percent), 3 -- twips + * @return the ftsWidthBefore field value. */ + @Internal public byte getFtsWidthBefore() { - return (byte) ftsWidthBefore.getValue( field_13_widthAndFitsFlags ); - + return ( byte )ftsWidthBefore.getValue(field_13_widthAndFitsFlags); } /** - * Sets the ftsWidthAfter field value. Units for wWidthAfter: 0 -- null; 1 - * -- auto, ignores wWidthAfter, 2 -- percentage (in 50ths of a percent), 3 - * -- twips + * Sets the ftsWidthAfter field value. + * Units for wWidthAfter: 0 -- null; 1 -- auto, ignores wWidthAfter, 2 -- percentage (in 50ths of a percent), 3 -- twips */ + @Internal public void setFtsWidthAfter( byte value ) { - field_13_widthAndFitsFlags = ftsWidthAfter.setValue( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)ftsWidthAfter.setValue(field_13_widthAndFitsFlags, value); } /** - * Units for wWidthAfter: 0 -- null; 1 -- auto, ignores wWidthAfter, 2 -- - * percentage (in 50ths of a percent), 3 -- twips - * - * @return the ftsWidthAfter field value. + * Units for wWidthAfter: 0 -- null; 1 -- auto, ignores wWidthAfter, 2 -- percentage (in 50ths of a percent), 3 -- twips + * @return the ftsWidthAfter field value. */ + @Internal public byte getFtsWidthAfter() { - return (byte) ftsWidthAfter.getValue( field_13_widthAndFitsFlags ); - + return ( byte )ftsWidthAfter.getValue(field_13_widthAndFitsFlags); } /** - * Sets the fNeverBeenAutofit field value. When 1, table has never been - * autofit + * Sets the fNeverBeenAutofit field value. + * When 1, table has never been autofit */ + @Internal public void setFNeverBeenAutofit( boolean value ) { - field_13_widthAndFitsFlags = fNeverBeenAutofit.setBoolean( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)fNeverBeenAutofit.setBoolean(field_13_widthAndFitsFlags, value); } /** * When 1, table has never been autofit - * - * @return the fNeverBeenAutofit field value. + * @return the fNeverBeenAutofit field value. */ + @Internal public boolean isFNeverBeenAutofit() { - return fNeverBeenAutofit.isSet( field_13_widthAndFitsFlags ); - + return fNeverBeenAutofit.isSet(field_13_widthAndFitsFlags); } /** - * Sets the fInvalAutofit field value. When 1, TAP is still valid, but - * autofit properties aren't + * Sets the fInvalAutofit field value. + * When 1, TAP is still valid, but autofit properties aren't */ + @Internal public void setFInvalAutofit( boolean value ) { - field_13_widthAndFitsFlags = fInvalAutofit.setBoolean( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)fInvalAutofit.setBoolean(field_13_widthAndFitsFlags, value); } /** * When 1, TAP is still valid, but autofit properties aren't - * - * @return the fInvalAutofit field value. + * @return the fInvalAutofit field value. */ + @Internal public boolean isFInvalAutofit() { - return fInvalAutofit.isSet( field_13_widthAndFitsFlags ); - + return fInvalAutofit.isSet(field_13_widthAndFitsFlags); } /** - * Sets the widthAndFitsFlags_empty1 field value. Not used + * Sets the widthAndFitsFlags_empty1 field value. + * Not used */ + @Internal public void setWidthAndFitsFlags_empty1( byte value ) { - field_13_widthAndFitsFlags = widthAndFitsFlags_empty1.setValue( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)widthAndFitsFlags_empty1.setValue(field_13_widthAndFitsFlags, value); } /** * Not used - * - * @return the widthAndFitsFlags_empty1 field value. + * @return the widthAndFitsFlags_empty1 field value. */ + @Internal public byte getWidthAndFitsFlags_empty1() { - return (byte) widthAndFitsFlags_empty1 - .getValue( field_13_widthAndFitsFlags ); - + return ( byte )widthAndFitsFlags_empty1.getValue(field_13_widthAndFitsFlags); } /** - * Sets the fVert field value. When 1, positioned in vertical text flow + * Sets the fVert field value. + * When 1, positioned in vertical text flow */ + @Internal public void setFVert( boolean value ) { - field_13_widthAndFitsFlags = fVert.setBoolean( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)fVert.setBoolean(field_13_widthAndFitsFlags, value); } /** * When 1, positioned in vertical text flow - * - * @return the fVert field value. + * @return the fVert field value. */ + @Internal public boolean isFVert() { - return fVert.isSet( field_13_widthAndFitsFlags ); - + return fVert.isSet(field_13_widthAndFitsFlags); } /** - * Sets the pcVert field value. Vertical position code. Specifies coordinate - * frame to use when paragraphs are absolutely positioned. 0 -- vertical - * position coordinates are relative to margin; 1 -- coordinates are - * relative to page; 2 -- coordinates are relative to text. This means: - * relative to where the next non-APO text would have been placed if this - * APO did not exist. + * Sets the pcVert field value. + * Vertical position code. Specifies coordinate frame to use when paragraphs are absolutely positioned. 0 -- vertical position coordinates are relative to margin; 1 -- coordinates are relative to page; 2 -- coordinates are relative to text. This means: relative to where the next non-APO text would have been placed if this APO did not exist. */ + @Internal public void setPcVert( byte value ) { - field_13_widthAndFitsFlags = pcVert.setValue( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)pcVert.setValue(field_13_widthAndFitsFlags, value); } /** - * Vertical position code. Specifies coordinate frame to use when paragraphs - * are absolutely positioned. 0 -- vertical position coordinates are - * relative to margin; 1 -- coordinates are relative to page; 2 -- - * coordinates are relative to text. This means: relative to where the next - * non-APO text would have been placed if this APO did not exist. - * - * @return the pcVert field value. + * Vertical position code. Specifies coordinate frame to use when paragraphs are absolutely positioned. 0 -- vertical position coordinates are relative to margin; 1 -- coordinates are relative to page; 2 -- coordinates are relative to text. This means: relative to where the next non-APO text would have been placed if this APO did not exist. + * @return the pcVert field value. */ + @Internal public byte getPcVert() { - return (byte) pcVert.getValue( field_13_widthAndFitsFlags ); - + return ( byte )pcVert.getValue(field_13_widthAndFitsFlags); } /** - * Sets the pcHorz field value. Horizontal position code. Specifies - * coordinate frame to use when paragraphs are absolutely positioned. 0 -- - * horizontal position coordinates are relative to column; 1 -- coordinates - * are relative to margin; 2 -- coordinates are relative to page + * Sets the pcHorz field value. + * Horizontal position code. Specifies coordinate frame to use when paragraphs are absolutely positioned. 0 -- horizontal position coordinates are relative to column; 1 -- coordinates are relative to margin; 2 -- coordinates are relative to page */ + @Internal public void setPcHorz( byte value ) { - field_13_widthAndFitsFlags = pcHorz.setValue( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)pcHorz.setValue(field_13_widthAndFitsFlags, value); } /** - * Horizontal position code. Specifies coordinate frame to use when - * paragraphs are absolutely positioned. 0 -- horizontal position - * coordinates are relative to column; 1 -- coordinates are relative to - * margin; 2 -- coordinates are relative to page - * - * @return the pcHorz field value. + * Horizontal position code. Specifies coordinate frame to use when paragraphs are absolutely positioned. 0 -- horizontal position coordinates are relative to column; 1 -- coordinates are relative to margin; 2 -- coordinates are relative to page + * @return the pcHorz field value. */ + @Internal public byte getPcHorz() { - return (byte) pcHorz.getValue( field_13_widthAndFitsFlags ); - + return ( byte )pcHorz.getValue(field_13_widthAndFitsFlags); } /** - * Sets the widthAndFitsFlags_empty2 field value. Not used + * Sets the widthAndFitsFlags_empty2 field value. + * Not used */ + @Internal public void setWidthAndFitsFlags_empty2( short value ) { - field_13_widthAndFitsFlags = widthAndFitsFlags_empty2.setValue( - field_13_widthAndFitsFlags, value ); - + field_13_widthAndFitsFlags = (int)widthAndFitsFlags_empty2.setValue(field_13_widthAndFitsFlags, value); } /** * Not used - * - * @return the widthAndFitsFlags_empty2 field value. + * @return the widthAndFitsFlags_empty2 field value. */ + @Internal public short getWidthAndFitsFlags_empty2() { - return (short) widthAndFitsFlags_empty2 - .getValue( field_13_widthAndFitsFlags ); - + return ( short )widthAndFitsFlags_empty2.getValue(field_13_widthAndFitsFlags); } /** - * Sets the fFirstRow field value. Used internally by Word: first row + * Sets the fFirstRow field value. + * Used internally by Word: first row */ + @Internal public void setFFirstRow( boolean value ) { - field_25_internalFlags = fFirstRow.setBoolean( field_25_internalFlags, - value ); - + field_25_internalFlags = (int)fFirstRow.setBoolean(field_25_internalFlags, value); } /** * Used internally by Word: first row - * - * @return the fFirstRow field value. + * @return the fFirstRow field value. */ + @Internal public boolean isFFirstRow() { - return fFirstRow.isSet( field_25_internalFlags ); - + return fFirstRow.isSet(field_25_internalFlags); } /** - * Sets the fLastRow field value. Used internally by Word: last row + * Sets the fLastRow field value. + * Used internally by Word: last row */ + @Internal public void setFLastRow( boolean value ) { - field_25_internalFlags = fLastRow.setBoolean( field_25_internalFlags, - value ); - + field_25_internalFlags = (int)fLastRow.setBoolean(field_25_internalFlags, value); } /** * Used internally by Word: last row - * - * @return the fLastRow field value. + * @return the fLastRow field value. */ + @Internal public boolean isFLastRow() { - return fLastRow.isSet( field_25_internalFlags ); - + return fLastRow.isSet(field_25_internalFlags); } /** - * Sets the fOutline field value. Used internally by Word: row was cached - * for outline mode + * Sets the fOutline field value. + * Used internally by Word: row was cached for outline mode */ + @Internal public void setFOutline( boolean value ) { - field_25_internalFlags = fOutline.setBoolean( field_25_internalFlags, - value ); - + field_25_internalFlags = (int)fOutline.setBoolean(field_25_internalFlags, value); } /** * Used internally by Word: row was cached for outline mode - * - * @return the fOutline field value. + * @return the fOutline field value. */ + @Internal public boolean isFOutline() { - return fOutline.isSet( field_25_internalFlags ); - + return fOutline.isSet(field_25_internalFlags); } /** - * Sets the fOrigWordTableRules field value. Used internally by Word: table - * combining like Word 5.x for the Macintosh and WinWord 1.x + * Sets the fOrigWordTableRules field value. + * Used internally by Word: table combining like Word 5.x for the Macintosh and WinWord 1.x */ + @Internal public void setFOrigWordTableRules( boolean value ) { - field_25_internalFlags = fOrigWordTableRules.setBoolean( - field_25_internalFlags, value ); - + field_25_internalFlags = (int)fOrigWordTableRules.setBoolean(field_25_internalFlags, value); } /** - * Used internally by Word: table combining like Word 5.x for the Macintosh - * and WinWord 1.x - * - * @return the fOrigWordTableRules field value. + * Used internally by Word: table combining like Word 5.x for the Macintosh and WinWord 1.x + * @return the fOrigWordTableRules field value. */ + @Internal public boolean isFOrigWordTableRules() { - return fOrigWordTableRules.isSet( field_25_internalFlags ); - + return fOrigWordTableRules.isSet(field_25_internalFlags); } /** - * Sets the fCellSpacing field value. Used internally by Word: When set to 1 - * cell spacing is allowed + * Sets the fCellSpacing field value. + * Used internally by Word: When set to 1 cell spacing is allowed */ + @Internal public void setFCellSpacing( boolean value ) { - field_25_internalFlags = fCellSpacing.setBoolean( - field_25_internalFlags, value ); - + field_25_internalFlags = (int)fCellSpacing.setBoolean(field_25_internalFlags, value); } /** * Used internally by Word: When set to 1 cell spacing is allowed - * - * @return the fCellSpacing field value. + * @return the fCellSpacing field value. */ + @Internal public boolean isFCellSpacing() { - return fCellSpacing.isSet( field_25_internalFlags ); - + return fCellSpacing.isSet(field_25_internalFlags); } /** - * Sets the grpfTap_unused field value. Not used + * Sets the grpfTap_unused field value. + * Not used */ + @Internal public void setGrpfTap_unused( short value ) { - field_25_internalFlags = grpfTap_unused.setValue( - field_25_internalFlags, value ); - + field_25_internalFlags = (int)grpfTap_unused.setValue(field_25_internalFlags, value); } /** * Not used - * - * @return the grpfTap_unused field value. + * @return the grpfTap_unused field value. */ + @Internal public short getGrpfTap_unused() { - return (short) grpfTap_unused.getValue( field_25_internalFlags ); - + return ( short )grpfTap_unused.getValue(field_25_internalFlags); } /** - * Sets the fWrapToWwd field value. Used internally by Word: Wrap to window - * is on when set to 1 + * Sets the fWrapToWwd field value. + * Used internally by Word: Wrap to window is on when set to 1 */ + @Internal public void setFWrapToWwd( boolean value ) { - field_32_viewFlags = fWrapToWwd.setBoolean( field_32_viewFlags, value ); - + field_32_viewFlags = (int)fWrapToWwd.setBoolean(field_32_viewFlags, value); } /** * Used internally by Word: Wrap to window is on when set to 1 - * - * @return the fWrapToWwd field value. + * @return the fWrapToWwd field value. */ + @Internal public boolean isFWrapToWwd() { - return fWrapToWwd.isSet( field_32_viewFlags ); - + return fWrapToWwd.isSet(field_32_viewFlags); } /** - * Sets the fNotPageView field value. Used internally by Word: when set to 1 - * we are not in Page View + * Sets the fNotPageView field value. + * Used internally by Word: when set to 1 we are not in Page View */ + @Internal public void setFNotPageView( boolean value ) { - field_32_viewFlags = fNotPageView - .setBoolean( field_32_viewFlags, value ); - + field_32_viewFlags = (int)fNotPageView.setBoolean(field_32_viewFlags, value); } /** * Used internally by Word: when set to 1 we are not in Page View - * - * @return the fNotPageView field value. + * @return the fNotPageView field value. */ + @Internal public boolean isFNotPageView() { - return fNotPageView.isSet( field_32_viewFlags ); - + return fNotPageView.isSet(field_32_viewFlags); } /** - * Sets the viewFlags_unused1 field value. Not used + * Sets the viewFlags_unused1 field value. + * Not used */ + @Internal public void setViewFlags_unused1( boolean value ) { - field_32_viewFlags = viewFlags_unused1.setBoolean( field_32_viewFlags, - value ); - + field_32_viewFlags = (int)viewFlags_unused1.setBoolean(field_32_viewFlags, value); } /** * Not used - * - * @return the viewFlags_unused1 field value. + * @return the viewFlags_unused1 field value. */ + @Internal public boolean isViewFlags_unused1() { - return viewFlags_unused1.isSet( field_32_viewFlags ); - + return viewFlags_unused1.isSet(field_32_viewFlags); } /** - * Sets the fWebView field value. Used internally by Word: Web View is on - * when set to 1 + * Sets the fWebView field value. + * Used internally by Word: Web View is on when set to 1 */ + @Internal public void setFWebView( boolean value ) { - field_32_viewFlags = fWebView.setBoolean( field_32_viewFlags, value ); - + field_32_viewFlags = (int)fWebView.setBoolean(field_32_viewFlags, value); } /** * Used internally by Word: Web View is on when set to 1 - * - * @return the fWebView field value. + * @return the fWebView field value. */ + @Internal public boolean isFWebView() { - return fWebView.isSet( field_32_viewFlags ); - + return fWebView.isSet(field_32_viewFlags); } /** - * Sets the fAdjusted field value. Used internally by Word + * Sets the fAdjusted field value. + * Used internally by Word */ + @Internal public void setFAdjusted( boolean value ) { - field_32_viewFlags = fAdjusted.setBoolean( field_32_viewFlags, value ); - + field_32_viewFlags = (int)fAdjusted.setBoolean(field_32_viewFlags, value); } /** * Used internally by Word - * - * @return the fAdjusted field value. + * @return the fAdjusted field value. */ + @Internal public boolean isFAdjusted() { - return fAdjusted.isSet( field_32_viewFlags ); - + return fAdjusted.isSet(field_32_viewFlags); } /** - * Sets the viewFlags_unused2 field value. Not used + * Sets the viewFlags_unused2 field value. + * Not used */ + @Internal public void setViewFlags_unused2( short value ) { - field_32_viewFlags = viewFlags_unused2.setValue( field_32_viewFlags, - value ); - + field_32_viewFlags = (int)viewFlags_unused2.setValue(field_32_viewFlags, value); } /** * Not used - * - * @return the viewFlags_unused2 field value. + * @return the viewFlags_unused2 field value. */ + @Internal public short getViewFlags_unused2() { - return (short) viewFlags_unused2.getValue( field_32_viewFlags ); - + return ( short )viewFlags_unused2.getValue(field_32_viewFlags); } -} // END OF CLASS +} // END OF CLASS diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java index 08a4b083ac..4ae6434d0c 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java @@ -254,11 +254,6 @@ public final class ParagraphSprmCompressor // sprmPDcs size += SprmUtils.addSprm((short)0x442C, newPAP.getDcs().toShort(), null, sprmList); } - if (newPAP.getShd() != null && !newPAP.getShd().equals(oldPAP.getShd())) - { - // sprmPShd80 - size += SprmUtils.addSprm((short)0x442D, newPAP.getShd().toShort(), null, sprmList); - } if (newPAP.getDyaFromText() != oldPAP.getDyaFromText()) { // sprmPDyaFromText @@ -375,6 +370,13 @@ public final class ParagraphSprmCompressor size += SprmUtils.addSprm((short)0x244c, newPAP.getFTtpEmbedded(), sprmList); } + if (newPAP.getShd() != null && !newPAP.getShd().equals(oldPAP.getShd())) + { + // size += SprmUtils.addSprm((short)0x442D, newPAP.getShd().toShort(), null, sprmList); + // sprmPShd -- 0xc64d + size += SprmUtils.addSprm( (short) 0xc64d, 0, newPAP.getShd().serialize(), sprmList ); + } + // Page 55 of public specification begins if (newPAP.getItap() != oldPAP.getItap()) { @@ -382,6 +384,14 @@ public final class ParagraphSprmCompressor size += SprmUtils.addSprm((short)0x6649, newPAP.getItap(), null, sprmList); } + if ( newPAP.getRsid() != oldPAP.getRsid() ) + { + // sprmPRsid + byte[] value = new byte[4]; + LittleEndian.putUInt( value, newPAP.getRsid() ); + size += SprmUtils.addSprm( (short) 0x6467, 0, value, sprmList ); + } + return SprmUtils.getGrpprl(sprmList, size); } diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java index 3b610b5d95..1d2e0a5c83 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java @@ -23,12 +23,14 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.apache.poi.hwpf.model.TabDescriptor; import org.apache.poi.hwpf.usermodel.BorderCode; import org.apache.poi.hwpf.usermodel.DateAndTime; import org.apache.poi.hwpf.usermodel.DropCapSpecifier; import org.apache.poi.hwpf.usermodel.LineSpacingDescriptor; import org.apache.poi.hwpf.usermodel.ParagraphProperties; import org.apache.poi.hwpf.usermodel.ShadingDescriptor; +import org.apache.poi.hwpf.usermodel.ShadingDescriptor80; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.POILogFactory; @@ -284,9 +286,10 @@ public final class ParagraphSprmUncompressor case 0x2c: newPAP.setDcs (new DropCapSpecifier((short)sprm.getOperand())); break; - case 0x2d: - newPAP.setShd (new ShadingDescriptor((short)sprm.getOperand())); - break; + case 0x2d: + newPAP.setShd( new ShadingDescriptor80( (short) sprm.getOperand() ) + .toShadingDescriptor() ); + break; case 0x2e: newPAP.setDyaFromText (sprm.getOperand()); break; @@ -412,6 +415,20 @@ public final class ParagraphSprmUncompressor // sprmPFInnerTtp -- 0x244c newPAP.setFTtpEmbedded( sprm.getOperand() != 0); break; + case 0x4d: + // sprmPShd -- 0xc64d + ShadingDescriptor shadingDescriptor = new ShadingDescriptor( + sprm.getGrpprl(), 3 ); + newPAP.setShading( shadingDescriptor ); + break; + case 0x5d: + // sprmPDxaRight -- 0x845d + newPAP.setDxaRight( sprm.getOperand() ); + break; + case 0x5e: + // sprmPDxaLeft -- 0x845e + newPAP.setDxaLeft( sprm.getOperand() ); + break; case 0x60: // sprmPDxaLeft1 -- 0x8460 newPAP.setDxaLeft1( sprm.getOperand() ); @@ -420,6 +437,10 @@ public final class ParagraphSprmUncompressor // sprmPJc newPAP.setJustificationLogical((byte) sprm.getOperand()); break; + case 0x67: + // sprmPRsid -- 0x6467 + newPAP.setRsid( sprm.getOperand() ); + break; default: logger.log( POILogger.DEBUG, "Unknown PAP sprm ignored: " + sprm ); break; @@ -432,12 +453,12 @@ public final class ParagraphSprmUncompressor int offset = sprm.getGrpprlOffset(); int delSize = grpprl[offset++]; int[] tabPositions = pap.getRgdxaTab(); - byte[] tabDescriptors = pap.getRgtbd(); + TabDescriptor[] tabDescriptors = pap.getRgtbd(); - Map tabMap = new HashMap(); + Map tabMap = new HashMap(); for (int x = 0; x < tabPositions.length; x++) { - tabMap.put(Integer.valueOf(tabPositions[x]), Byte.valueOf(tabDescriptors[x])); + tabMap.put(Integer.valueOf(tabPositions[x]), tabDescriptors[x]); } for (int x = 0; x < delSize; x++) @@ -451,13 +472,13 @@ public final class ParagraphSprmUncompressor for (int x = 0; x < addSize; x++) { Integer key = Integer.valueOf(LittleEndian.getShort(grpprl, offset)); - Byte val = Byte.valueOf(grpprl[start + ((LittleEndian.SHORT_SIZE * addSize) + x)]); + TabDescriptor val = new TabDescriptor( grpprl, start + ((TabDescriptor.getSize() * addSize) + x) ); tabMap.put(key, val); offset += LittleEndian.SHORT_SIZE; } tabPositions = new int[tabMap.size()]; - tabDescriptors = new byte[tabPositions.length]; + tabDescriptors = new TabDescriptor[tabPositions.length]; List list = new ArrayList(tabMap.keySet()); Collections.sort(list); @@ -466,7 +487,10 @@ public final class ParagraphSprmUncompressor { Integer key = list.get(x); tabPositions[x] = key.intValue(); - tabDescriptors[x] = tabMap.get(key).byteValue(); + if (tabMap.containsKey( key )) + tabDescriptors[x] = tabMap.get(key); + else + tabDescriptors[x] = new TabDescriptor(); } pap.setRgdxaTab(tabPositions); diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java index 373ec546fa..995d893cfd 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java @@ -55,7 +55,8 @@ public class Paragraph extends Range implements Cloneable { public final static short SPRM_FNOAUTOHYPH = 0x242A; public final static short SPRM_WHEIGHTABS = 0x442B; public final static short SPRM_DCS = 0x442C; - public final static short SPRM_SHD = 0x442D; + public final static short SPRM_SHD80 = 0x442D; + public final static short SPRM_SHD = (short)0xC64D; public final static short SPRM_DYAFROMTEXT = (short)0x842E; public final static short SPRM_DXAFROMTEXT = (short)0x842F; public final static short SPRM_FLOCKED = 0x2430; @@ -422,7 +423,8 @@ public class Paragraph extends Range implements Cloneable { public void setShading(ShadingDescriptor shd) { _props.setShd(shd); - _papx.updateSprm(SPRM_SHD, shd.toShort()); + //TODO: remove old one + _papx.addSprm( SPRM_SHD, shd.serialize() ); } public DropCapSpecifier getDropCap() @@ -478,6 +480,28 @@ public class Paragraph extends Range implements Cloneable { _papx.updateSprm(SPRM_FTTP, val); } + /** + * Returns number of tabs stops defined for paragraph. Must be >= 0 and <= + * 64. + * + * @return number of tabs stops defined for paragraph. Must be >= 0 and <= + * 64 + */ + public int getTabStopsNumber() + { + return _props.getItbdMac(); + } + + /** + * Returns array of positions of itbdMac tab stops + * + * @return array of positions of itbdMac tab stops + */ + public int[] getTabStopsPositions() + { + return _props.getRgdxaTab(); + } + /** * clone the ParagraphProperties object associated with this Paragraph so * that you can apply the same properties to another paragraph. diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java index 51aeb7f460..e15cd7d5db 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java @@ -17,53 +17,42 @@ package org.apache.poi.hwpf.usermodel; -import org.apache.poi.util.BitField; -import org.apache.poi.util.BitFieldFactory; -import org.apache.poi.util.LittleEndian; +import org.apache.poi.hwpf.model.types.SHDAbstractType; -public final class ShadingDescriptor - implements Cloneable +/** + * The SHD is a substructure of the CHP, PAP, and TC for Word 2000. + * + * @author vlsergey + */ +public final class ShadingDescriptor extends SHDAbstractType implements + Cloneable { - public static final int SIZE = 2; - private short _info; - private final static BitField _icoFore = BitFieldFactory.getInstance(0x1f); - private final static BitField _icoBack = BitFieldFactory.getInstance(0x3e0); - private final static BitField _ipat = BitFieldFactory.getInstance(0xfc00); - - public ShadingDescriptor() - { - } - - public ShadingDescriptor(byte[] buf, int offset) - { - this(LittleEndian.getShort(buf, offset)); - } - - public ShadingDescriptor(short info) - { - _info = info; - } - - public short toShort() - { - return _info; - } + public ShadingDescriptor() + { + } - public void serialize(byte[] buf, int offset) - { - LittleEndian.putShort(buf, offset, _info); - } + public ShadingDescriptor( byte[] buf, int offset ) + { + super(); + fillFields( buf, offset ); + } - public Object clone() - throws CloneNotSupportedException - { - return super.clone(); - } + public ShadingDescriptor clone() throws CloneNotSupportedException + { + return (ShadingDescriptor) super.clone(); + } public boolean isEmpty() { - return _info == 0; + return field_3_ipat == 0; + } + + public byte[] serialize() + { + byte[] result = new byte[getSize()]; + serialize( result, 0 ); + return result; } @Override @@ -72,8 +61,8 @@ public final class ShadingDescriptor if ( isEmpty() ) return "[SHD] EMPTY"; - return "[SHD] (cvFore: " + _icoFore.getShortValue( _info ) - + "; cvBack: " + _icoBack.getShortValue( _info ) + "; iPat: " - + _ipat.getShortValue( _info ) + ")"; + return "[SHD] (cvFore: " + getCvFore() + "; cvBack: " + getCvBack() + + "; iPat: " + getIpat() + ")"; } + } diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor80.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor80.java new file mode 100644 index 0000000000..40a6fac3fe --- /dev/null +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor80.java @@ -0,0 +1,83 @@ +/* ==================================================================== + 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.usermodel; + +import org.apache.poi.hwpf.model.Colorref; + +import org.apache.poi.hwpf.model.types.SHD80AbstractType; + +/** + * The SHD80 is a substructure of the CHP and PAP, and TC for Word 97. + */ +public final class ShadingDescriptor80 extends SHD80AbstractType implements + Cloneable +{ + + public ShadingDescriptor80() + { + } + + public ShadingDescriptor80( byte[] buf, int offset ) + { + super(); + fillFields( buf, offset ); + } + + public ShadingDescriptor80( short value ) + { + super(); + field_1_value = value; + } + + public ShadingDescriptor80 clone() throws CloneNotSupportedException + { + return (ShadingDescriptor80) super.clone(); + } + + public boolean isEmpty() + { + return field_1_value == 0; + } + + public byte[] serialize() + { + byte[] result = new byte[getSize()]; + serialize( result, 0 ); + return result; + } + + public ShadingDescriptor toShadingDescriptor() + { + ShadingDescriptor result = new ShadingDescriptor(); + result.setCvFore( Colorref.valueOfIco( getIcoFore() ) ); + result.setCvBack( Colorref.valueOfIco( getIcoBack() ) ); + result.setIpat( getIpat() ); + return result; + } + + @Override + public String toString() + { + if ( isEmpty() ) + return "[SHD80] EMPTY"; + + return "[SHD80] (icoFore: " + getIcoFore() + "; icoBack: " + + getIcoBack() + "; iPat: " + getIpat() + ")"; + } + +} diff --git a/src/types/definitions/pap_type.xml b/src/types/definitions/pap_type.xml index e65bca8bc8..710425a4ed 100644 --- a/src/types/definitions/pap_type.xml +++ b/src/types/definitions/pap_type.xml @@ -132,8 +132,6 @@ - - @@ -141,17 +139,22 @@ - + - - - + + + + + + + + diff --git a/src/types/definitions/shd80_type.xml b/src/types/definitions/shd80_type.xml new file mode 100644 index 0000000000..ab3b45e4f4 --- /dev/null +++ b/src/types/definitions/shd80_type.xml @@ -0,0 +1,36 @@ + + + + AbstractType + The SHD80 is a substructure of the CHP and PAP, and TC for Word 97. <p>Class + and fields descriptions are quoted from + Microsoft Office Word 97-2007 Binary File Format + + Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format + Specification [*.doc] + + + + + + + + + diff --git a/src/types/definitions/shd_type.xml b/src/types/definitions/shd_type.xml new file mode 100644 index 0000000000..940eaa99ab --- /dev/null +++ b/src/types/definitions/shd_type.xml @@ -0,0 +1,34 @@ + + + + AbstractType + The SHD is a substructure of the CHP, PAP, and TC for Word 2000. <p>Class + and + fields descriptions are quoted from Microsoft Office Word 97-2007 Binary File Format + + Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format + Specification [*.doc] + + + + + + + diff --git a/src/types/definitions/tbd_type.xml b/src/types/definitions/tbd_type.xml new file mode 100644 index 0000000000..7faeb01bf7 --- /dev/null +++ b/src/types/definitions/tbd_type.xml @@ -0,0 +1,48 @@ + + + + AbstractType + The TBD is a substructure of the PAP. <p>Class and fields descriptions are quoted from + Microsoft Office Word 97-2007 Binary File Format + + Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format + Specification [*.doc] + + + + + + + + + + + + + + + + + + + + + +