poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r1137143 [1/2] - in /poi/trunk/src: documentation/content/xdocs/ scratchpad/src/org/apache/poi/hwpf/model/types/ scratchpad/src/org/apache/poi/hwpf/sprm/ scratchpad/src/org/apache/poi/hwpf/usermodel/ types/definitions/
Date Sat, 18 Jun 2011 08:57:11 GMT
Author: yegor
Date: Sat Jun 18 08:57:10 2011
New Revision: 1137143

URL: http://svn.apache.org/viewvc?rev=1137143&view=rev
Log:
Support for sprmPJc paragraph SPRM and handling of additional properties in ParagraphSprmCompressor, see Bugzilla 51389 and 51390

Modified:
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/types/PAPAbstractType.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java
    poi/trunk/src/types/definitions/pap_type.xml

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1137143&r1=1137142&r2=1137143&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Sat Jun 18 08:57:10 2011
@@ -34,6 +34,8 @@
 
     <changes>
         <release version="3.8-beta4" date="2011-??-??">
+           <action dev="poi-developers" type="add">51390 - Added handling of additional properties to HWPF ParagraphSprmCompressor</action>
+           <action dev="poi-developers" type="add">51389 - Support for sprmPJc paragraph SPRM in HWPF</action>
            <action dev="poi-developers" type="fix">48469 - New Case Study for PI web site  </action>
            <action dev="poi-developers" type="fix">50681 - Avoid exceptions in HSSFDataFormat.getDataFormatString()  </action>
            <action dev="poi-developers" type="fix">50681 - Fixed autosizing columns beyond 255 character limit </action>

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/types/PAPAbstractType.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/types/PAPAbstractType.java?rev=1137143&r1=1137142&r2=1137143&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/types/PAPAbstractType.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/types/PAPAbstractType.java Sat Jun 18 08:57:10 2011
@@ -18,93 +18,107 @@
 package org.apache.poi.hwpf.model.types;
 
 
+
+import org.apache.poi.util.BitField;
+import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.StringUtil;
+import org.apache.poi.util.HexDump;
 import org.apache.poi.hdf.model.hdftypes.HDFType;
 import org.apache.poi.hwpf.usermodel.*;
-import org.apache.poi.util.BitField;
-import org.apache.poi.util.BitFieldFactory;
 
 /**
  * Paragraph Properties.
  * NOTE: This source is automatically generated please do not modify this file.  Either subclass or
  *       remove the record in src/records/definitions.
- *
+
  * @author S. Ryan Ackley
  */
-public abstract class PAPAbstractType implements HDFType {
+public abstract class PAPAbstractType
+    implements HDFType
+{
 
     protected  int field_1_istd;
-    protected  byte field_2_jc;
+    protected  byte field_2_fSideBySide;
     protected  byte field_3_fKeep;
     protected  byte field_4_fKeepFollow;
     protected  byte field_5_fPageBreakBefore;
-    protected  byte field_6_fBrLnAbove;
-    protected  byte field_7_fBrLnBelow;
-    protected  byte field_8_pcVert;
-    protected  byte field_9_pcHorz;
-    protected  byte field_10_brcp;
-    protected  byte field_11_brcl;
-    protected  byte field_12_ilvl;
-    protected  byte field_13_fNoLnn;
-    protected  int field_14_ilfo;
-    protected  byte field_15_fSideBySide;
-    protected  byte field_16_fNoAutoHyph;
-    protected  byte field_17_fWidowControl;
-    protected  int field_18_dxaRight;
-    protected  int field_19_dxaLeft;
-    protected  int field_20_dxaLeft1;
-    protected  LineSpacingDescriptor field_21_lspd;
-    protected  int field_22_dyaBefore;
-    protected  int field_23_dyaAfter;
-    protected  byte[] field_24_phe;
-    protected  byte field_25_fCrLf;
-    protected  byte field_26_fUsePgsuSettings;
-    protected  byte field_27_fAdjustRight;
-    protected  byte field_28_fKinsoku;
-    protected  byte field_29_fWordWrap;
-    protected  byte field_30_fOverflowPunct;
-    protected  byte field_31_fTopLinePunct;
-    protected  byte field_32_fAutoSpaceDE;
-    protected  byte field_33_fAutoSpaceDN;
-    protected  int field_34_wAlignFont;
-    protected  short field_35_fontAlign;
-        private static BitField  fVertical = BitFieldFactory.getInstance(0x0001);
-        private static BitField  fBackward = BitFieldFactory.getInstance(0x0002);
-        private static BitField  fRotateFont = BitFieldFactory.getInstance(0x0004);
-    protected  byte field_36_fBackward;
-    protected  byte field_37_fRotateFont;
-    protected  byte field_38_fInTable;
-    protected  byte field_39_fTtp;
-    protected  byte field_40_wr;
-    protected  byte field_41_fLocked;
-    protected  byte[] field_42_ptap;
-    protected  int field_43_dxaAbs;
-    protected  int field_44_dyaAbs;
-    protected  int field_45_dxaWidth;
-    protected  BorderCode field_46_brcTop;
-    protected  BorderCode field_47_brcLeft;
-    protected  BorderCode field_48_brcBottom;
-    protected  BorderCode field_49_brcRight;
-    protected  BorderCode field_50_brcBetween;
-    protected  BorderCode field_51_brcBar;
-    protected  int field_52_dxaFromText;
-    protected  int field_53_dyaFromText;
-    protected  int field_54_dyaHeight;
-    protected  byte field_55_fMinHeight;
-    protected  ShadingDescriptor field_56_shd;
-    protected  DropCapSpecifier field_57_dcs;
-    protected  byte field_58_lvl;
-    protected  byte field_59_fNumRMIns;
-    protected  byte[] field_60_anld;
-    protected  int field_61_fPropRMark;
-    protected  int field_62_ibstPropRMark;
-    protected  DateAndTime field_63_dttmPropRMark;
-    protected  byte[] field_64_numrm;
-    protected  int field_65_itbdMac;
-    protected  int[] field_66_rgdxaTab;
-    protected  byte[] field_67_rgtbd;
-    protected  byte field_68_tableLevel;
-    protected  byte field_69_fTtpEmbedded;
-    protected  byte field_70_embeddedCellMark;
+    protected  byte field_6_brcl;
+    protected  byte field_7_brcp;
+    protected  byte field_8_ilvl;
+    protected  int field_9_ilfo;
+    protected  byte field_10_fNoLnn;
+    protected  LineSpacingDescriptor field_11_lspd;
+    protected  int field_12_dyaBefore;
+    protected  int field_13_dyaAfter;
+    protected  byte field_14_fInTable;
+    protected  byte field_15_finTableW97;
+    protected  byte field_16_fTtp;
+    protected  int field_17_dxaAbs;
+    protected  int field_18_dyaAbs;
+    protected  int field_19_dxaWidth;
+    protected  byte field_20_fBrLnAbove;
+    protected  byte field_21_fBrLnBelow;
+    protected  byte field_22_pcVert;
+    protected  byte field_23_pcHorz;
+    protected  byte field_24_wr;
+    protected  byte field_25_fNoAutoHyph;
+    protected  int field_26_dyaHeight;
+    protected  byte field_27_fMinHeight;
+    protected  DropCapSpecifier field_28_dcs;
+    protected  int field_29_dyaFromText;
+    protected  int field_30_dxaFromText;
+    protected  byte field_31_fLocked;
+    protected  byte field_32_fWidowControl;
+    protected  byte field_33_fKinsoku;
+    protected  byte field_34_fWordWrap;
+    protected  byte field_35_fOverflowPunct;
+    protected  byte field_36_fTopLinePunct;
+    protected  byte field_37_fAutoSpaceDE;
+    protected  byte field_38_fAutoSpaceDN;
+    protected  int field_39_wAlignFont;
+    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);
+    protected  byte field_41_fVertical;
+    protected  byte field_42_fBackward;
+    protected  byte field_43_fRotateFont;
+    protected  byte field_44_lvl;
+    protected  byte field_45_fBiDi;
+    protected  byte field_46_fNumRMIns;
+    protected  byte field_47_fCrLf;
+    protected  byte field_48_fUsePgsuSettings;
+    protected  byte field_49_fAdjustRight;
+    protected  short field_50_dxcRight;
+    protected  short field_51_dxcLeft;
+    protected  short field_52_dxcLeft1;
+    protected  byte field_53_fDyaBeforeAuto;
+    protected  byte field_54_fDyaAfterAuto;
+    protected  int field_55_dxaRight;
+    protected  int field_56_dxaLeft;
+    protected  int field_57_dxaLeft1;
+    protected  byte field_58_jc;
+    protected  byte field_59_fNoAllowOverlap;
+    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  int field_69_fPropRMark;
+    protected  int field_70_ibstPropRMark;
+    protected  DateAndTime field_71_dttmPropRMark;
+    protected  int field_72_itbdMac;
+    protected  int[] field_73_rgdxaTab;
+    protected  byte[] field_74_rgtbd;
+    protected  byte[] field_75_numrm;
+    protected  byte[] field_76_ptap;
+    protected  byte field_77_tableLevel;
+    protected  byte field_78_fTtpEmbedded;
+    protected  byte field_79_embeddedCellMark;
 
 
     public PAPAbstractType()
@@ -112,12 +126,263 @@ public abstract class PAPAbstractType im
 
     }
 
+
+    public String toString()
+    {
+        StringBuffer buffer = new StringBuffer();
+
+        buffer.append("[PAP]\n");
+
+        buffer.append("    .istd                 = ");
+        buffer.append(" (").append(getIstd()).append(" )\n");
+
+        buffer.append("    .fSideBySide          = ");
+        buffer.append(" (").append(getFSideBySide()).append(" )\n");
+
+        buffer.append("    .fKeep                = ");
+        buffer.append(" (").append(getFKeep()).append(" )\n");
+
+        buffer.append("    .fKeepFollow          = ");
+        buffer.append(" (").append(getFKeepFollow()).append(" )\n");
+
+        buffer.append("    .fPageBreakBefore     = ");
+        buffer.append(" (").append(getFPageBreakBefore()).append(" )\n");
+
+        buffer.append("    .brcl                 = ");
+        buffer.append(" (").append(getBrcl()).append(" )\n");
+
+        buffer.append("    .brcp                 = ");
+        buffer.append(" (").append(getBrcp()).append(" )\n");
+
+        buffer.append("    .ilvl                 = ");
+        buffer.append(" (").append(getIlvl()).append(" )\n");
+
+        buffer.append("    .ilfo                 = ");
+        buffer.append(" (").append(getIlfo()).append(" )\n");
+
+        buffer.append("    .fNoLnn               = ");
+        buffer.append(" (").append(getFNoLnn()).append(" )\n");
+
+        buffer.append("    .lspd                 = ");
+        buffer.append(" (").append(getLspd()).append(" )\n");
+
+        buffer.append("    .dyaBefore            = ");
+        buffer.append(" (").append(getDyaBefore()).append(" )\n");
+
+        buffer.append("    .dyaAfter             = ");
+        buffer.append(" (").append(getDyaAfter()).append(" )\n");
+
+        buffer.append("    .fInTable             = ");
+        buffer.append(" (").append(getFInTable()).append(" )\n");
+
+        buffer.append("    .finTableW97          = ");
+        buffer.append(" (").append(getFinTableW97()).append(" )\n");
+
+        buffer.append("    .fTtp                 = ");
+        buffer.append(" (").append(getFTtp()).append(" )\n");
+
+        buffer.append("    .dxaAbs               = ");
+        buffer.append(" (").append(getDxaAbs()).append(" )\n");
+
+        buffer.append("    .dyaAbs               = ");
+        buffer.append(" (").append(getDyaAbs()).append(" )\n");
+
+        buffer.append("    .dxaWidth             = ");
+        buffer.append(" (").append(getDxaWidth()).append(" )\n");
+
+        buffer.append("    .fBrLnAbove           = ");
+        buffer.append(" (").append(getFBrLnAbove()).append(" )\n");
+
+        buffer.append("    .fBrLnBelow           = ");
+        buffer.append(" (").append(getFBrLnBelow()).append(" )\n");
+
+        buffer.append("    .pcVert               = ");
+        buffer.append(" (").append(getPcVert()).append(" )\n");
+
+        buffer.append("    .pcHorz               = ");
+        buffer.append(" (").append(getPcHorz()).append(" )\n");
+
+        buffer.append("    .wr                   = ");
+        buffer.append(" (").append(getWr()).append(" )\n");
+
+        buffer.append("    .fNoAutoHyph          = ");
+        buffer.append(" (").append(getFNoAutoHyph()).append(" )\n");
+
+        buffer.append("    .dyaHeight            = ");
+        buffer.append(" (").append(getDyaHeight()).append(" )\n");
+
+        buffer.append("    .fMinHeight           = ");
+        buffer.append(" (").append(getFMinHeight()).append(" )\n");
+
+        buffer.append("    .dcs                  = ");
+        buffer.append(" (").append(getDcs()).append(" )\n");
+
+        buffer.append("    .dyaFromText          = ");
+        buffer.append(" (").append(getDyaFromText()).append(" )\n");
+
+        buffer.append("    .dxaFromText          = ");
+        buffer.append(" (").append(getDxaFromText()).append(" )\n");
+
+        buffer.append("    .fLocked              = ");
+        buffer.append(" (").append(getFLocked()).append(" )\n");
+
+        buffer.append("    .fWidowControl        = ");
+        buffer.append(" (").append(getFWidowControl()).append(" )\n");
+
+        buffer.append("    .fKinsoku             = ");
+        buffer.append(" (").append(getFKinsoku()).append(" )\n");
+
+        buffer.append("    .fWordWrap            = ");
+        buffer.append(" (").append(getFWordWrap()).append(" )\n");
+
+        buffer.append("    .fOverflowPunct       = ");
+        buffer.append(" (").append(getFOverflowPunct()).append(" )\n");
+
+        buffer.append("    .fTopLinePunct        = ");
+        buffer.append(" (").append(getFTopLinePunct()).append(" )\n");
+
+        buffer.append("    .fAutoSpaceDE         = ");
+        buffer.append(" (").append(getFAutoSpaceDE()).append(" )\n");
+
+        buffer.append("    .fAutoSpaceDN         = ");
+        buffer.append(" (").append(getFAutoSpaceDN()).append(" )\n");
+
+        buffer.append("    .wAlignFont           = ");
+        buffer.append(" (").append(getWAlignFont()).append(" )\n");
+
+        buffer.append("    .fontAlign            = ");
+        buffer.append(" (").append(getFontAlign()).append(" )\n");
+        buffer.append("         .fVertical                = ").append(isFVertical()).append('\n');
+        buffer.append("         .fBackward                = ").append(isFBackward()).append('\n');
+        buffer.append("         .fRotateFont              = ").append(isFRotateFont()).append('\n');
+
+        buffer.append("    .fVertical            = ");
+        buffer.append(" (").append(getFVertical()).append(" )\n");
+
+        buffer.append("    .fBackward            = ");
+        buffer.append(" (").append(getFBackward()).append(" )\n");
+
+        buffer.append("    .fRotateFont          = ");
+        buffer.append(" (").append(getFRotateFont()).append(" )\n");
+
+        buffer.append("    .lvl                  = ");
+        buffer.append(" (").append(getLvl()).append(" )\n");
+
+        buffer.append("    .fBiDi                = ");
+        buffer.append(" (").append(getFBiDi()).append(" )\n");
+
+        buffer.append("    .fNumRMIns            = ");
+        buffer.append(" (").append(getFNumRMIns()).append(" )\n");
+
+        buffer.append("    .fCrLf                = ");
+        buffer.append(" (").append(getFCrLf()).append(" )\n");
+
+        buffer.append("    .fUsePgsuSettings     = ");
+        buffer.append(" (").append(getFUsePgsuSettings()).append(" )\n");
+
+        buffer.append("    .fAdjustRight         = ");
+        buffer.append(" (").append(getFAdjustRight()).append(" )\n");
+
+        buffer.append("    .dxcRight             = ");
+        buffer.append(" (").append(getDxcRight()).append(" )\n");
+
+        buffer.append("    .dxcLeft              = ");
+        buffer.append(" (").append(getDxcLeft()).append(" )\n");
+
+        buffer.append("    .dxcLeft1             = ");
+        buffer.append(" (").append(getDxcLeft1()).append(" )\n");
+
+        buffer.append("    .fDyaBeforeAuto       = ");
+        buffer.append(" (").append(getFDyaBeforeAuto()).append(" )\n");
+
+        buffer.append("    .fDyaAfterAuto        = ");
+        buffer.append(" (").append(getFDyaAfterAuto()).append(" )\n");
+
+        buffer.append("    .dxaRight             = ");
+        buffer.append(" (").append(getDxaRight()).append(" )\n");
+
+        buffer.append("    .dxaLeft              = ");
+        buffer.append(" (").append(getDxaLeft()).append(" )\n");
+
+        buffer.append("    .dxaLeft1             = ");
+        buffer.append(" (").append(getDxaLeft1()).append(" )\n");
+
+        buffer.append("    .jc                   = ");
+        buffer.append(" (").append(getJc()).append(" )\n");
+
+        buffer.append("    .fNoAllowOverlap      = ");
+        buffer.append(" (").append(getFNoAllowOverlap()).append(" )\n");
+
+        buffer.append("    .brcTop               = ");
+        buffer.append(" (").append(getBrcTop()).append(" )\n");
+
+        buffer.append("    .brcLeft              = ");
+        buffer.append(" (").append(getBrcLeft()).append(" )\n");
+
+        buffer.append("    .brcBottom            = ");
+        buffer.append(" (").append(getBrcBottom()).append(" )\n");
+
+        buffer.append("    .brcRight             = ");
+        buffer.append(" (").append(getBrcRight()).append(" )\n");
+
+        buffer.append("    .brcBetween           = ");
+        buffer.append(" (").append(getBrcBetween()).append(" )\n");
+
+        buffer.append("    .brcBar               = ");
+        buffer.append(" (").append(getBrcBar()).append(" )\n");
+
+        buffer.append("    .shd                  = ");
+        buffer.append(" (").append(getShd()).append(" )\n");
+
+        buffer.append("    .anld                 = ");
+        buffer.append(" (").append(getAnld()).append(" )\n");
+
+        buffer.append("    .phe                  = ");
+        buffer.append(" (").append(getPhe()).append(" )\n");
+
+        buffer.append("    .fPropRMark           = ");
+        buffer.append(" (").append(getFPropRMark()).append(" )\n");
+
+        buffer.append("    .ibstPropRMark        = ");
+        buffer.append(" (").append(getIbstPropRMark()).append(" )\n");
+
+        buffer.append("    .dttmPropRMark        = ");
+        buffer.append(" (").append(getDttmPropRMark()).append(" )\n");
+
+        buffer.append("    .itbdMac              = ");
+        buffer.append(" (").append(getItbdMac()).append(" )\n");
+
+        buffer.append("    .rgdxaTab             = ");
+        buffer.append(" (").append(getRgdxaTab()).append(" )\n");
+
+        buffer.append("    .rgtbd                = ");
+        buffer.append(" (").append(getRgtbd()).append(" )\n");
+
+        buffer.append("    .numrm                = ");
+        buffer.append(" (").append(getNumrm()).append(" )\n");
+
+        buffer.append("    .ptap                 = ");
+        buffer.append(" (").append(getPtap()).append(" )\n");
+
+        buffer.append("    .tableLevel           = ");
+        buffer.append(" (").append(getTableLevel()).append(" )\n");
+
+        buffer.append("    .fTtpEmbedded         = ");
+        buffer.append(" (").append(getFTtpEmbedded()).append(" )\n");
+
+        buffer.append("    .embeddedCellMark     = ");
+        buffer.append(" (").append(getEmbeddedCellMark()).append(" )\n");
+
+        buffer.append("[/PAP]\n");
+        return buffer.toString();
+    }
+
     /**
      * Size of record (exluding 4 byte header)
      */
     public int getSize()
     {
-        return 4 +  + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 1 + 1 + 4 + 4 + 4 + 4 + 4 + 4 + 12 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 2 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 2 + 1 + 2 + 2 + 1 + 1 + 84 + 1 + 2 + 4 + 128 + 2 + 128 + 128 + 1 + 1 + 1;
+        return 4 +  + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 4 + 4 + 4 + 1 + 1 + 1 + 4 + 4 + 4 + 1 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 2 + 4 + 4 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 2 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 2 + 2 + 2 + 1 + 1 + 4 + 4 + 4 + 1 + 1 + 4 + 4 + 4 + 4 + 4 + 4 + 2 + 84 + 12 + 1 + 2 + 4 + 2 + 128 + 128 + 128 + 4 + 1 + 1 + 1;
     }
 
 
@@ -139,19 +404,19 @@ public abstract class PAPAbstractType im
     }
 
     /**
-     * Get the jc field for the PAP record.
+     * Get the fSideBySide field for the PAP record.
      */
-    public byte getJc()
+    public byte getFSideBySide()
     {
-        return field_2_jc;
+        return field_2_fSideBySide;
     }
 
     /**
-     * Set the jc field for the PAP record.
+     * Set the fSideBySide field for the PAP record.
      */
-    public void setJc(byte field_2_jc)
+    public void setFSideBySide(byte field_2_fSideBySide)
     {
-        this.field_2_jc = field_2_jc;
+        this.field_2_fSideBySide = field_2_fSideBySide;
     }
 
     /**
@@ -203,355 +468,435 @@ public abstract class PAPAbstractType im
     }
 
     /**
-     * Get the fBrLnAbove field for the PAP record.
+     * Get the brcl field for the PAP record.
      */
-    public byte getFBrLnAbove()
+    public byte getBrcl()
     {
-        return field_6_fBrLnAbove;
+        return field_6_brcl;
     }
 
     /**
-     * Set the fBrLnAbove field for the PAP record.
+     * Set the brcl field for the PAP record.
      */
-    public void setFBrLnAbove(byte field_6_fBrLnAbove)
+    public void setBrcl(byte field_6_brcl)
     {
-        this.field_6_fBrLnAbove = field_6_fBrLnAbove;
+        this.field_6_brcl = field_6_brcl;
     }
 
     /**
-     * Get the fBrLnBelow field for the PAP record.
+     * Get the brcp field for the PAP record.
      */
-    public byte getFBrLnBelow()
+    public byte getBrcp()
     {
-        return field_7_fBrLnBelow;
+        return field_7_brcp;
     }
 
     /**
-     * Set the fBrLnBelow field for the PAP record.
+     * Set the brcp field for the PAP record.
      */
-    public void setFBrLnBelow(byte field_7_fBrLnBelow)
+    public void setBrcp(byte field_7_brcp)
     {
-        this.field_7_fBrLnBelow = field_7_fBrLnBelow;
+        this.field_7_brcp = field_7_brcp;
     }
 
     /**
-     * Get the pcVert field for the PAP record.
+     * Get the ilvl field for the PAP record.
      */
-    public byte getPcVert()
+    public byte getIlvl()
     {
-        return field_8_pcVert;
+        return field_8_ilvl;
     }
 
     /**
-     * Set the pcVert field for the PAP record.
+     * Set the ilvl field for the PAP record.
      */
-    public void setPcVert(byte field_8_pcVert)
+    public void setIlvl(byte field_8_ilvl)
     {
-        this.field_8_pcVert = field_8_pcVert;
+        this.field_8_ilvl = field_8_ilvl;
     }
 
     /**
-     * Get the pcHorz field for the PAP record.
+     * Get the ilfo field for the PAP record.
      */
-    public byte getPcHorz()
+    public int getIlfo()
     {
-        return field_9_pcHorz;
+        return field_9_ilfo;
     }
 
     /**
-     * Set the pcHorz field for the PAP record.
+     * Set the ilfo field for the PAP record.
      */
-    public void setPcHorz(byte field_9_pcHorz)
+    public void setIlfo(int field_9_ilfo)
     {
-        this.field_9_pcHorz = field_9_pcHorz;
+        this.field_9_ilfo = field_9_ilfo;
     }
 
     /**
-     * Get the brcp field for the PAP record.
+     * Get the fNoLnn field for the PAP record.
      */
-    public byte getBrcp()
+    public byte getFNoLnn()
     {
-        return field_10_brcp;
+        return field_10_fNoLnn;
     }
 
     /**
-     * Set the brcp field for the PAP record.
+     * Set the fNoLnn field for the PAP record.
      */
-    public void setBrcp(byte field_10_brcp)
+    public void setFNoLnn(byte field_10_fNoLnn)
     {
-        this.field_10_brcp = field_10_brcp;
+        this.field_10_fNoLnn = field_10_fNoLnn;
     }
 
     /**
-     * Get the brcl field for the PAP record.
+     * Get the lspd field for the PAP record.
      */
-    public byte getBrcl()
+    public LineSpacingDescriptor getLspd()
     {
-        return field_11_brcl;
+        return field_11_lspd;
     }
 
     /**
-     * Set the brcl field for the PAP record.
+     * Set the lspd field for the PAP record.
      */
-    public void setBrcl(byte field_11_brcl)
+    public void setLspd(LineSpacingDescriptor field_11_lspd)
     {
-        this.field_11_brcl = field_11_brcl;
+        this.field_11_lspd = field_11_lspd;
     }
 
     /**
-     * Get the ilvl field for the PAP record.
+     * Get the dyaBefore field for the PAP record.
      */
-    public byte getIlvl()
+    public int getDyaBefore()
     {
-        return field_12_ilvl;
+        return field_12_dyaBefore;
     }
 
     /**
-     * Set the ilvl field for the PAP record.
+     * Set the dyaBefore field for the PAP record.
      */
-    public void setIlvl(byte field_12_ilvl)
+    public void setDyaBefore(int field_12_dyaBefore)
     {
-        this.field_12_ilvl = field_12_ilvl;
+        this.field_12_dyaBefore = field_12_dyaBefore;
     }
 
     /**
-     * Get the fNoLnn field for the PAP record.
+     * Get the dyaAfter field for the PAP record.
      */
-    public byte getFNoLnn()
+    public int getDyaAfter()
     {
-        return field_13_fNoLnn;
+        return field_13_dyaAfter;
     }
 
     /**
-     * Set the fNoLnn field for the PAP record.
+     * Set the dyaAfter field for the PAP record.
      */
-    public void setFNoLnn(byte field_13_fNoLnn)
+    public void setDyaAfter(int field_13_dyaAfter)
     {
-        this.field_13_fNoLnn = field_13_fNoLnn;
+        this.field_13_dyaAfter = field_13_dyaAfter;
     }
 
     /**
-     * Get the ilfo field for the PAP record.
+     * Get the fInTable field for the PAP record.
      */
-    public int getIlfo()
+    public byte getFInTable()
     {
-        return field_14_ilfo;
+        return field_14_fInTable;
     }
 
     /**
-     * Set the ilfo field for the PAP record.
+     * Set the fInTable field for the PAP record.
      */
-    public void setIlfo(int field_14_ilfo)
+    public void setFInTable(byte field_14_fInTable)
     {
-        this.field_14_ilfo = field_14_ilfo;
+        this.field_14_fInTable = field_14_fInTable;
     }
 
     /**
-     * Get the fSideBySide field for the PAP record.
+     * Get the finTableW97 field for the PAP record.
      */
-    public byte getFSideBySide()
+    public byte getFinTableW97()
     {
-        return field_15_fSideBySide;
+        return field_15_finTableW97;
     }
 
     /**
-     * Set the fSideBySide field for the PAP record.
+     * Set the finTableW97 field for the PAP record.
      */
-    public void setFSideBySide(byte field_15_fSideBySide)
+    public void setFinTableW97(byte field_15_finTableW97)
     {
-        this.field_15_fSideBySide = field_15_fSideBySide;
+        this.field_15_finTableW97 = field_15_finTableW97;
     }
 
     /**
-     * Get the fNoAutoHyph field for the PAP record.
+     * Get the fTtp field for the PAP record.
      */
-    public byte getFNoAutoHyph()
+    public byte getFTtp()
     {
-        return field_16_fNoAutoHyph;
+        return field_16_fTtp;
     }
 
     /**
-     * Set the fNoAutoHyph field for the PAP record.
+     * Set the fTtp field for the PAP record.
      */
-    public void setFNoAutoHyph(byte field_16_fNoAutoHyph)
+    public void setFTtp(byte field_16_fTtp)
     {
-        this.field_16_fNoAutoHyph = field_16_fNoAutoHyph;
+        this.field_16_fTtp = field_16_fTtp;
     }
 
     /**
-     * Get the fWidowControl field for the PAP record.
+     * Get the dxaAbs field for the PAP record.
      */
-    public byte getFWidowControl()
+    public int getDxaAbs()
     {
-        return field_17_fWidowControl;
+        return field_17_dxaAbs;
     }
 
     /**
-     * Set the fWidowControl field for the PAP record.
+     * Set the dxaAbs field for the PAP record.
      */
-    public void setFWidowControl(byte field_17_fWidowControl)
+    public void setDxaAbs(int field_17_dxaAbs)
     {
-        this.field_17_fWidowControl = field_17_fWidowControl;
+        this.field_17_dxaAbs = field_17_dxaAbs;
     }
 
     /**
-     * Get the dxaRight field for the PAP record.
+     * Get the dyaAbs field for the PAP record.
      */
-    public int getDxaRight()
+    public int getDyaAbs()
     {
-        return field_18_dxaRight;
+        return field_18_dyaAbs;
     }
 
     /**
-     * Set the dxaRight field for the PAP record.
+     * Set the dyaAbs field for the PAP record.
      */
-    public void setDxaRight(int field_18_dxaRight)
+    public void setDyaAbs(int field_18_dyaAbs)
     {
-        this.field_18_dxaRight = field_18_dxaRight;
+        this.field_18_dyaAbs = field_18_dyaAbs;
     }
 
     /**
-     * Get the dxaLeft field for the PAP record.
+     * Get the dxaWidth field for the PAP record.
      */
-    public int getDxaLeft()
+    public int getDxaWidth()
     {
-        return field_19_dxaLeft;
+        return field_19_dxaWidth;
     }
 
     /**
-     * Set the dxaLeft field for the PAP record.
+     * Set the dxaWidth field for the PAP record.
      */
-    public void setDxaLeft(int field_19_dxaLeft)
+    public void setDxaWidth(int field_19_dxaWidth)
     {
-        this.field_19_dxaLeft = field_19_dxaLeft;
+        this.field_19_dxaWidth = field_19_dxaWidth;
     }
 
     /**
-     * Get the dxaLeft1 field for the PAP record.
+     * Get the fBrLnAbove field for the PAP record.
      */
-    public int getDxaLeft1()
+    public byte getFBrLnAbove()
     {
-        return field_20_dxaLeft1;
+        return field_20_fBrLnAbove;
     }
 
     /**
-     * Set the dxaLeft1 field for the PAP record.
+     * Set the fBrLnAbove field for the PAP record.
      */
-    public void setDxaLeft1(int field_20_dxaLeft1)
+    public void setFBrLnAbove(byte field_20_fBrLnAbove)
     {
-        this.field_20_dxaLeft1 = field_20_dxaLeft1;
+        this.field_20_fBrLnAbove = field_20_fBrLnAbove;
     }
 
     /**
-     * Get the lspd field for the PAP record.
+     * Get the fBrLnBelow field for the PAP record.
      */
-    public LineSpacingDescriptor getLspd()
+    public byte getFBrLnBelow()
     {
-        return field_21_lspd;
+        return field_21_fBrLnBelow;
     }
 
     /**
-     * Set the lspd field for the PAP record.
+     * Set the fBrLnBelow field for the PAP record.
      */
-    public void setLspd(LineSpacingDescriptor field_21_lspd)
+    public void setFBrLnBelow(byte field_21_fBrLnBelow)
     {
-        this.field_21_lspd = field_21_lspd;
+        this.field_21_fBrLnBelow = field_21_fBrLnBelow;
     }
 
     /**
-     * Get the dyaBefore field for the PAP record.
+     * Get the pcVert field for the PAP record.
      */
-    public int getDyaBefore()
+    public byte getPcVert()
     {
-        return field_22_dyaBefore;
+        return field_22_pcVert;
     }
 
     /**
-     * Set the dyaBefore field for the PAP record.
+     * Set the pcVert field for the PAP record.
      */
-    public void setDyaBefore(int field_22_dyaBefore)
+    public void setPcVert(byte field_22_pcVert)
     {
-        this.field_22_dyaBefore = field_22_dyaBefore;
+        this.field_22_pcVert = field_22_pcVert;
     }
 
     /**
-     * Get the dyaAfter field for the PAP record.
+     * Get the pcHorz field for the PAP record.
      */
-    public int getDyaAfter()
+    public byte getPcHorz()
     {
-        return field_23_dyaAfter;
+        return field_23_pcHorz;
     }
 
     /**
-     * Set the dyaAfter field for the PAP record.
+     * Set the pcHorz field for the PAP record.
      */
-    public void setDyaAfter(int field_23_dyaAfter)
+    public void setPcHorz(byte field_23_pcHorz)
     {
-        this.field_23_dyaAfter = field_23_dyaAfter;
+        this.field_23_pcHorz = field_23_pcHorz;
     }
 
     /**
-     * Get the phe field for the PAP record.
+     * Get the wr field for the PAP record.
      */
-    public byte[] getPhe()
+    public byte getWr()
     {
-        return field_24_phe;
+        return field_24_wr;
     }
 
     /**
-     * Set the phe field for the PAP record.
+     * Set the wr field for the PAP record.
      */
-    public void setPhe(byte[] field_24_phe)
+    public void setWr(byte field_24_wr)
     {
-        this.field_24_phe = field_24_phe;
+        this.field_24_wr = field_24_wr;
     }
 
     /**
-     * Get the fCrLf field for the PAP record.
+     * Get the fNoAutoHyph field for the PAP record.
      */
-    public byte getFCrLf()
+    public byte getFNoAutoHyph()
     {
-        return field_25_fCrLf;
+        return field_25_fNoAutoHyph;
     }
 
     /**
-     * Set the fCrLf field for the PAP record.
+     * Set the fNoAutoHyph field for the PAP record.
      */
-    public void setFCrLf(byte field_25_fCrLf)
+    public void setFNoAutoHyph(byte field_25_fNoAutoHyph)
     {
-        this.field_25_fCrLf = field_25_fCrLf;
+        this.field_25_fNoAutoHyph = field_25_fNoAutoHyph;
     }
 
     /**
-     * Get the fUsePgsuSettings field for the PAP record.
+     * Get the dyaHeight field for the PAP record.
      */
-    public byte getFUsePgsuSettings()
+    public int getDyaHeight()
     {
-        return field_26_fUsePgsuSettings;
+        return field_26_dyaHeight;
     }
 
     /**
-     * Set the fUsePgsuSettings field for the PAP record.
+     * Set the dyaHeight field for the PAP record.
      */
-    public void setFUsePgsuSettings(byte field_26_fUsePgsuSettings)
+    public void setDyaHeight(int field_26_dyaHeight)
     {
-        this.field_26_fUsePgsuSettings = field_26_fUsePgsuSettings;
+        this.field_26_dyaHeight = field_26_dyaHeight;
     }
 
     /**
-     * Get the fAdjustRight field for the PAP record.
+     * Get the fMinHeight field for the PAP record.
      */
-    public byte getFAdjustRight()
+    public byte getFMinHeight()
     {
-        return field_27_fAdjustRight;
+        return field_27_fMinHeight;
     }
 
     /**
-     * Set the fAdjustRight field for the PAP record.
+     * Set the fMinHeight field for the PAP record.
+     */
+    public void setFMinHeight(byte field_27_fMinHeight)
+    {
+        this.field_27_fMinHeight = field_27_fMinHeight;
+    }
+
+    /**
+     * Get the dcs field for the PAP record.
      */
-    public void setFAdjustRight(byte field_27_fAdjustRight)
+    public DropCapSpecifier getDcs()
     {
-        this.field_27_fAdjustRight = field_27_fAdjustRight;
+        return field_28_dcs;
+    }
+
+    /**
+     * Set the dcs field for the PAP record.
+     */
+    public void setDcs(DropCapSpecifier field_28_dcs)
+    {
+        this.field_28_dcs = field_28_dcs;
+    }
+
+    /**
+     * Get the dyaFromText field for the PAP record.
+     */
+    public int getDyaFromText()
+    {
+        return field_29_dyaFromText;
+    }
+
+    /**
+     * Set the dyaFromText field for the PAP record.
+     */
+    public void setDyaFromText(int field_29_dyaFromText)
+    {
+        this.field_29_dyaFromText = field_29_dyaFromText;
+    }
+
+    /**
+     * Get the dxaFromText field for the PAP record.
+     */
+    public int getDxaFromText()
+    {
+        return field_30_dxaFromText;
+    }
+
+    /**
+     * Set the dxaFromText field for the PAP record.
+     */
+    public void setDxaFromText(int field_30_dxaFromText)
+    {
+        this.field_30_dxaFromText = field_30_dxaFromText;
+    }
+
+    /**
+     * Get the fLocked field for the PAP record.
+     */
+    public byte getFLocked()
+    {
+        return field_31_fLocked;
+    }
+
+    /**
+     * Set the fLocked field for the PAP record.
+     */
+    public void setFLocked(byte field_31_fLocked)
+    {
+        this.field_31_fLocked = field_31_fLocked;
+    }
+
+    /**
+     * Get the fWidowControl field for the PAP record.
+     */
+    public byte getFWidowControl()
+    {
+        return field_32_fWidowControl;
+    }
+
+    /**
+     * Set the fWidowControl field for the PAP record.
+     */
+    public void setFWidowControl(byte field_32_fWidowControl)
+    {
+        this.field_32_fWidowControl = field_32_fWidowControl;
     }
 
     /**
@@ -559,15 +904,15 @@ public abstract class PAPAbstractType im
      */
     public byte getFKinsoku()
     {
-        return field_28_fKinsoku;
+        return field_33_fKinsoku;
     }
 
     /**
      * Set the fKinsoku field for the PAP record.
      */
-    public void setFKinsoku(byte field_28_fKinsoku)
+    public void setFKinsoku(byte field_33_fKinsoku)
     {
-        this.field_28_fKinsoku = field_28_fKinsoku;
+        this.field_33_fKinsoku = field_33_fKinsoku;
     }
 
     /**
@@ -575,15 +920,15 @@ public abstract class PAPAbstractType im
      */
     public byte getFWordWrap()
     {
-        return field_29_fWordWrap;
+        return field_34_fWordWrap;
     }
 
     /**
      * Set the fWordWrap field for the PAP record.
      */
-    public void setFWordWrap(byte field_29_fWordWrap)
+    public void setFWordWrap(byte field_34_fWordWrap)
     {
-        this.field_29_fWordWrap = field_29_fWordWrap;
+        this.field_34_fWordWrap = field_34_fWordWrap;
     }
 
     /**
@@ -591,15 +936,15 @@ public abstract class PAPAbstractType im
      */
     public byte getFOverflowPunct()
     {
-        return field_30_fOverflowPunct;
+        return field_35_fOverflowPunct;
     }
 
     /**
      * Set the fOverflowPunct field for the PAP record.
      */
-    public void setFOverflowPunct(byte field_30_fOverflowPunct)
+    public void setFOverflowPunct(byte field_35_fOverflowPunct)
     {
-        this.field_30_fOverflowPunct = field_30_fOverflowPunct;
+        this.field_35_fOverflowPunct = field_35_fOverflowPunct;
     }
 
     /**
@@ -607,15 +952,15 @@ public abstract class PAPAbstractType im
      */
     public byte getFTopLinePunct()
     {
-        return field_31_fTopLinePunct;
+        return field_36_fTopLinePunct;
     }
 
     /**
      * Set the fTopLinePunct field for the PAP record.
      */
-    public void setFTopLinePunct(byte field_31_fTopLinePunct)
+    public void setFTopLinePunct(byte field_36_fTopLinePunct)
     {
-        this.field_31_fTopLinePunct = field_31_fTopLinePunct;
+        this.field_36_fTopLinePunct = field_36_fTopLinePunct;
     }
 
     /**
@@ -623,15 +968,15 @@ public abstract class PAPAbstractType im
      */
     public byte getFAutoSpaceDE()
     {
-        return field_32_fAutoSpaceDE;
+        return field_37_fAutoSpaceDE;
     }
 
     /**
      * Set the fAutoSpaceDE field for the PAP record.
      */
-    public void setFAutoSpaceDE(byte field_32_fAutoSpaceDE)
+    public void setFAutoSpaceDE(byte field_37_fAutoSpaceDE)
     {
-        this.field_32_fAutoSpaceDE = field_32_fAutoSpaceDE;
+        this.field_37_fAutoSpaceDE = field_37_fAutoSpaceDE;
     }
 
     /**
@@ -639,15 +984,15 @@ public abstract class PAPAbstractType im
      */
     public byte getFAutoSpaceDN()
     {
-        return field_33_fAutoSpaceDN;
+        return field_38_fAutoSpaceDN;
     }
 
     /**
      * Set the fAutoSpaceDN field for the PAP record.
      */
-    public void setFAutoSpaceDN(byte field_33_fAutoSpaceDN)
+    public void setFAutoSpaceDN(byte field_38_fAutoSpaceDN)
     {
-        this.field_33_fAutoSpaceDN = field_33_fAutoSpaceDN;
+        this.field_38_fAutoSpaceDN = field_38_fAutoSpaceDN;
     }
 
     /**
@@ -655,15 +1000,15 @@ public abstract class PAPAbstractType im
      */
     public int getWAlignFont()
     {
-        return field_34_wAlignFont;
+        return field_39_wAlignFont;
     }
 
     /**
      * Set the wAlignFont field for the PAP record.
      */
-    public void setWAlignFont(int field_34_wAlignFont)
+    public void setWAlignFont(int field_39_wAlignFont)
     {
-        this.field_34_wAlignFont = field_34_wAlignFont;
+        this.field_39_wAlignFont = field_39_wAlignFont;
     }
 
     /**
@@ -671,15 +1016,31 @@ public abstract class PAPAbstractType im
      */
     public short getFontAlign()
     {
-        return field_35_fontAlign;
+        return field_40_fontAlign;
     }
 
     /**
      * Set the fontAlign field for the PAP record.
      */
-    public void setFontAlign(short field_35_fontAlign)
+    public void setFontAlign(short field_40_fontAlign)
     {
-        this.field_35_fontAlign = field_35_fontAlign;
+        this.field_40_fontAlign = field_40_fontAlign;
+    }
+
+    /**
+     * Get the fVertical field for the PAP record.
+     */
+    public byte getFVertical()
+    {
+        return field_41_fVertical;
+    }
+
+    /**
+     * Set the fVertical field for the PAP record.
+     */
+    public void setFVertical(byte field_41_fVertical)
+    {
+        this.field_41_fVertical = field_41_fVertical;
     }
 
     /**
@@ -687,15 +1048,15 @@ public abstract class PAPAbstractType im
      */
     public byte getFBackward()
     {
-        return field_36_fBackward;
+        return field_42_fBackward;
     }
 
     /**
      * Set the fBackward field for the PAP record.
      */
-    public void setFBackward(byte field_36_fBackward)
+    public void setFBackward(byte field_42_fBackward)
     {
-        this.field_36_fBackward = field_36_fBackward;
+        this.field_42_fBackward = field_42_fBackward;
     }
 
     /**
@@ -703,367 +1064,383 @@ public abstract class PAPAbstractType im
      */
     public byte getFRotateFont()
     {
-        return field_37_fRotateFont;
+        return field_43_fRotateFont;
     }
 
     /**
      * Set the fRotateFont field for the PAP record.
      */
-    public void setFRotateFont(byte field_37_fRotateFont)
+    public void setFRotateFont(byte field_43_fRotateFont)
     {
-        this.field_37_fRotateFont = field_37_fRotateFont;
+        this.field_43_fRotateFont = field_43_fRotateFont;
     }
 
     /**
-     * Get the fInTable field for the PAP record.
+     * Get the lvl field for the PAP record.
      */
-    public byte getFInTable()
+    public byte getLvl()
     {
-        return field_38_fInTable;
+        return field_44_lvl;
     }
 
     /**
-     * Set the fInTable field for the PAP record.
+     * Set the lvl field for the PAP record.
      */
-    public void setFInTable(byte field_38_fInTable)
+    public void setLvl(byte field_44_lvl)
     {
-        this.field_38_fInTable = field_38_fInTable;
+        this.field_44_lvl = field_44_lvl;
     }
 
     /**
-     * Get the fTtp field for the PAP record.
+     * Get the fBiDi field for the PAP record.
      */
-    public byte getFTtp()
+    public byte getFBiDi()
     {
-        return field_39_fTtp;
+        return field_45_fBiDi;
     }
 
     /**
-     * Set the fTtp field for the PAP record.
+     * Set the fBiDi field for the PAP record.
      */
-    public void setFTtp(byte field_39_fTtp)
+    public void setFBiDi(byte field_45_fBiDi)
     {
-        this.field_39_fTtp = field_39_fTtp;
+        this.field_45_fBiDi = field_45_fBiDi;
     }
 
     /**
-     * Get the wr field for the PAP record.
+     * Get the fNumRMIns field for the PAP record.
      */
-    public byte getWr()
+    public byte getFNumRMIns()
     {
-        return field_40_wr;
+        return field_46_fNumRMIns;
     }
 
     /**
-     * Set the wr field for the PAP record.
+     * Set the fNumRMIns field for the PAP record.
      */
-    public void setWr(byte field_40_wr)
+    public void setFNumRMIns(byte field_46_fNumRMIns)
     {
-        this.field_40_wr = field_40_wr;
+        this.field_46_fNumRMIns = field_46_fNumRMIns;
     }
 
     /**
-     * Get the fLocked field for the PAP record.
+     * Get the fCrLf field for the PAP record.
      */
-    public byte getFLocked()
+    public byte getFCrLf()
     {
-        return field_41_fLocked;
+        return field_47_fCrLf;
     }
 
     /**
-     * Set the fLocked field for the PAP record.
+     * Set the fCrLf field for the PAP record.
      */
-    public void setFLocked(byte field_41_fLocked)
+    public void setFCrLf(byte field_47_fCrLf)
     {
-        this.field_41_fLocked = field_41_fLocked;
+        this.field_47_fCrLf = field_47_fCrLf;
     }
 
     /**
-     * Get the ptap field for the PAP record.
+     * Get the fUsePgsuSettings field for the PAP record.
      */
-    public byte[] getPtap()
+    public byte getFUsePgsuSettings()
     {
-        return field_42_ptap;
+        return field_48_fUsePgsuSettings;
     }
 
     /**
-     * Set the ptap field for the PAP record.
+     * Set the fUsePgsuSettings field for the PAP record.
      */
-    public void setPtap(byte[] field_42_ptap)
+    public void setFUsePgsuSettings(byte field_48_fUsePgsuSettings)
     {
-        this.field_42_ptap = field_42_ptap;
+        this.field_48_fUsePgsuSettings = field_48_fUsePgsuSettings;
     }
 
     /**
-     * Get the dxaAbs field for the PAP record.
+     * Get the fAdjustRight field for the PAP record.
      */
-    public int getDxaAbs()
+    public byte getFAdjustRight()
     {
-        return field_43_dxaAbs;
+        return field_49_fAdjustRight;
     }
 
     /**
-     * Set the dxaAbs field for the PAP record.
+     * Set the fAdjustRight field for the PAP record.
      */
-    public void setDxaAbs(int field_43_dxaAbs)
+    public void setFAdjustRight(byte field_49_fAdjustRight)
     {
-        this.field_43_dxaAbs = field_43_dxaAbs;
+        this.field_49_fAdjustRight = field_49_fAdjustRight;
     }
 
     /**
-     * Get the dyaAbs field for the PAP record.
+     * Get the dxcRight field for the PAP record.
      */
-    public int getDyaAbs()
+    public short getDxcRight()
     {
-        return field_44_dyaAbs;
+        return field_50_dxcRight;
     }
 
     /**
-     * Set the dyaAbs field for the PAP record.
+     * Set the dxcRight field for the PAP record.
      */
-    public void setDyaAbs(int field_44_dyaAbs)
+    public void setDxcRight(short field_50_dxcRight)
     {
-        this.field_44_dyaAbs = field_44_dyaAbs;
+        this.field_50_dxcRight = field_50_dxcRight;
     }
 
     /**
-     * Get the dxaWidth field for the PAP record.
+     * Get the dxcLeft field for the PAP record.
      */
-    public int getDxaWidth()
+    public short getDxcLeft()
     {
-        return field_45_dxaWidth;
+        return field_51_dxcLeft;
     }
 
     /**
-     * Set the dxaWidth field for the PAP record.
+     * Set the dxcLeft field for the PAP record.
      */
-    public void setDxaWidth(int field_45_dxaWidth)
+    public void setDxcLeft(short field_51_dxcLeft)
     {
-        this.field_45_dxaWidth = field_45_dxaWidth;
+        this.field_51_dxcLeft = field_51_dxcLeft;
     }
 
     /**
-     * Get the brcTop field for the PAP record.
+     * Get the dxcLeft1 field for the PAP record.
      */
-    public BorderCode getBrcTop()
+    public short getDxcLeft1()
     {
-        return field_46_brcTop;
+        return field_52_dxcLeft1;
     }
 
     /**
-     * Set the brcTop field for the PAP record.
+     * Set the dxcLeft1 field for the PAP record.
      */
-    public void setBrcTop(BorderCode field_46_brcTop)
+    public void setDxcLeft1(short field_52_dxcLeft1)
     {
-        this.field_46_brcTop = field_46_brcTop;
+        this.field_52_dxcLeft1 = field_52_dxcLeft1;
     }
 
     /**
-     * Get the brcLeft field for the PAP record.
+     * Get the fDyaBeforeAuto field for the PAP record.
      */
-    public BorderCode getBrcLeft()
+    public byte getFDyaBeforeAuto()
     {
-        return field_47_brcLeft;
+        return field_53_fDyaBeforeAuto;
     }
 
     /**
-     * Set the brcLeft field for the PAP record.
+     * Set the fDyaBeforeAuto field for the PAP record.
      */
-    public void setBrcLeft(BorderCode field_47_brcLeft)
+    public void setFDyaBeforeAuto(byte field_53_fDyaBeforeAuto)
     {
-        this.field_47_brcLeft = field_47_brcLeft;
+        this.field_53_fDyaBeforeAuto = field_53_fDyaBeforeAuto;
     }
 
     /**
-     * Get the brcBottom field for the PAP record.
+     * Get the fDyaAfterAuto field for the PAP record.
      */
-    public BorderCode getBrcBottom()
+    public byte getFDyaAfterAuto()
     {
-        return field_48_brcBottom;
+        return field_54_fDyaAfterAuto;
     }
 
     /**
-     * Set the brcBottom field for the PAP record.
+     * Set the fDyaAfterAuto field for the PAP record.
      */
-    public void setBrcBottom(BorderCode field_48_brcBottom)
+    public void setFDyaAfterAuto(byte field_54_fDyaAfterAuto)
     {
-        this.field_48_brcBottom = field_48_brcBottom;
+        this.field_54_fDyaAfterAuto = field_54_fDyaAfterAuto;
     }
 
     /**
-     * Get the brcRight field for the PAP record.
+     * Get the dxaRight field for the PAP record.
      */
-    public BorderCode getBrcRight()
+    public int getDxaRight()
     {
-        return field_49_brcRight;
+        return field_55_dxaRight;
     }
 
     /**
-     * Set the brcRight field for the PAP record.
+     * Set the dxaRight field for the PAP record.
      */
-    public void setBrcRight(BorderCode field_49_brcRight)
+    public void setDxaRight(int field_55_dxaRight)
     {
-        this.field_49_brcRight = field_49_brcRight;
+        this.field_55_dxaRight = field_55_dxaRight;
     }
 
     /**
-     * Get the brcBetween field for the PAP record.
+     * Get the dxaLeft field for the PAP record.
      */
-    public BorderCode getBrcBetween()
+    public int getDxaLeft()
     {
-        return field_50_brcBetween;
+        return field_56_dxaLeft;
     }
 
     /**
-     * Set the brcBetween field for the PAP record.
+     * Set the dxaLeft field for the PAP record.
      */
-    public void setBrcBetween(BorderCode field_50_brcBetween)
+    public void setDxaLeft(int field_56_dxaLeft)
     {
-        this.field_50_brcBetween = field_50_brcBetween;
+        this.field_56_dxaLeft = field_56_dxaLeft;
     }
 
     /**
-     * Get the brcBar field for the PAP record.
+     * Get the dxaLeft1 field for the PAP record.
      */
-    public BorderCode getBrcBar()
+    public int getDxaLeft1()
     {
-        return field_51_brcBar;
+        return field_57_dxaLeft1;
     }
 
     /**
-     * Set the brcBar field for the PAP record.
+     * Set the dxaLeft1 field for the PAP record.
      */
-    public void setBrcBar(BorderCode field_51_brcBar)
+    public void setDxaLeft1(int field_57_dxaLeft1)
     {
-        this.field_51_brcBar = field_51_brcBar;
+        this.field_57_dxaLeft1 = field_57_dxaLeft1;
     }
 
     /**
-     * Get the dxaFromText field for the PAP record.
+     * Get the jc field for the PAP record.
      */
-    public int getDxaFromText()
+    public byte getJc()
     {
-        return field_52_dxaFromText;
+        return field_58_jc;
     }
 
     /**
-     * Set the dxaFromText field for the PAP record.
+     * Set the jc field for the PAP record.
      */
-    public void setDxaFromText(int field_52_dxaFromText)
+    public void setJc(byte field_58_jc)
     {
-        this.field_52_dxaFromText = field_52_dxaFromText;
+        this.field_58_jc = field_58_jc;
     }
 
     /**
-     * Get the dyaFromText field for the PAP record.
+     * Get the fNoAllowOverlap field for the PAP record.
      */
-    public int getDyaFromText()
+    public byte getFNoAllowOverlap()
     {
-        return field_53_dyaFromText;
+        return field_59_fNoAllowOverlap;
     }
 
     /**
-     * Set the dyaFromText field for the PAP record.
+     * Set the fNoAllowOverlap field for the PAP record.
      */
-    public void setDyaFromText(int field_53_dyaFromText)
+    public void setFNoAllowOverlap(byte field_59_fNoAllowOverlap)
     {
-        this.field_53_dyaFromText = field_53_dyaFromText;
+        this.field_59_fNoAllowOverlap = field_59_fNoAllowOverlap;
     }
 
     /**
-     * Get the dyaHeight field for the PAP record.
+     * Get the brcTop field for the PAP record.
      */
-    public int getDyaHeight()
+    public BorderCode getBrcTop()
     {
-        return field_54_dyaHeight;
+        return field_60_brcTop;
     }
 
     /**
-     * Set the dyaHeight field for the PAP record.
+     * Set the brcTop field for the PAP record.
      */
-    public void setDyaHeight(int field_54_dyaHeight)
+    public void setBrcTop(BorderCode field_60_brcTop)
     {
-        this.field_54_dyaHeight = field_54_dyaHeight;
+        this.field_60_brcTop = field_60_brcTop;
     }
 
     /**
-     * Get the fMinHeight field for the PAP record.
+     * Get the brcLeft field for the PAP record.
      */
-    public byte getFMinHeight()
+    public BorderCode getBrcLeft()
     {
-        return field_55_fMinHeight;
+        return field_61_brcLeft;
     }
 
     /**
-     * Set the fMinHeight field for the PAP record.
+     * Set the brcLeft field for the PAP record.
      */
-    public void setFMinHeight(byte field_55_fMinHeight)
+    public void setBrcLeft(BorderCode field_61_brcLeft)
     {
-        this.field_55_fMinHeight = field_55_fMinHeight;
+        this.field_61_brcLeft = field_61_brcLeft;
     }
 
     /**
-     * Get the shd field for the PAP record.
+     * Get the brcBottom field for the PAP record.
      */
-    public ShadingDescriptor getShd()
+    public BorderCode getBrcBottom()
     {
-        return field_56_shd;
+        return field_62_brcBottom;
     }
 
     /**
-     * Set the shd field for the PAP record.
+     * Set the brcBottom field for the PAP record.
      */
-    public void setShd(ShadingDescriptor field_56_shd)
+    public void setBrcBottom(BorderCode field_62_brcBottom)
     {
-        this.field_56_shd = field_56_shd;
+        this.field_62_brcBottom = field_62_brcBottom;
     }
 
     /**
-     * Get the dcs field for the PAP record.
+     * Get the brcRight field for the PAP record.
      */
-    public DropCapSpecifier getDcs()
+    public BorderCode getBrcRight()
     {
-        return field_57_dcs;
+        return field_63_brcRight;
     }
 
     /**
-     * Set the dcs field for the PAP record.
+     * Set the brcRight field for the PAP record.
      */
-    public void setDcs(DropCapSpecifier field_57_dcs)
+    public void setBrcRight(BorderCode field_63_brcRight)
     {
-        this.field_57_dcs = field_57_dcs;
+        this.field_63_brcRight = field_63_brcRight;
     }
 
     /**
-     * Get the lvl field for the PAP record.
+     * Get the brcBetween field for the PAP record.
      */
