poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1142864 - in /poi/trunk/src: 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 Tue, 05 Jul 2011 01:11:43 GMT
Author: sergey
Date: Tue Jul  5 01:11:42 2011
New Revision: 1142864

URL: http://svn.apache.org/viewvc?rev=1142864&view=rev
Log:
rename PAP structure fields according to specification

Modified:
    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/Paragraph.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
    poi/trunk/src/types/definitions/pap_type.xml

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=1142864&r1=1142863&r2=1142864&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 Tue
Jul  5 01:11:42 2011
@@ -19,12 +19,13 @@ 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.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.ShadingDescriptor;
+import org.apache.poi.util.BitField;
 
 /**
  * Paragraph Properties.
@@ -89,36 +90,37 @@ public abstract class PAPAbstractType
     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;
+    protected  int field_50_itap;
+    protected  byte field_51_fInnerTableCell;
+    protected  byte field_52_fOpenTch;
+    protected  byte field_53_fTtpEmbedded;
+    protected  short field_54_dxcRight;
+    protected  short field_55_dxcLeft;
+    protected  short field_56_dxcLeft1;
+    protected  byte field_57_fDyaBeforeAuto;
+    protected  byte field_58_fDyaAfterAuto;
+    protected  int field_59_dxaRight;
+    protected  int field_60_dxaLeft;
+    protected  int field_61_dxaLeft1;
+    protected  byte field_62_jc;
+    protected  byte field_63_fNoAllowOverlap;
+    protected  BorderCode field_64_brcTop;
+    protected  BorderCode field_65_brcLeft;
+    protected  BorderCode field_66_brcBottom;
+    protected  BorderCode field_67_brcRight;
+    protected  BorderCode field_68_brcBetween;
+    protected  BorderCode field_69_brcBar;
+    protected  ShadingDescriptor field_70_shd;
+    protected  byte[] field_71_anld;
+    protected  byte[] field_72_phe;
+    protected  int field_73_fPropRMark;
+    protected  int field_74_ibstPropRMark;
+    protected  DateAndTime field_75_dttmPropRMark;
+    protected  int field_76_itbdMac;
+    protected  int[] field_77_rgdxaTab;
+    protected  byte[] field_78_rgtbd;
+    protected  byte[] field_79_numrm;
+    protected  byte[] field_80_ptap;
 
 
     public PAPAbstractType()
@@ -283,6 +285,18 @@ public abstract class PAPAbstractType
         buffer.append("    .fAdjustRight         = ");
         buffer.append(" (").append(getFAdjustRight()).append(" )\n");
 
+        buffer.append("    .itap                 = ");
+        buffer.append(" (").append(getItap()).append(" )\n");
+
+        buffer.append("    .fInnerTableCell      = ");
+        buffer.append(" (").append(getFInnerTableCell()).append(" )\n");
+
+        buffer.append("    .fOpenTch             = ");
+        buffer.append(" (").append(getFOpenTch()).append(" )\n");
+
+        buffer.append("    .fTtpEmbedded         = ");
+        buffer.append(" (").append(getFTtpEmbedded()).append(" )\n");
+
         buffer.append("    .dxcRight             = ");
         buffer.append(" (").append(getDxcRight()).append(" )\n");
 
@@ -364,15 +378,6 @@ public abstract class PAPAbstractType
         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();
     }
@@ -382,7 +387,7 @@ public abstract class PAPAbstractType
      */
     public int getSize()
     {
-        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;
+        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 + 4 + 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;
     }
 
 
