[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-dev
Subject:    cvs commit: jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf HWPFDocument.java
From:       sackley () apache ! org
Date:       2004-04-19 23:48:01
Message-ID: 20040419234801.95034.qmail () minotaur ! apache ! org
[Download RAW message or body]

sackley     2004/04/19 16:48:01

  Modified:    src/scratchpad/src/org/apache/poi/hwpf HWPFDocument.java
  Log:
  <No Comment Entered>
  
  Revision  Changes    Path
  1.13      +22 -3     jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
  
  Index: HWPFDocument.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- HWPFDocument.java	8 Apr 2004 11:51:10 -0000	1.12
  +++ HWPFDocument.java	19 Apr 2004 23:48:01 -0000	1.13
  @@ -89,6 +89,11 @@
     /** Hold list tables */
     protected ListTables _lt;
   
  +  protected HWPFDocument()
  +  {
  +
  +  }
  +
     /**
      * This constructor loads a Word document from an InputStream.
      *
  @@ -181,11 +186,21 @@
       return _ss;
     }
   
  +  public FileInformationBlock getFileInformationBlock()
  +  {
  +    return _fib;
  +  }
  +
  +  public DocumentProperties getDocProperties()
  +  {
  +    return _dop;
  +  }
  +
     public Range getRange()
     {
       // hack to get the ending cp of the document, Have to revisit this.
  -    java.util.List paragraphs = _pbt.getParagraphs();
  -    PAPX p = (PAPX)paragraphs.get(paragraphs.size() - 1);
  +    java.util.List text = _tpt.getTextPieces();
  +    PropertyNode p = (PropertyNode)text.get(text.size() - 1);
   
       return new Range(0, p.getEnd(), this);
     }
  @@ -226,7 +241,7 @@
       HWPFFileSystem docSys = new HWPFFileSystem();
       HWPFOutputStream mainStream = docSys.getStream("WordDocument");
       HWPFOutputStream tableStream = docSys.getStream("1Table");
  -    HWPFOutputStream dataStream = docSys.getStream("Data");
  +    //HWPFOutputStream dataStream = docSys.getStream("Data");
       int tableOffset = 0;
   
       // FileInformationBlock fib = (FileInformationBlock)_fib.clone();
  @@ -332,6 +347,10 @@
       }
   
       byte[] dataBuf = _dataStream;
  +    if (dataBuf == null)
  +    {
  +      dataBuf = new byte[4096];
  +    }
       if (dataBuf.length < 4096)
       {
         byte[] tempBuf = new byte[4096];
  
  
  

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic