Return-Path: Delivered-To: apmail-poi-commits-archive@locus.apache.org Received: (qmail 11581 invoked from network); 9 Aug 2008 16:47:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Aug 2008 16:47:00 -0000 Received: (qmail 69120 invoked by uid 500); 9 Aug 2008 16:46:59 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 69079 invoked by uid 500); 9 Aug 2008 16:46:59 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 69070 invoked by uid 99); 9 Aug 2008 16:46:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Aug 2008 09:46:59 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Aug 2008 16:46:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 865FF23889BB; Sat, 9 Aug 2008 09:46:39 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r684293 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java Date: Sat, 09 Aug 2008 16:46:39 -0000 To: commits@poi.apache.org From: nick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080809164639.865FF23889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: nick Date: Sat Aug 9 09:46:39 2008 New Revision: 684293 URL: http://svn.apache.org/viewvc?rev=684293&view=rev Log: Add lots more getters/setters for useful things to the FIB Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java?rev=684293&r1=684292&r2=684293&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java Sat Aug 9 09:46:39 2008 @@ -75,9 +75,9 @@ _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 @@ _fieldHandler.setFieldSize(FIBFieldHandler.PLFLFO, modifiedHigh); } - public void setCbMac(int cbMac) - { - _longHandler.setLong(FIBLongHandler.CBMAC, cbMac); + + /** + * 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 int getCcpText() - { - return _longHandler.getLong(FIBLongHandler.CCPTEXT); - } - - public void setCcpText(int ccpText) - { - _longHandler.setLong(FIBLongHandler.CCPTEXT, ccpText); - } - + public void clearOffsetsSizes() { _fieldHandler.clearFields(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org