@@ -1172,19 +1177,83 @@ public abstract class PAPAbstractType
     }
 
     /**
+     * Get the itap field for the PAP record.
+     */
+    public int getItap()
+    {
+        return field_50_itap;
+    }
+
+    /**
+     * Set the itap field for the PAP record.
+     */
+    public void setItap(int field_50_itap)
+    {
+        this.field_50_itap = field_50_itap;
+    }
+
+    /**
+     * Get the fInnerTableCell field for the PAP record.
+     */
+    public byte getFInnerTableCell()
+    {
+        return field_51_fInnerTableCell;
+    }
+
+    /**
+     * Set the fInnerTableCell field for the PAP record.
+     */
+    public void setFInnerTableCell(byte field_51_fInnerTableCell)
+    {
+        this.field_51_fInnerTableCell = field_51_fInnerTableCell;
+    }
+
+    /**
+     * Get the fOpenTch field for the PAP record.
+     */
+    public byte getFOpenTch()
+    {
+        return field_52_fOpenTch;
+    }
+
+    /**
+     * Set the fOpenTch field for the PAP record.
+     */
+    public void setFOpenTch(byte field_52_fOpenTch)
+    {
+        this.field_52_fOpenTch = field_52_fOpenTch;
+    }
+
+    /**
+     * Get the fTtpEmbedded field for the PAP record.
+     */
+    public byte getFTtpEmbedded()
+    {
+        return field_53_fTtpEmbedded;
+    }
+
+    /**
+     * Set the fTtpEmbedded field for the PAP record.
+     */
+    public void setFTtpEmbedded(byte field_53_fTtpEmbedded)
+    {
+        this.field_53_fTtpEmbedded = field_53_fTtpEmbedded;
+    }
+
+    /**
      * Get the dxcRight field for the PAP record.
      */
     public short getDxcRight()
     {
-        return field_50_dxcRight;
+        return field_54_dxcRight;
     }
 
     /**
      * Set the dxcRight field for the PAP record.
      */
-    public void setDxcRight(short field_50_dxcRight)
+    public void setDxcRight(short field_54_dxcRight)
     {
-        this.field_50_dxcRight = field_50_dxcRight;
+        this.field_54_dxcRight = field_54_dxcRight;
     }
 
     /**
@@ -1192,15 +1261,15 @@ public abstract class PAPAbstractType
      */
     public short getDxcLeft()
     {
-        return field_51_dxcLeft;
+        return field_55_dxcLeft;
     }
 
     /**
      * Set the dxcLeft field for the PAP record.
      */
-    public void setDxcLeft(short field_51_dxcLeft)
+    public void setDxcLeft(short field_55_dxcLeft)
     {
-        this.field_51_dxcLeft = field_51_dxcLeft;
+        this.field_55_dxcLeft = field_55_dxcLeft;
     }
 
     /**
@@ -1208,15 +1277,15 @@ public abstract class PAPAbstractType
      */
     public short getDxcLeft1()
     {
-        return field_52_dxcLeft1;
+        return field_56_dxcLeft1;
     }
 
     /**
      * Set the dxcLeft1 field for the PAP record.
      */
-    public void setDxcLeft1(short field_52_dxcLeft1)
+    public void setDxcLeft1(short field_56_dxcLeft1)
     {
-        this.field_52_dxcLeft1 = field_52_dxcLeft1;
+        this.field_56_dxcLeft1 = field_56_dxcLeft1;
     }
 
     /**
@@ -1224,15 +1293,15 @@ public abstract class PAPAbstractType
      */
     public byte getFDyaBeforeAuto()
     {
-        return field_53_fDyaBeforeAuto;
+        return field_57_fDyaBeforeAuto;
     }
 
     /**
      * Set the fDyaBeforeAuto field for the PAP record.
      */
-    public void setFDyaBeforeAuto(byte field_53_fDyaBeforeAuto)
+    public void setFDyaBeforeAuto(byte field_57_fDyaBeforeAuto)
     {
-        this.field_53_fDyaBeforeAuto = field_53_fDyaBeforeAuto;
+        this.field_57_fDyaBeforeAuto = field_57_fDyaBeforeAuto;
     }
 
     /**
@@ -1240,15 +1309,15 @@ public abstract class PAPAbstractType
      */
     public byte getFDyaAfterAuto()
     {
-        return field_54_fDyaAfterAuto;
+        return field_58_fDyaAfterAuto;
     }
 
     /**
      * Set the fDyaAfterAuto field for the PAP record.
      */
-    public void setFDyaAfterAuto(byte field_54_fDyaAfterAuto)
+    public void setFDyaAfterAuto(byte field_58_fDyaAfterAuto)
     {
-        this.field_54_fDyaAfterAuto = field_54_fDyaAfterAuto;
+        this.field_58_fDyaAfterAuto = field_58_fDyaAfterAuto;
     }
 
     /**
@@ -1256,15 +1325,15 @@ public abstract class PAPAbstractType
      */
     public int getDxaRight()
     {
-        return field_55_dxaRight;
+        return field_59_dxaRight;
     }
 
     /**
      * Set the dxaRight field for the PAP record.
      */
