]> source.dussan.org Git - poi.git/commitdiff
Add lots more getters/setters for useful things to the FIB
authorNick Burch <nick@apache.org>
Sat, 9 Aug 2008 16:46:39 +0000 (16:46 +0000)
committerNick Burch <nick@apache.org>
Sat, 9 Aug 2008 16:46:39 +0000 (16:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@684293 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java

index ea9f1bc39bfea5957f3938ab7a413140e5cc1491..087a2d8633169a7b8ab1381e6691cecc06de086f 100644 (file)
@@ -75,9 +75,9 @@ public class FileInformationBlock extends FIBAbstractType
 
 
       _shortHandler = new FIBShortHandler(mainDocument);
-      _longHandler = new FIBLongHandler(mainDocument, _shortHandler.START + _shortHandler.sizeInBytes());
+      _longHandler = new FIBLongHandler(mainDocument, FIBShortHandler.START + _shortHandler.sizeInBytes());
       _fieldHandler = new FIBFieldHandler(mainDocument,
-                                          _shortHandler.START + _shortHandler.sizeInBytes() + _longHandler.sizeInBytes(),
+                                          FIBShortHandler.START + _shortHandler.sizeInBytes() + _longHandler.sizeInBytes(),
                                           tableStream, fieldSet, true);
     }
 
@@ -301,21 +301,116 @@ public class FileInformationBlock extends FIBAbstractType
       _fieldHandler.setFieldSize(FIBFieldHandler.PLFLFO, modifiedHigh);
     }
 
-    public void setCbMac(int cbMac)
-    {
-      _longHandler.setLong(FIBLongHandler.CBMAC, cbMac);
-    }
-
-       public int getCcpText()
-       {
-         return _longHandler.getLong(FIBLongHandler.CCPTEXT);
-       }
-
-       public void setCcpText(int ccpText)
-       {
-         _longHandler.setLong(FIBLongHandler.CCPTEXT, ccpText);
-       }
-
+    
+    /**
+     * How many bytes of the main stream contain real data.
+     */
+    public int getCbMac() {
+       return _longHandler.getLong(FIBLongHandler.CBMAC);
+    }
+    /**
+     * Updates the count of the number of bytes in the
+     * main stream which contain real data 
+     */
+    public void setCbMac(int cbMac) {
+       _longHandler.setLong(FIBLongHandler.CBMAC, cbMac);
+    }
+
+    /**
+     * The count of CPs in the main document
+     */
+    public int getCcpText() {
+       return _longHandler.getLong(FIBLongHandler.CCPTEXT);
+    }
+    /**
+     * Updates the count of CPs in the main document
+     */
+    public void setCcpText(int ccpText) {
+       _longHandler.setLong(FIBLongHandler.CCPTEXT, ccpText);
+    }
+
+    /**
+     * The count of CPs in the footnote subdocument
+     */
+    public int getCcpFtn() {
+       return _longHandler.getLong(FIBLongHandler.CCPFTN);
+    }
+    /**
+     * Updates the count of CPs in the footnote subdocument
+     */
+    public void setCcpFtn(int ccpFtn) {
+       _longHandler.setLong(FIBLongHandler.CCPFTN, ccpFtn);
+    }
+
+    /**
+     * The count of CPs in the header story subdocument
+     */
+    public int getCcpHdd() {
+       return _longHandler.getLong(FIBLongHandler.CCPHDD);
+    }
+    /**
+     * Updates the count of CPs in the header story subdocument
+     */
+    public void setCcpHdd(int ccpHdd) {
+       _longHandler.setLong(FIBLongHandler.CCPHDD, ccpHdd);
+    }
+
+    /**
+     * The count of CPs in the comments (atn) subdocument
+     */
+    public int getCcpAtn() {
+       return _longHandler.getLong(FIBLongHandler.CCPATN);
+    }
+    public int getCcpCommentAtn() {
+       return getCcpAtn();
+    }
+    /**
+     * Updates the count of CPs in the comments (atn) story subdocument
+     */
+    public void setCcpAtn(int ccpAtn) {
+       _longHandler.setLong(FIBLongHandler.CCPATN, ccpAtn);
+    }
+
+    /**
+     * The count of CPs in the end note subdocument
+     */
+    public int getCcpEdn() {
+       return _longHandler.getLong(FIBLongHandler.CCPEDN);
+    }
+    /**
+     * Updates the count of CPs in the end note subdocument
+     */
+    public void setCcpEdn(int ccpEdn) {
+       _longHandler.setLong(FIBLongHandler.CCPEDN, ccpEdn);
+    }
+
+    /**
+     * The count of CPs in the main document textboxes
+     */
+    public int getCcpTxtBx() {
+       return _longHandler.getLong(FIBLongHandler.CCPTXBX);
+    }
+    /**
+     * Updates the count of CPs in the main document textboxes
+     */
+    public void setCcpTxtBx(int ccpTxtBx) {
+       _longHandler.setLong(FIBLongHandler.CCPTXBX, ccpTxtBx);
+    }
+
+    /**
+     * The count of CPs in the header textboxes
+     */
+    public int getCcpHdrTxtBx() {
+       return _longHandler.getLong(FIBLongHandler.CCPHDRTXBX);
+    }
+    /**
+     * Updates the count of CPs in the header textboxes
+     */
+    public void setCcpHdrTxtBx(int ccpTxtBx) {
+       _longHandler.setLong(FIBLongHandler.CCPHDRTXBX, ccpTxtBx);
+    }
+
+       
     public void clearOffsetsSizes()
     {
       _fieldHandler.clearFields();