-    public byte getLvl()
+    public BorderCode getBrcBetween()
     {
-        return field_58_lvl;
+        return field_64_brcBetween;
     }
 
     /**
-     * Set the lvl field for the PAP record.
+     * Set the brcBetween field for the PAP record.
      */
-    public void setLvl(byte field_58_lvl)
+    public void setBrcBetween(BorderCode field_64_brcBetween)
     {
-        this.field_58_lvl = field_58_lvl;
+        this.field_64_brcBetween = field_64_brcBetween;
     }
 
     /**
-     * Get the fNumRMIns field for the PAP record.
+     * Get the brcBar field for the PAP record.
      */
-    public byte getFNumRMIns()
+    public BorderCode getBrcBar()
     {
-        return field_59_fNumRMIns;
+        return field_65_brcBar;
     }
 
     /**
-     * Set the fNumRMIns field for the PAP record.
+     * Set the brcBar field for the PAP record.
      */
-    public void setFNumRMIns(byte field_59_fNumRMIns)
+    public void setBrcBar(BorderCode field_65_brcBar)
     {
-        this.field_59_fNumRMIns = field_59_fNumRMIns;
+        this.field_65_brcBar = field_65_brcBar;
+    }
+
+    /**
+     * Get the shd field for the PAP record.
+     */
+    public ShadingDescriptor getShd()
+    {
+        return field_66_shd;
+    }
+
+    /**
+     * Set the shd field for the PAP record.
+     */
+    public void setShd(ShadingDescriptor field_66_shd)
+    {
+        this.field_66_shd = field_66_shd;
     }
 
     /**
@@ -1071,79 +1448,79 @@ public abstract class PAPAbstractType im
      */
     public byte[] getAnld()
     {
-        return field_60_anld;
+        return field_67_anld;
     }
 
     /**
      * Set the anld field for the PAP record.
      */
-    public void setAnld(byte[] field_60_anld)
+    public void setAnld(byte[] field_67_anld)
     {
-        this.field_60_anld = field_60_anld;
+        this.field_67_anld = field_67_anld;
     }
 
     /**
-     * Get the fPropRMark field for the PAP record.
+     * Get the phe field for the PAP record.
      */
-    public int getFPropRMark()
+    public byte[] getPhe()
     {
-        return field_61_fPropRMark;
+        return field_68_phe;
     }
 
     /**
-     * Set the fPropRMark field for the PAP record.
+     * Set the phe field for the PAP record.
      */
-    public void setFPropRMark(int field_61_fPropRMark)
+    public void setPhe(byte[] field_68_phe)
     {
-        this.field_61_fPropRMark = field_61_fPropRMark;
+        this.field_68_phe = field_68_phe;
     }
 
     /**
-     * Get the ibstPropRMark field for the PAP record.
+     * Get the fPropRMark field for the PAP record.
      */
-    public int getIbstPropRMark()
+    public int getFPropRMark()
     {
-        return field_62_ibstPropRMark;
+        return field_69_fPropRMark;
     }
 
     /**
-     * Set the ibstPropRMark field for the PAP record.
+     * Set the fPropRMark field for the PAP record.
      */
-    public void setIbstPropRMark(int field_62_ibstPropRMark)
+    public void setFPropRMark(int field_69_fPropRMark)
     {
-        this.field_62_ibstPropRMark = field_62_ibstPropRMark;
+        this.field_69_fPropRMark = field_69_fPropRMark;
     }
 
     /**
-     * Get the dttmPropRMark field for the PAP record.
+     * Get the ibstPropRMark field for the PAP record.
      */
-    public DateAndTime getDttmPropRMark()
+    public int getIbstPropRMark()
     {
-        return field_63_dttmPropRMark;
+        return field_70_ibstPropRMark;
     }
 
     /**
-     * Set the dttmPropRMark field for the PAP record.
+     * Set the ibstPropRMark field for the PAP record.
      */
-    public void setDttmPropRMark(DateAndTime field_63_dttmPropRMark)
+    public void setIbstPropRMark(int field_70_ibstPropRMark)
     {
-        this.field_63_dttmPropRMark = field_63_dttmPropRMark;
+        this.field_70_ibstPropRMark = field_70_ibstPropRMark;
     }
 
     /**
-     * Get the numrm field for the PAP record.
+     * Get the dttmPropRMark field for the PAP record.
      */
-    public byte[] getNumrm()
+    public DateAndTime getDttmPropRMark()
     {
-        return field_64_numrm;
+        return field_71_dttmPropRMark;
     }
 
     /**
-     * Set the numrm field for the PAP record.
+     * Set the dttmPropRMark field for the PAP record.
      */
-    public void setNumrm(byte[] field_64_numrm)
+    public void setDttmPropRMark(DateAndTime field_71_dttmPropRMark)
     {
-        this.field_64_numrm = field_64_numrm;
+        this.field_71_dttmPropRMark = field_71_dttmPropRMark;
     }
 
     /**
@@ -1151,15 +1528,15 @@ public abstract class PAPAbstractType im
      */
     public int getItbdMac()
     {
-        return field_65_itbdMac;
+        return field_72_itbdMac;
     }
 
     /**
      * Set the itbdMac field for the PAP record.
      */
-    public void setItbdMac(int field_65_itbdMac)
+    public void setItbdMac(int field_72_itbdMac)
     {
-        this.field_65_itbdMac = field_65_itbdMac;
+        this.field_72_itbdMac = field_72_itbdMac;
     }
 
     /**
@@ -1167,15 +1544,15 @@ public abstract class PAPAbstractType im
      */
     public int[] getRgdxaTab()
     {
-        return field_66_rgdxaTab;
+        return field_73_rgdxaTab;
     }
 
     /**
      * Set the rgdxaTab field for the PAP record.
      */
-    public void setRgdxaTab(int[] field_66_rgdxaTab)
+    public void setRgdxaTab(int[] field_73_rgdxaTab)
     {
-        this.field_66_rgdxaTab = field_66_rgdxaTab;
+        this.field_73_rgdxaTab = field_73_rgdxaTab;
     }
 
     /**
@@ -1183,15 +1560,47 @@ public abstract class PAPAbstractType im
      */
     public byte[] getRgtbd()
     {
-        return field_67_rgtbd;
+        return field_74_rgtbd;
     }
 
     /**
      * Set the rgtbd field for the PAP record.
      */
-    public void setRgtbd(byte[] field_67_rgtbd)
+    public void setRgtbd(byte[] field_74_rgtbd)
     {
-        this.field_67_rgtbd = field_67_rgtbd;
+        this.field_74_rgtbd = field_74_rgtbd;
+    }
+
+    /**
+     * Get the numrm field for the PAP record.
+     */
+    public byte[] getNumrm()
+    {
+        return field_75_numrm;
+    }
+
+    /**
+     * Set the numrm field for the PAP record.
+     */
+    public void setNumrm(byte[] field_75_numrm)
+    {
+        this.field_75_numrm = field_75_numrm;
+    }
+
+    /**
+     * Get the ptap field for the PAP record.
+     */
+    public byte[] getPtap()
+    {
+        return field_76_ptap;
+    }
+
+    /**
+     * Set the ptap field for the PAP record.
+     */
+    public void setPtap(byte[] field_76_ptap)
+    {
+        this.field_76_ptap = field_76_ptap;
     }
 
     /**
@@ -1199,15 +1608,15 @@ public abstract class PAPAbstractType im
      */
     public byte getTableLevel()
     {
-        return field_68_tableLevel;
+        return field_77_tableLevel;
     }
 
     /**
      * Set the tableLevel field for the PAP record.
      */
-    public void setTableLevel(byte field_68_tableLevel)
+    public void setTableLevel(byte field_77_tableLevel)
     {
-        this.field_68_tableLevel = field_68_tableLevel;
+        this.field_77_tableLevel = field_77_tableLevel;
     }
 
     /**
@@ -1215,15 +1624,15 @@ public abstract class PAPAbstractType im
      */
     public byte getFTtpEmbedded()
     {
-        return field_69_fTtpEmbedded;
+        return field_78_fTtpEmbedded;
     }
 
     /**
      * Set the fTtpEmbedded field for the PAP record.
      */
-    public void setFTtpEmbedded(byte field_69_fTtpEmbedded)
+    public void setFTtpEmbedded(byte field_78_fTtpEmbedded)
     {
-        this.field_69_fTtpEmbedded = field_69_fTtpEmbedded;
+        this.field_78_fTtpEmbedded = field_78_fTtpEmbedded;
     }
 
     /**
@@ -1231,78 +1640,78 @@ public abstract class PAPAbstractType im
      */
     public byte getEmbeddedCellMark()
     {
-        return field_70_embeddedCellMark;
+        return field_79_embeddedCellMark;
     }
 
     /**
      * Set the embeddedCellMark field for the PAP record.
      */