-    public void setDxaRight(int field_55_dxaRight)
+    public void setDxaRight(int field_59_dxaRight)
     {
-        this.field_55_dxaRight = field_55_dxaRight;
+        this.field_59_dxaRight = field_59_dxaRight;
     }
 
     /**
@@ -1272,15 +1341,15 @@ public abstract class PAPAbstractType
      */
     public int getDxaLeft()
     {
-        return field_56_dxaLeft;
+        return field_60_dxaLeft;
     }
 
     /**
      * Set the dxaLeft field for the PAP record.
      */
-    public void setDxaLeft(int field_56_dxaLeft)
+    public void setDxaLeft(int field_60_dxaLeft)
     {
-        this.field_56_dxaLeft = field_56_dxaLeft;
+        this.field_60_dxaLeft = field_60_dxaLeft;
     }
 
     /**
@@ -1288,15 +1357,15 @@ public abstract class PAPAbstractType
      */
     public int getDxaLeft1()
     {
-        return field_57_dxaLeft1;
+        return field_61_dxaLeft1;
     }
 
     /**
      * Set the dxaLeft1 field for the PAP record.
      */
-    public void setDxaLeft1(int field_57_dxaLeft1)
+    public void setDxaLeft1(int field_61_dxaLeft1)
     {
-        this.field_57_dxaLeft1 = field_57_dxaLeft1;
+        this.field_61_dxaLeft1 = field_61_dxaLeft1;
     }
 
     /**
@@ -1304,15 +1373,15 @@ public abstract class PAPAbstractType
      */
     public byte getJc()
     {
-        return field_58_jc;
+        return field_62_jc;
     }
 
     /**
      * Set the jc field for the PAP record.
      */
-    public void setJc(byte field_58_jc)
+    public void setJc(byte field_62_jc)
     {
-        this.field_58_jc = field_58_jc;
+        this.field_62_jc = field_62_jc;
     }
 
     /**
@@ -1320,15 +1389,15 @@ public abstract class PAPAbstractType
      */
     public byte getFNoAllowOverlap()
     {
-        return field_59_fNoAllowOverlap;
+        return field_63_fNoAllowOverlap;
     }
 
     /**
      * Set the fNoAllowOverlap field for the PAP record.
      */
-    public void setFNoAllowOverlap(byte field_59_fNoAllowOverlap)
+    public void setFNoAllowOverlap(byte field_63_fNoAllowOverlap)
     {
-        this.field_59_fNoAllowOverlap = field_59_fNoAllowOverlap;
+        this.field_63_fNoAllowOverlap = field_63_fNoAllowOverlap;
     }
 
     /**
@@ -1336,15 +1405,15 @@ public abstract class PAPAbstractType
      */
     public BorderCode getBrcTop()
     {
-        return field_60_brcTop;
+        return field_64_brcTop;
     }
 
     /**
      * Set the brcTop field for the PAP record.
      */
-    public void setBrcTop(BorderCode field_60_brcTop)
+    public void setBrcTop(BorderCode field_64_brcTop)
     {
-        this.field_60_brcTop = field_60_brcTop;
+        this.field_64_brcTop = field_64_brcTop;
     }
 
     /**
@@ -1352,15 +1421,15 @@ public abstract class PAPAbstractType
      */
     public BorderCode getBrcLeft()
     {
-        return field_61_brcLeft;
+        return field_65_brcLeft;
     }
 
     /**
      * Set the brcLeft field for the PAP record.
      */
-    public void setBrcLeft(BorderCode field_61_brcLeft)
+    public void setBrcLeft(BorderCode field_65_brcLeft)
     {
-        this.field_61_brcLeft = field_61_brcLeft;
+        this.field_65_brcLeft = field_65_brcLeft;
     }
 
     /**
@@ -1368,15 +1437,15 @@ public abstract class PAPAbstractType
      */
     public BorderCode getBrcBottom()
     {
-        return field_62_brcBottom;
+        return field_66_brcBottom;
     }
 
     /**
      * Set the brcBottom field for the PAP record.
      */
