Package org.apache.poi.hwpf.model

Examples of org.apache.poi.hwpf.model.CPSplitCalculator


    // adjustForInsert() or it would get updated multiple times if the range
    // has a parent)
    // without this, OpenOffice.org (v. 2.2.x) does not see all the text in
    // the document

    CPSplitCalculator cpS = ((HWPFDocument)_doc).getCPSplitCalculator();
    FileInformationBlock fib = _doc.getFileInformationBlock();

    // Do for each affected part
    if (_start < cpS.getMainDocumentEnd()) {
      fib.setCcpText(fib.getCcpText() + adjustment);
    }

    if (_start < cpS.getCommentsEnd()) {
      fib.setCcpAtn(fib.getCcpAtn() + adjustment);
    }
    if (_start < cpS.getEndNoteEnd()) {
      fib.setCcpEdn(fib.getCcpEdn() + adjustment);
    }
    if (_start < cpS.getFootnoteEnd()) {
      fib.setCcpFtn(fib.getCcpFtn() + adjustment);
    }
    if (_start < cpS.getHeaderStoryEnd()) {
      fib.setCcpHdd(fib.getCcpHdd() + adjustment);
    }
    if (_start < cpS.getHeaderTextboxEnd()) {
      fib.setCcpHdrTxtBx(fib.getCcpHdrTxtBx() + adjustment);
    }
    if (_start < cpS.getMainTextboxEnd()) {
      fib.setCcpTxtBx(fib.getCcpTxtBx() + adjustment);
    }
  }
View Full Code Here


    // Load the main stream and FIB
    // Also handles HPSF bits
    super(directory);

    // Do the CP Split
    _cpSplit = new CPSplitCalculator(_fib);
   
    // Is this document too old for us?
    if(_fib.getNFib() < 106) {
        throw new OldWordFileFormatException("The document is too old - Word 95 or older. Try HWPFOldDocument instead?");
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.hwpf.model.CPSplitCalculator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.