-    public void setEmbeddedCellMark(byte field_70_embeddedCellMark)
+    public void setEmbeddedCellMark(byte field_79_embeddedCellMark)
     {
-        this.field_70_embeddedCellMark = field_70_embeddedCellMark;
+        this.field_79_embeddedCellMark = field_79_embeddedCellMark;
     }
 
     /**
      * Sets the fVertical field value.
-     *
+     * 
      */
     public void setFVertical(boolean value)
     {
-        field_35_fontAlign = (short)fVertical.setBoolean(field_35_fontAlign, value);
-
+        field_40_fontAlign = (short)fVertical.setBoolean(field_40_fontAlign, value);
 
+        
     }
 
     /**
-     *
+     * 
      * @return  the fVertical field value.
      */
     public boolean isFVertical()
     {
-        return fVertical.isSet(field_35_fontAlign);
-
+        return fVertical.isSet(field_40_fontAlign);
+        
     }
 
     /**
      * Sets the fBackward field value.
-     *
+     * 
      */
     public void setFBackward(boolean value)
     {
-        field_35_fontAlign = (short)fBackward.setBoolean(field_35_fontAlign, value);
-
+        field_40_fontAlign = (short)fBackward.setBoolean(field_40_fontAlign, value);
 
+        
     }
 
     /**
-     *
+     * 
      * @return  the fBackward field value.
      */
     public boolean isFBackward()
     {
-        return fBackward.isSet(field_35_fontAlign);
-
+        return fBackward.isSet(field_40_fontAlign);
+        
     }
 
     /**
      * Sets the fRotateFont field value.
-     *
+     * 
      */
     public void setFRotateFont(boolean value)
     {
-        field_35_fontAlign = (short)fRotateFont.setBoolean(field_35_fontAlign, value);
-
+        field_40_fontAlign = (short)fRotateFont.setBoolean(field_40_fontAlign, value);
 
+        
     }
 
     /**
-     *
+     * 
      * @return  the fRotateFont field value.
      */
     public boolean isFRotateFont()
     {
-        return fRotateFont.isSet(field_35_fontAlign);
-
+        return fRotateFont.isSet(field_40_fontAlign);
+        
     }
 
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java?rev=1137143&r1=1137142&r2=1137143&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java Sat Jun 18 08:57:10 2011
@@ -34,13 +34,27 @@ public final class ParagraphSprmCompress
   public static byte[] compressParagraphProperty(ParagraphProperties newPAP,
                                                  ParagraphProperties oldPAP)
   {
+    // page numbers links to Word97-2007BinaryFileFormat(doc)Specification.pdf, accessible from microsoft.com 
+
     List sprmList = new ArrayList();
     int size = 0;
 
+    // Page 50 of public specification begins
+    if (newPAP.getIstd() != oldPAP.getIstd())
+    {
+      // sprmPIstd 
+      size += SprmUtils.addSprm((short)0x4600, newPAP.getIstd(), null, sprmList);
+    }
     if (newPAP.getJc() != oldPAP.getJc())
     {
+      // sprmPJc80 
       size += SprmUtils.addSprm((short)0x2403, newPAP.getJc(), null, sprmList);
     }
+    if (newPAP.getFSideBySide() != oldPAP.getFSideBySide())
+    {
+      // sprmPFSideBySide 
+      size += SprmUtils.addSprm((short)0x2404, newPAP.getFSideBySide(), null, sprmList);
+    }
     if (newPAP.getFKeep() != oldPAP.getFKeep())
     {
       size += SprmUtils.addSprm((short)0x2405, newPAP.getFKeep(), null, sprmList);
@@ -73,54 +87,63 @@ public final class ParagraphSprmCompress
     {
       size += SprmUtils.addSprm((short)0x240C, newPAP.getFNoLnn(), null, sprmList);
     }
-    if (newPAP.getFSideBySide() != oldPAP.getFSideBySide())
-    {
-      size += SprmUtils.addSprm((short)0x2404, newPAP.getFSideBySide(), null, sprmList);
-    }
-    if (newPAP.getFNoAutoHyph() != oldPAP.getFNoAutoHyph())
-    {
-      size += SprmUtils.addSprm((short)0x242A, newPAP.getFNoAutoHyph(), null, sprmList);
+    if (newPAP.getItbdMac() != oldPAP.getItbdMac() ||
+            !Arrays.equals(newPAP.getRgdxaTab(), oldPAP.getRgdxaTab()) ||
+            !Arrays.equals(newPAP.getRgtbd(), oldPAP.getRgtbd()))
+        {
+          /** @todo revisit this */
+//          byte[] oldTabArray = oldPAP.getRgdxaTab();
+//          byte[] newTabArray = newPAP.getRgdxaTab();
+//          byte[] newTabDescriptors = newPAP.getRgtbd();
+//          byte[] varParam = new byte[2 + oldTabArray.length + newTabArray.length +
+//                                     newTabDescriptors.length];
+//          varParam[0] = (byte)(oldTabArray.length/2);
+//          int offset = 1;
+//          System.arraycopy(oldTabArray, 0, varParam, offset, oldTabArray.length);
+//          offset += oldTabArray.length;
+//          varParam[offset] = (byte)(newTabArray.length/2);
+//          offset += 1;
+//          System.arraycopy(newTabArray, 0, varParam, offset, newTabArray.length);
+//          offset += newTabArray.length;
+//          System.arraycopy(newTabDescriptors, 0, varParam, offset, newTabDescriptors.length);
+    //
+//          size += SprmUtils.addSprm((short)0xC60D, 0, varParam, sprmList);
     }
-    if (newPAP.getFWidowControl() != oldPAP.getFWidowControl())
+    if (newPAP.getDxaLeft() != oldPAP.getDxaLeft())
     {
-      size += SprmUtils.addSprm((short)0x2431, newPAP.getFWidowControl(), null, sprmList);
+      // sprmPDxaLeft80 
+      size += SprmUtils.addSprm((short)0x840F, newPAP.getDxaLeft(), null, sprmList);
     }
-    if (newPAP.getItbdMac() != oldPAP.getItbdMac() ||
-        !Arrays.equals(newPAP.getRgdxaTab(), oldPAP.getRgdxaTab()) ||
-        !Arrays.equals(newPAP.getRgtbd(), oldPAP.getRgtbd()))
+
+    // Page 51 of public specification begins
+    if (newPAP.getDxaLeft1() != oldPAP.getDxaLeft1())
     {
-      /** @todo revisit this */
-//      byte[] oldTabArray = oldPAP.getRgdxaTab();
-//      byte[] newTabArray = newPAP.getRgdxaTab();
-//      byte[] newTabDescriptors = newPAP.getRgtbd();
-//      byte[] varParam = new byte[2 + oldTabArray.length + newTabArray.length +
-//                                 newTabDescriptors.length];
-//      varParam[0] = (byte)(oldTabArray.length/2);
-//      int offset = 1;
-//      System.arraycopy(oldTabArray, 0, varParam, offset, oldTabArray.length);
-//      offset += oldTabArray.length;
-//      varParam[offset] = (byte)(newTabArray.length/2);
-//      offset += 1;
-//      System.arraycopy(newTabArray, 0, varParam, offset, newTabArray.length);
-//      offset += newTabArray.length;
-//      System.arraycopy(newTabDescriptors, 0, varParam, offset, newTabDescriptors.length);
-//
-//      size += SprmUtils.addSprm((short)0xC60D, 0, varParam, sprmList);
+      // sprmPDxaLeft180 
+      size += SprmUtils.addSprm((short)0x8411, newPAP.getDxaLeft1(), null, sprmList);
     }
     if (newPAP.getDxaRight() != oldPAP.getDxaRight())
     {
+      // sprmPDxaRight80  
       size += SprmUtils.addSprm((short)0x840E, newPAP.getDxaRight(), null, sprmList);
     }
-    if (newPAP.getDxaLeft() != oldPAP.getDxaLeft())
+    if (newPAP.getDxcLeft() != oldPAP.getDxcLeft())
     {
-      size += SprmUtils.addSprm((short)0x840F, newPAP.getDxaLeft(), null, sprmList);
+      // sprmPDxcLeft
+      size += SprmUtils.addSprm((short)0x4456, newPAP.getDxcLeft(), null, sprmList);
     }
-    if (newPAP.getDxaLeft1() != oldPAP.getDxaLeft1())
+    if (newPAP.getDxcLeft1() != oldPAP.getDxcLeft1())
     {
-      size += SprmUtils.addSprm((short)0x8411, newPAP.getDxaLeft1(), null, sprmList);
+      // sprmPDxcLeft1
+      size += SprmUtils.addSprm((short)0x4457, newPAP.getDxcLeft1(), null, sprmList);
+    }
+    if (newPAP.getDxcRight() != oldPAP.getDxcRight())
+    {
+      // sprmPDxcRight
+      size += SprmUtils.addSprm((short)0x4455, newPAP.getDxcRight(), null, sprmList);
     }
     if (!newPAP.getLspd().equals(oldPAP.getLspd()))
     {
+      // sprmPDyaLine
       byte[] buf = new byte[4];
       newPAP.getLspd().serialize(buf, 0);
 
@@ -128,131 +151,96 @@ public final class ParagraphSprmCompress
     }
     if (newPAP.getDyaBefore() != oldPAP.getDyaBefore())
     {
+      // sprmPDyaBefore
       size += SprmUtils.addSprm((short)0xA413, newPAP.getDyaBefore(), null, sprmList);
     }
     if (newPAP.getDyaAfter() != oldPAP.getDyaAfter())
     {
+      // sprmPDyaAfter
       size += SprmUtils.addSprm((short)0xA414, newPAP.getDyaAfter(), null, sprmList);
     }
-    if (newPAP.getDyaBefore() != oldPAP.getDyaBefore())
-    {
-      size += SprmUtils.addSprm((short)0x2404, newPAP.getDyaBefore(), null, sprmList);
-    }
-    if (newPAP.getFKinsoku() != oldPAP.getFKinsoku())
-    {
-      size += SprmUtils.addSprm((short)0x2433, newPAP.getDyaBefore(), null, sprmList);
-    }
-    if (newPAP.getFWordWrap() != oldPAP.getFWordWrap())
+    if (newPAP.getFDyaBeforeAuto() != oldPAP.getFDyaBeforeAuto())
     {
-      size += SprmUtils.addSprm((short)0x2434, newPAP.getFWordWrap(), null, sprmList);
+      // sprmPFDyaBeforeAuto
+      size += SprmUtils.addSprm((short)0x245B, newPAP.getFDyaBeforeAuto(), null, sprmList);
     }
-    if (newPAP.getFOverflowPunct() != oldPAP.getFOverflowPunct())
+    if (newPAP.getFDyaAfterAuto() != oldPAP.getFDyaAfterAuto())
     {
-      size += SprmUtils.addSprm((short)0x2435, newPAP.getFOverflowPunct(), null, sprmList);
-    }
-    if (newPAP.getFTopLinePunct() != oldPAP.getFTopLinePunct())
-    {
-      size += SprmUtils.addSprm((short)0x2436, newPAP.getFTopLinePunct(), null, sprmList);
-    }
-    if (newPAP.getFAutoSpaceDE() != oldPAP.getFAutoSpaceDE())
-    {
-      size += SprmUtils.addSprm((short)0x2437, newPAP.getFAutoSpaceDE(), null, sprmList);
-    }
-    if (newPAP.getFAutoSpaceDN() != oldPAP.getFAutoSpaceDN())
-    {
-      size += SprmUtils.addSprm((short)0x2438, newPAP.getFAutoSpaceDN(), null, sprmList);
-    }
-    if (newPAP.getWAlignFont() != oldPAP.getWAlignFont())
-    {
-      size += SprmUtils.addSprm((short)0x4439, newPAP.getWAlignFont(), null, sprmList);
-    }
-    if (newPAP.isFBackward() != oldPAP.isFBackward() ||
-        newPAP.isFVertical() != oldPAP.isFVertical() ||
-        newPAP.isFRotateFont() != oldPAP.isFRotateFont())
-    {
-      int val = 0;
-      if (newPAP.isFBackward())
-      {
-        val |= 0x2;
-      }
-      if (newPAP.isFVertical())
-      {
-        val |= 0x1;
-      }
-      if (newPAP.isFRotateFont())
-      {
-        val |= 0x4;
-      }
-      size += SprmUtils.addSprm((short)0x443A, val, null, sprmList);
-    }
-    if (!Arrays.equals(newPAP.getAnld(), oldPAP.getAnld()))
-    {
-      size += SprmUtils.addSprm((short)0xC63E, 0, newPAP.getAnld(), sprmList);
+      // sprmPFDyaAfterAuto
+      size += SprmUtils.addSprm((short)0x245C, newPAP.getFDyaAfterAuto(), null, sprmList);
     }
     if (newPAP.getFInTable() != oldPAP.getFInTable())
     {
+      // sprmPFInTable
       size += SprmUtils.addSprm((short)0x2416, newPAP.getFInTable(), null, sprmList);
     }
     if (newPAP.getFTtp() != oldPAP.getFTtp())
     {
+      // sprmPFTtp
       size += SprmUtils.addSprm((short)0x2417, newPAP.getFTtp(), null, sprmList);
     }
-    if (newPAP.getWr() != oldPAP.getWr())
-    {
-      size += SprmUtils.addSprm((short)0x2423, newPAP.getWr(), null, sprmList);
-    }
-    if (newPAP.getFLocked() != oldPAP.getFLocked())
-    {
-      size += SprmUtils.addSprm((short)0x2430, newPAP.getFLocked(), null, sprmList);
-    }
     if (newPAP.getDxaAbs() != oldPAP.getDxaAbs())
     {
+      // sprmPDxaAbs
       size += SprmUtils.addSprm((short)0x8418, newPAP.getDxaAbs(), null, sprmList);
     }
     if (newPAP.getDyaAbs() != oldPAP.getDyaAbs())
     {
+      // sprmPDyaAbs
       size += SprmUtils.addSprm((short)0x8419, newPAP.getDyaAbs(), null, sprmList);
     }
     if (newPAP.getDxaWidth() != oldPAP.getDxaWidth())
     {
+      // sprmPDxaWidth
       size += SprmUtils.addSprm((short)0x841A, newPAP.getDxaWidth(), null, sprmList);
     }
-    if (!newPAP.getBrcTop().equals(oldPAP.getBrcTop()))
+    
+    // Page 52 of public specification begins
+    if (newPAP.getWr() != oldPAP.getWr())
     {
-      int brc = newPAP.getBrcTop().toInt();
-      size += SprmUtils.addSprm((short)0x6424, brc, null, sprmList);
+      size += SprmUtils.addSprm((short)0x2423, newPAP.getWr(), null, sprmList);
     }
-    if (!newPAP.getBrcLeft().equals(oldPAP.getBrcLeft()))
+
+    if (newPAP.getBrcBar().equals(oldPAP.getBrcBar()))
     {
-      int brc = newPAP.getBrcLeft().toInt();
-      size += SprmUtils.addSprm((short)0x6425, brc, null, sprmList);
+      // XXX: sprm code 0x6428 is sprmPBrcBetween80, but accessed property linked to sprmPBrcBar80 (0x6629)
+      int brc = newPAP.getBrcBar().toInt();
+      size += SprmUtils.addSprm((short)0x6428, brc, null, sprmList);
     }
     if (!newPAP.getBrcBottom().equals(oldPAP.getBrcBottom()))
     {
+      // sprmPBrcBottom80  
       int brc = newPAP.getBrcBottom().toInt();
       size += SprmUtils.addSprm((short)0x6426, brc, null, sprmList);
     }
+    if (!newPAP.getBrcLeft().equals(oldPAP.getBrcLeft()))
+    {
+      // sprmPBrcLeft80  
+      int brc = newPAP.getBrcLeft().toInt();
+      size += SprmUtils.addSprm((short)0x6425, brc, null, sprmList);
+    }
+
+    // Page 53 of public specification begins
     if (!newPAP.getBrcRight().equals(oldPAP.getBrcRight()))
     {
+      // sprmPBrcRight80
       int brc = newPAP.getBrcRight().toInt();
       size += SprmUtils.addSprm((short)0x6427, brc, null, sprmList);
     }
-    if (newPAP.getBrcBar().equals(oldPAP.getBrcBar()))
-    {
-      int brc = newPAP.getBrcBar().toInt();
-      size += SprmUtils.addSprm((short)0x6428, brc, null, sprmList);
-    }
-    if (newPAP.getDxaFromText() != oldPAP.getDxaFromText())
+    if (!newPAP.getBrcTop().equals(oldPAP.getBrcTop()))
     {
-      size += SprmUtils.addSprm((short)0x842F, newPAP.getDxaFromText(), null, sprmList);
+      // sprmPBrcTop80 
+      int brc = newPAP.getBrcTop().toInt();
+      size += SprmUtils.addSprm((short)0x6424, brc, null, sprmList);
     }
-    if (newPAP.getDyaFromText() != oldPAP.getDyaFromText())
+    if (newPAP.getFNoAutoHyph() != oldPAP.getFNoAutoHyph())
     {
-      size += SprmUtils.addSprm((short)0x842E, newPAP.getDyaFromText(), null, sprmList);
+      size += SprmUtils.addSprm((short)0x242A, newPAP.getFNoAutoHyph(), null, sprmList);
     }
     if (newPAP.getDyaHeight() != oldPAP.getDyaHeight() ||
-        newPAP.getFMinHeight() != oldPAP.getFMinHeight())
+            newPAP.getFMinHeight() != oldPAP.getFMinHeight())
     {
+      // sprmPWHeightAbs
       short val = (short)newPAP.getDyaHeight();
       if (newPAP.getFMinHeight() > 0)
       {
@@ -260,52 +248,139 @@ public final class ParagraphSprmCompress
       }
       size += SprmUtils.addSprm((short)0x442B, val, null, sprmList);
     }
+    if (newPAP.getDcs() != null && !newPAP.getDcs().equals(oldPAP.getDcs()))
+    {
+      // 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.getDcs() != null && !newPAP.getDcs().equals(oldPAP.getDcs()))
+    if (newPAP.getDyaFromText() != oldPAP.getDyaFromText())
     {
-      size += SprmUtils.addSprm((short)0x442C, newPAP.getDcs().toShort(), null, sprmList);
+      // sprmPDyaFromText
+      size += SprmUtils.addSprm((short)0x842E, newPAP.getDyaFromText(), null, sprmList);
     }
-    if (newPAP.getLvl() != oldPAP.getLvl())
+    if (newPAP.getDxaFromText() != oldPAP.getDxaFromText())
     {
-      size += SprmUtils.addSprm((short)0x2640, newPAP.getLvl(), null, sprmList);
+      // sprmPDxaFromText
+      size += SprmUtils.addSprm((short)0x842F, newPAP.getDxaFromText(), null, sprmList);
     }
-    if (newPAP.getFNumRMIns() != oldPAP.getFNumRMIns())
+    if (newPAP.getFLocked() != oldPAP.getFLocked())
     {
-      size += SprmUtils.addSprm((short)0x2443, newPAP.getFNumRMIns(), null, sprmList);
+      // sprmPFLocked
+      size += SprmUtils.addSprm((short)0x2430, newPAP.getFLocked(), null, sprmList);
+    }
+    if (newPAP.getFWidowControl() != oldPAP.getFWidowControl())
+    {
+      // sprmPFWidowControl
+      size += SprmUtils.addSprm((short)0x2431, newPAP.getFWidowControl(), null, sprmList);
+    }
+    if (newPAP.getFKinsoku() != oldPAP.getFKinsoku())
+    {
+      size += SprmUtils.addSprm((short)0x2433, newPAP.getDyaBefore(), null, sprmList);
+    }
+    if (newPAP.getFWordWrap() != oldPAP.getFWordWrap())
+    {
+      size += SprmUtils.addSprm((short)0x2434, newPAP.getFWordWrap(), null, sprmList);
+    }
+    if (newPAP.getFOverflowPunct() != oldPAP.getFOverflowPunct())
+    {
+      size += SprmUtils.addSprm((short)0x2435, newPAP.getFOverflowPunct(), null, sprmList);
+    }
+    if (newPAP.getFTopLinePunct() != oldPAP.getFTopLinePunct())
+    {
+      size += SprmUtils.addSprm((short)0x2436, newPAP.getFTopLinePunct(), null, sprmList);
+    }
+    if (newPAP.getFAutoSpaceDE() != oldPAP.getFAutoSpaceDE())
+    {
+      size += SprmUtils.addSprm((short)0x2437, newPAP.getFAutoSpaceDE(), null, sprmList);
+    }
+    if (newPAP.getFAutoSpaceDN() != oldPAP.getFAutoSpaceDN())
+    {
+      size += SprmUtils.addSprm((short)0x2438, newPAP.getFAutoSpaceDN(), null, sprmList);
+    }
+    if (newPAP.getWAlignFont() != oldPAP.getWAlignFont())
+    {
+      size += SprmUtils.addSprm((short)0x4439, newPAP.getWAlignFont(), null, sprmList);
+    }
+
+    // Page 54 of public specification begins
+    if (newPAP.isFBackward() != oldPAP.isFBackward() ||
+        newPAP.isFVertical() != oldPAP.isFVertical() ||
+        newPAP.isFRotateFont() != oldPAP.isFRotateFont())
+    {
+      int val = 0;
+      if (newPAP.isFBackward())
+      {
+        val |= 0x2;
+      }
+      if (newPAP.isFVertical())
+      {
+        val |= 0x1;
+      }
+      if (newPAP.isFRotateFont())
+      {
+        val |= 0x4;
+      }
+      size += SprmUtils.addSprm((short)0x443A, val, null, sprmList);
+    }
+    if (!Arrays.equals(newPAP.getAnld(), oldPAP.getAnld()))
+    {
+      // sprmPAnld80 
+      size += SprmUtils.addSprm((short)0xC63E, 0, newPAP.getAnld(), sprmList);
     }
     if (newPAP.getFPropRMark() != oldPAP.getFPropRMark() ||
-        newPAP.getIbstPropRMark() != oldPAP.getIbstPropRMark() ||
-        !newPAP.getDttmPropRMark().equals(oldPAP.getDttmPropRMark()))
+            newPAP.getIbstPropRMark() != oldPAP.getIbstPropRMark() ||
+            !newPAP.getDttmPropRMark().equals(oldPAP.getDttmPropRMark()))
     {
+      // sprmPPropRMark
       byte[] buf = new byte[7];
       buf[0] = (byte)newPAP.getFPropRMark();
       LittleEndian.putShort(buf, 1, (short)newPAP.getIbstPropRMark());
       newPAP.getDttmPropRMark().serialize(buf, 3);
       size += SprmUtils.addSprm((short)0xC63F, 0, buf, sprmList);
     }
-    if (!Arrays.equals(newPAP.getNumrm(), oldPAP.getNumrm()))
+    if (newPAP.getLvl() != oldPAP.getLvl())
     {
-      size += SprmUtils.addSprm((short)0xC645, 0, newPAP.getNumrm(), sprmList);
+      // sprmPOutLvl 
+      size += SprmUtils.addSprm((short)0x2640, newPAP.getLvl(), null, sprmList);
     }
-
-    if (newPAP.getTableLevel() != oldPAP.getTableLevel())
+    if (newPAP.getFBiDi() != oldPAP.getFBiDi())
     {
-      size += SprmUtils.addSprm((short)0x6649, newPAP.getTableLevel(), null, sprmList);
+      // sprmPFBiDi 
+      size += SprmUtils.addSprm((short)0x2441, newPAP.getFBiDi(), null, sprmList);
+    }
+    if (newPAP.getFNumRMIns() != oldPAP.getFNumRMIns())
+    {
+      // sprmPFNumRMIns 
+      size += SprmUtils.addSprm((short)0x2443, newPAP.getFNumRMIns(), null, sprmList);
+    }
+    if (!Arrays.equals(newPAP.getNumrm(), oldPAP.getNumrm()))
+    {
+      // sprmPNumRM
+      size += SprmUtils.addSprm((short)0xC645, 0, newPAP.getNumrm(), sprmList);
     }
-
     if (newPAP.getEmbeddedCellMark() != oldPAP.getEmbeddedCellMark())
     {
+      // sprmPFInnerTableCell
       size += SprmUtils.addSprm((short)0x244b, newPAP.getEmbeddedCellMark(), null, sprmList);
     }
-
     if (newPAP.getFTtpEmbedded() != oldPAP.getFTtpEmbedded())
     {
+      // sprmPFInnerTtp 
       size += SprmUtils.addSprm((short)0x244c, newPAP.getFTtpEmbedded(), null, sprmList);
     }
 
+    // Page 55 of public specification begins
+    if (newPAP.getTableLevel() != oldPAP.getTableLevel())
+    {
+      // sprmPItap
+      size += SprmUtils.addSprm((short)0x6649, newPAP.getTableLevel(), null, sprmList);
+    }
+
     return SprmUtils.getGrpprl(sprmList, size);
 
   }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java?rev=1137143&r1=1137142&r2=1137143&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java Sat Jun 18 08:57:10 2011
@@ -346,8 +346,7 @@ public final class ParagraphSprmUncompre
         }
         break;
       case 0x41:
-
-        // undocumented
+        // sprmPFBiDi 
         break;
       case 0x43:
 
@@ -387,7 +386,8 @@ public final class ParagraphSprmUncompre
         newPAP.setFTtpEmbedded((byte)sprm.getOperand());
         break;
       case 0x61:
-        // Logicial justification of the paragraph, eg left, centre, right
+        // sprmPJc 
+        newPAP.setJustificationLogical((byte) sprm.getOperand());
         break;
       default:
         break;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message