-    public void setBrcBottom(BorderCode field_62_brcBottom)
+    public void setBrcBottom(BorderCode field_66_brcBottom)
     {
-        this.field_62_brcBottom = field_62_brcBottom;
+        this.field_66_brcBottom = field_66_brcBottom;
     }
 
     /**
@@ -1384,15 +1453,15 @@ public abstract class PAPAbstractType
      */
     public BorderCode getBrcRight()
     {
-        return field_63_brcRight;
+        return field_67_brcRight;
     }
 
     /**
      * Set the brcRight field for the PAP record.
      */
-    public void setBrcRight(BorderCode field_63_brcRight)
+    public void setBrcRight(BorderCode field_67_brcRight)
     {
-        this.field_63_brcRight = field_63_brcRight;
+        this.field_67_brcRight = field_67_brcRight;
     }
 
     /**
@@ -1400,15 +1469,15 @@ public abstract class PAPAbstractType
      */
     public BorderCode getBrcBetween()
     {
-        return field_64_brcBetween;
+        return field_68_brcBetween;
     }
 
     /**
      * Set the brcBetween field for the PAP record.
      */
-    public void setBrcBetween(BorderCode field_64_brcBetween)
+    public void setBrcBetween(BorderCode field_68_brcBetween)
     {
-        this.field_64_brcBetween = field_64_brcBetween;
+        this.field_68_brcBetween = field_68_brcBetween;
     }
 
     /**
@@ -1416,15 +1485,15 @@ public abstract class PAPAbstractType
      */
     public BorderCode getBrcBar()
     {
-        return field_65_brcBar;
+        return field_69_brcBar;
     }
 
     /**
      * Set the brcBar field for the PAP record.
      */
-    public void setBrcBar(BorderCode field_65_brcBar)
+    public void setBrcBar(BorderCode field_69_brcBar)
     {
-        this.field_65_brcBar = field_65_brcBar;
+        this.field_69_brcBar = field_69_brcBar;
     }
 
     /**
@@ -1432,15 +1501,15 @@ public abstract class PAPAbstractType
      */
     public ShadingDescriptor getShd()
     {
-        return field_66_shd;
+        return field_70_shd;
     }
 
     /**
      * Set the shd field for the PAP record.
      */
-    public void setShd(ShadingDescriptor field_66_shd)
+    public void setShd(ShadingDescriptor field_70_shd)
     {
-        this.field_66_shd = field_66_shd;
+        this.field_70_shd = field_70_shd;
     }
 
     /**
@@ -1448,15 +1517,15 @@ public abstract class PAPAbstractType
      */
     public byte[] getAnld()
     {
-        return field_67_anld;
+        return field_71_anld;
     }
 
     /**
      * Set the anld field for the PAP record.
      */
-    public void setAnld(byte[] field_67_anld)
+    public void setAnld(byte[] field_71_anld)
     {
-        this.field_67_anld = field_67_anld;
+        this.field_71_anld = field_71_anld;
     }
 
     /**
@@ -1464,15 +1533,15 @@ public abstract class PAPAbstractType
      */
     public byte[] getPhe()
     {
-        return field_68_phe;
+        return field_72_phe;
     }
 
     /**
      * Set the phe field for the PAP record.
      */
-    public void setPhe(byte[] field_68_phe)
+    public void setPhe(byte[] field_72_phe)
     {
-        this.field_68_phe = field_68_phe;
+        this.field_72_phe = field_72_phe;
     }
 
     /**
@@ -1480,15 +1549,15 @@ public abstract class PAPAbstractType
      */
     public int getFPropRMark()
     {
-        return field_69_fPropRMark;
+        return field_73_fPropRMark;
     }
 
     /**
      * Set the fPropRMark field for the PAP record.
      */
-    public void setFPropRMark(int field_69_fPropRMark)
+    public void setFPropRMark(int field_73_fPropRMark)
     {
-        this.field_69_fPropRMark = field_69_fPropRMark;
+        this.field_73_fPropRMark = field_73_fPropRMark;
     }
 
     /**
@@ -1496,15 +1565,15 @@ public abstract class PAPAbstractType
      */
     public int getIbstPropRMark()
     {
-        return field_70_ibstPropRMark;
+        return field_74_ibstPropRMark;
     }
 
     /**
      * Set the ibstPropRMark field for the PAP record.
      */
-    public void setIbstPropRMark(int field_70_ibstPropRMark)
+    public void setIbstPropRMark(int field_74_ibstPropRMark)
     {
-        this.field_70_ibstPropRMark = field_70_ibstPropRMark;
+        this.field_74_ibstPropRMark = field_74_ibstPropRMark;
     }
 
     /**
@@ -1512,15 +1581,15 @@ public abstract class PAPAbstractType
      */
     public DateAndTime getDttmPropRMark()
     {
-        return field_71_dttmPropRMark;
+        return field_75_dttmPropRMark;
     }
 
     /**
      * Set the dttmPropRMark field for the PAP record.
      */
-    public void setDttmPropRMark(DateAndTime field_71_dttmPropRMark)
+    public void setDttmPropRMark(DateAndTime field_75_dttmPropRMark)
     {
-        this.field_71_dttmPropRMark = field_71_dttmPropRMark;
+        this.field_75_dttmPropRMark = field_75_dttmPropRMark;
     }
 
     /**
@@ -1528,15 +1597,15 @@ public abstract class PAPAbstractType
      */
     public int getItbdMac()
     {
-        return field_72_itbdMac;
+        return field_76_itbdMac;
     }
 
     /**
      * Set the itbdMac field for the PAP record.
      */
-    public void setItbdMac(int field_72_itbdMac)
+    public void setItbdMac(int field_76_itbdMac)
     {
-        this.field_72_itbdMac = field_72_itbdMac;
+        this.field_76_itbdMac = field_76_itbdMac;
     }
 
     /**
@@ -1544,15 +1613,15 @@ public abstract class PAPAbstractType
      */
     public int[] getRgdxaTab()
     {
-        return field_73_rgdxaTab;
+        return field_77_rgdxaTab;
     }
 
     /**
      * Set the rgdxaTab field for the PAP record.
      */
-    public void setRgdxaTab(int[] field_73_rgdxaTab)
+    public void setRgdxaTab(int[] field_77_rgdxaTab)
     {
-        this.field_73_rgdxaTab = field_73_rgdxaTab;
+        this.field_77_rgdxaTab = field_77_rgdxaTab;
     }
 
     /**
@@ -1560,15 +1629,15 @@ public abstract class PAPAbstractType
      */
     public byte[] getRgtbd()
     {
-        return field_74_rgtbd;
+        return field_78_rgtbd;
     }
 
     /**
      * Set the rgtbd field for the PAP record.
      */
-    public void setRgtbd(byte[] field_74_rgtbd)
+    public void setRgtbd(byte[] field_78_rgtbd)
     {
-        this.field_74_rgtbd = field_74_rgtbd;
+        this.field_78_rgtbd = field_78_rgtbd;
     }
 
     /**
@@ -1576,15 +1645,15 @@ public abstract class PAPAbstractType
      */
     public byte[] getNumrm()
     {
-        return field_75_numrm;
+        return field_79_numrm;
     }
 
     /**
      * Set the numrm field for the PAP record.
      */
-    public void setNumrm(byte[] field_75_numrm)
+    public void setNumrm(byte[] field_79_numrm)
     {
-        this.field_75_numrm = field_75_numrm;
+        this.field_79_numrm = field_79_numrm;
     }
 
     /**
@@ -1592,63 +1661,15 @@ public abstract class PAPAbstractType
      */
     public byte[] getPtap()
     {
-        return field_76_ptap;
+        return field_80_ptap;
     }
 
     /**
      * Set the ptap field for the PAP record.
      */
-    public void setPtap(byte[] field_76_ptap)
-    {
-        this.field_76_ptap = field_76_ptap;
-    }
-
-    /**
-     * Get the tableLevel field for the PAP record.
-     */
-    public byte getTableLevel()
-    {
-        return field_77_tableLevel;
-    }
-
-    /**
-     * Set the tableLevel field for the PAP record.
-     */
-    public void setTableLevel(byte field_77_tableLevel)
-    {
-        this.field_77_tableLevel = field_77_tableLevel;
-    }
-
-    /**
-     * Get the fTtpEmbedded field for the PAP record.
-     */
-    public byte getFTtpEmbedded()
-    {
-        return field_78_fTtpEmbedded;
-    }
-
-    /**
-     * Set the fTtpEmbedded field for the PAP record.
-     */
-    public void setFTtpEmbedded(byte field_78_fTtpEmbedded)
+    public void setPtap(byte[] field_80_ptap)
     {
-        this.field_78_fTtpEmbedded = field_78_fTtpEmbedded;
-    }
-
-    /**
-     * Get the embeddedCellMark field for the PAP record.
-     */
-    public byte getEmbeddedCellMark()
-    {
-        return field_79_embeddedCellMark;
-    }
-
-    /**
-     * Set the embeddedCellMark field for the PAP record.
-     */
-    public void setEmbeddedCellMark(byte field_79_embeddedCellMark)
-    {
-        this.field_79_embeddedCellMark = field_79_embeddedCellMark;
+        this.field_80_ptap = field_80_ptap;
     }
 
     /**
@@ -1715,8 +1736,4 @@ public abstract class PAPAbstractType
     }
 
 
-}  // END OF CLASS
-
-
-
-
+}  // END OF CLASS
\ No newline at end of file

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=1142864&r1=1142863&r2=1142864&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 Tue
Jul  5 01:11:42 2011
@@ -17,13 +17,12 @@
 
 package org.apache.poi.hwpf.sprm;
 
-import java.util.List;
 import java.util.ArrayList;
 import java.util.Arrays;
-
-import org.apache.poi.util.LittleEndian;
+import java.util.List;
 
 import org.apache.poi.hwpf.usermodel.ParagraphProperties;
+import org.apache.poi.util.LittleEndian;
 
 public final class ParagraphSprmCompressor
 {
@@ -363,10 +362,10 @@ public final class ParagraphSprmCompress
       // sprmPNumRM
       size += SprmUtils.addSprm((short)0xC645, 0, newPAP.getNumrm(), sprmList);
     }
-    if (newPAP.getEmbeddedCellMark() != oldPAP.getEmbeddedCellMark())
+    if (newPAP.getFInnerTableCell() != oldPAP.getFInnerTableCell())
     {
       // sprmPFInnerTableCell
-      size += SprmUtils.addSprm((short)0x244b, newPAP.getEmbeddedCellMark(), null, sprmList);
+      size += SprmUtils.addSprm((short)0x244b, newPAP.getFInnerTableCell(), null, sprmList);
     }
     if (newPAP.getFTtpEmbedded() != oldPAP.getFTtpEmbedded())
     {
@@ -375,10 +374,10 @@ public final class ParagraphSprmCompress
     }
 
     // Page 55 of public specification begins
-    if (newPAP.getTableLevel() != oldPAP.getTableLevel())
+    if (newPAP.getItap() != oldPAP.getItap())
     {
       // sprmPItap
-      size += SprmUtils.addSprm((short)0x6649, newPAP.getTableLevel(), null, sprmList);
+      size += SprmUtils.addSprm((short)0x6649, newPAP.getItap(), 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=1142864&r1=1142863&r2=1142864&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 Tue
Jul  5 01:11:42 2011
@@ -17,21 +17,21 @@
 
 package org.apache.poi.hwpf.sprm;
 
-import org.apache.poi.hwpf.usermodel.ParagraphProperties;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+
 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.DropCapSpecifier;
 import org.apache.poi.util.LittleEndian;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Collections;
-import java.util.ArrayList;
-
 public final class ParagraphSprmUncompressor
   extends SprmUncompressor
 {
@@ -192,9 +192,10 @@ public final class ParagraphSprmUncompre
         // fast saved only
         //applySprmPChgTabs (newPAP, varParam, opSize);
         break;
-      case 0x16:
-        newPAP.setFInTable ((byte) sprm.getOperand());
-        break;
+        case 0x16:
+            // sprmPFInTable -- 0x2416
+            newPAP.setFInTable( (byte) sprm.getOperand() );
+            break;
       case 0x17:
         newPAP.setFTtp ((byte) sprm.getOperand());
         break;
@@ -392,15 +393,22 @@ public final class ParagraphSprmUncompre
       case 0x48:
         newPAP.setFAdjustRight ((byte) sprm.getOperand());
         break;
-      case 0x49:
-        newPAP.setTableLevel((byte)sprm.getOperand());
-        break;
-      case 0x4b:
-        newPAP.setEmbeddedCellMark((byte)sprm.getOperand());
-        break;
-      case 0x4c:
-        newPAP.setFTtpEmbedded((byte)sprm.getOperand());
-        break;
+        case 0x49:
+            // sprmPItap -- 0x6649
+            newPAP.setItap( sprm.getOperand() );
+            break;
+        case 0x4a:
+            // sprmPDtap -- 0x664a
+            newPAP.setItap( (byte) ( newPAP.getItap() + sprm.getOperand() ) );
+            break;
+        case 0x4b:
+            // sprmPFInnerTableCell -- 0x244b
+            newPAP.setFInnerTableCell( (byte) sprm.getOperand() );
+            break;
+        case 0x4c:
+            // sprmPFInnerTtp -- 0x244c
+            newPAP.setFTtpEmbedded( (byte) sprm.getOperand() );
+            break;
       case 0x61:
         // sprmPJc 
         newPAP.setJustificationLogical((byte) sprm.getOperand());

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java?rev=1142864&r1=1142863&r2=1142864&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java Tue Jul  5 01:11:42
2011
@@ -131,12 +131,12 @@ public class Paragraph extends Range imp
 
   public int getTableLevel()
   {
-    return _props.getTableLevel();
+    return _props.getItap();
   }
 
   public boolean isEmbeddedCellMark()
   {
-    return _props.getEmbeddedCellMark() != 0;
+    return _props.getFInnerTableCell() != 0;
   }
 
   public int getJustification()

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java?rev=1142864&r1=1142863&r2=1142864&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java Tue Jul  5 01:11:42
2011
@@ -649,7 +649,7 @@ public class Range { // TODO -instantiab
 	public Table insertBefore(TableProperties props, int rows) {
 		ParagraphProperties parProps = new ParagraphProperties();
 		parProps.setFInTable((byte) 1);
-		parProps.setTableLevel((byte) 1);
+		parProps.setItap( 1 );
 
 		int columns = props.getItcMac();
 		for (int x = 0; x < rows; x++) {

Modified: poi/trunk/src/types/definitions/pap_type.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/types/definitions/pap_type.xml?rev=1142864&r1=1142863&r2=1142864&view=diff
==============================================================================
--- poi/trunk/src/types/definitions/pap_type.xml (original)
+++ poi/trunk/src/types/definitions/pap_type.xml Tue Jul  5 01:11:42 2011
@@ -96,9 +96,11 @@
         <field type="byte" size="1" name="fUsePgsuSettings"/>
         <field type="byte" size="1" name="fAdjustRight"/>
 
-        <!-- itap? -->
-        <!-- fInnerTableCell? -->
-        <!-- fOpenTch? -->
+        <field type="int" size="4" name="itap" description="Table nesting level"/>
+        <field type="byte" size="1" name="fInnerTableCell" description="When 1, the end
of paragraph mark is really an end of cell mark for a nested table cell"/>
+        <field type="byte" size="1" name="fOpenTch" description="Ensure the Table Cell
char doesn't show up as zero height"/>
+        <!-- not part of properties structure, but used anyway. See sprmPFInnerTtp doc.
-->
+        <field type="byte" size="1" name="fTtpEmbedded" description="Word 97 compatibility
indicates this end of paragraph mark is really an end of row marker for a nested table."/>
         
         <field type="short" size="2" name="dxcRight" description="Right indent in character
units"/>
         <field type="short" size="2" name="dxcLeft" description="Left indent in character
units"/>
@@ -134,10 +136,5 @@
         <field type="byte[]" size="128" name="rgtbd"/>
         <field type="byte[]" size="128" name="numrm"/>
         <field type="byte[]" size="4" name="ptap"/>
-
-        <!-- Unknown old fields -->
-        <field type="byte" size="1" name="tableLevel"/>
-        <field type="byte" size="1" name="fTtpEmbedded"/>
-        <field type="byte" size="1" name="embeddedCellMark"/>
     </fields>
 </record>



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


Mime
View raw message