You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by sa...@apache.org on 2004/04/06 06:44:01 UTC

cvs commit: jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model CHPBinTable.java ComplexFileTable.java ListFormatOverrideLevel.java ListTables.java PAPBinTable.java SectionTable.java TextPieceTable.java

sackley     2004/04/05 21:44:01

  Modified:    src/scratchpad/src/org/apache/poi/hwpf/model
                        CHPBinTable.java ComplexFileTable.java
                        ListFormatOverrideLevel.java ListTables.java
                        PAPBinTable.java SectionTable.java
                        TextPieceTable.java
  Log:
  latest patches and changes
  
  Revision  Changes    Path
  1.2       +19 -54    jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java
  
  Index: CHPBinTable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CHPBinTable.java	2 Mar 2004 06:22:01 -0000	1.1
  +++ CHPBinTable.java	6 Apr 2004 04:44:01 -0000	1.2
  @@ -1,58 +1,18 @@
  -/*
  - *  ====================================================================
  - *  The Apache Software License, Version 1.1
  - *
  - *  Copyright (c) 2003 The Apache Software Foundation.  All rights
  - *  reserved.
  - *
  - *  Redistribution and use in source and binary forms, with or without
  - *  modification, are permitted provided that the following conditions
  - *  are met:
  - *
  - *  1. Redistributions of source code must retain the above copyright
  - *  notice, this list of conditions and the following disclaimer.
  - *
  - *  2. Redistributions in binary form must reproduce the above copyright
  - *  notice, this list of conditions and the following disclaimer in
  - *  the documentation and/or other materials provided with the
  - *  distribution.
  - *
  - *  3. The end-user documentation included with the redistribution,
  - *  if any, must include the following acknowledgment:
  - *  "This product includes software developed by the
  - *  Apache Software Foundation (http://www.apache.org/)."
  - *  Alternately, this acknowledgment may appear in the software itself,
  - *  if and wherever such third-party acknowledgments normally appear.
  - *
  - *  4. The names "Apache" and "Apache Software Foundation" and
  - *  "Apache POI" must not be used to endorse or promote products
  - *  derived from this software without prior written permission. For
  - *  written permission, please contact apache@apache.org.
  - *
  - *  5. Products derived from this software may not be called "Apache",
  - *  "Apache POI", nor may "Apache" appear in their name, without
  - *  prior written permission of the Apache Software Foundation.
  - *
  - *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - *  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - *  DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - *  ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - *  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - *  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - *  SUCH DAMAGE.
  - *  ====================================================================
  - *
  - *  This software consists of voluntary contributions made by many
  - *  individuals on behalf of the Apache Software Foundation.  For more
  - *  information on the Apache Software Foundation, please see
  - *  <http://www.apache.org/>.
  - */
  +/* ====================================================================
  +   Copyright 2002-2004   Apache Software Foundation
  +
  +   Licensed under the Apache License, Version 2.0 (the "License");
  +   you may not use this file except in compliance with the License.
  +   You may obtain a copy of the License at
   
  +       http://www.apache.org/licenses/LICENSE-2.0
  +
  +   Unless required by applicable law or agreed to in writing, software
  +   distributed under the License is distributed on an "AS IS" BASIS,
  +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +   See the License for the specific language governing permissions and
  +   limitations under the License.
  +==================================================================== */
   
   package org.apache.poi.hwpf.model;
   
  @@ -75,6 +35,11 @@
   {
     /** List of character properties.*/
     ArrayList _textRuns = new ArrayList();
  +
  +
  +  public CHPBinTable()
  +  {
  +  }
   
     /**
      * Constructor used to read a binTable in from a Word document.
  
  
  
  1.2       +5 -1      jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java
  
  Index: ComplexFileTable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ComplexFileTable.java	2 Mar 2004 06:22:01 -0000	1.1
  +++ ComplexFileTable.java	6 Apr 2004 04:44:01 -0000	1.2
  @@ -69,6 +69,11 @@
   
     TextPieceTable _tpt;
   
  +  public ComplexFileTable()
  +  {
  +    _tpt = new TextPieceTable();
  +  }
  +
     public ComplexFileTable(byte[] documentStream, byte[] tableStream, int offset, int fcMin) throws IOException
     {
       //skips through the prms before we reach the piece table. These contain data
  @@ -110,7 +115,6 @@
       LittleEndian.putInt(numHolder, table.length);
       tableStream.write(numHolder);
       tableStream.write(table);
  -
     }
   
   }
  
  
  
  1.2       +0 -4      jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverrideLevel.java
  
  Index: ListFormatOverrideLevel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverrideLevel.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ListFormatOverrideLevel.java	2 Mar 2004 06:22:01 -0000	1.1
  +++ ListFormatOverrideLevel.java	6 Apr 2004 04:44:01 -0000	1.2
  @@ -73,10 +73,6 @@
   
     public ListFormatOverrideLevel(byte[] buf, int offset)
     {
  -    while(buf[offset] == -1)
  -    {
  -      offset++;
  -    }
       _iStartAt = LittleEndian.getInt(buf, offset);
       offset += LittleEndian.INT_SIZE;
       _info = buf[offset++];
  
  
  
  1.2       +4 -0      jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java
  
  Index: ListTables.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ListTables.java	2 Mar 2004 06:22:01 -0000	1.1
  +++ ListTables.java	6 Apr 2004 04:44:01 -0000	1.2
  @@ -112,6 +112,10 @@
         int num = lfo.numOverrides();
         for (int y = 0; y < num; y++)
         {
  +        while(tableStream[lfolvlOffset] == -1)
  +        {
  +          lfolvlOffset++;
  +        }
           ListFormatOverrideLevel lfolvl = new ListFormatOverrideLevel(tableStream, lfolvlOffset);
           lfo.setOverride(y, lfolvl);
           lfolvlOffset += lfolvl.getSizeInBytes();
  
  
  
  1.4       +21 -54    jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java
  
  Index: PAPBinTable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PAPBinTable.java	12 Mar 2004 12:34:32 -0000	1.3
  +++ PAPBinTable.java	6 Apr 2004 04:44:01 -0000	1.4
  @@ -1,57 +1,18 @@
  -/*
  - *  ====================================================================
  - *  The Apache Software License, Version 1.1
  - *
  - *  Copyright (c) 2003 The Apache Software Foundation.  All rights
  - *  reserved.
  - *
  - *  Redistribution and use in source and binary forms, with or without
  - *  modification, are permitted provided that the following conditions
  - *  are met:
  - *
  - *  1. Redistributions of source code must retain the above copyright
  - *  notice, this list of conditions and the following disclaimer.
  - *
  - *  2. Redistributions in binary form must reproduce the above copyright
  - *  notice, this list of conditions and the following disclaimer in
  - *  the documentation and/or other materials provided with the
  - *  distribution.
  - *
  - *  3. The end-user documentation included with the redistribution,
  - *  if any, must include the following acknowledgment:
  - *  "This product includes software developed by the
  - *  Apache Software Foundation (http://www.apache.org/)."
  - *  Alternately, this acknowledgment may appear in the software itself,
  - *  if and wherever such third-party acknowledgments normally appear.
  - *
  - *  4. The names "Apache" and "Apache Software Foundation" and
  - *  "Apache POI" must not be used to endorse or promote products
  - *  derived from this software without prior written permission. For
  - *  written permission, please contact apache@apache.org.
  - *
  - *  5. Products derived from this software may not be called "Apache",
  - *  "Apache POI", nor may "Apache" appear in their name, without
  - *  prior written permission of the Apache Software Foundation.
  - *
  - *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - *  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - *  DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - *  ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - *  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - *  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - *  SUCH DAMAGE.
  - *  ====================================================================
  - *
  - *  This software consists of voluntary contributions made by many
  - *  individuals on behalf of the Apache Software Foundation.  For more
  - *  information on the Apache Software Foundation, please see
  - *  <http://www.apache.org/>.
  - */
  +/* ====================================================================
  +   Copyright 2002-2004   Apache Software Foundation
  +
  +   Licensed under the Apache License, Version 2.0 (the "License");
  +   you may not use this file except in compliance with the License.
  +   You may obtain a copy of the License at
  +
  +       http://www.apache.org/licenses/LICENSE-2.0
  +
  +   Unless required by applicable law or agreed to in writing, software
  +   distributed under the License is distributed on an "AS IS" BASIS,
  +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +   See the License for the specific language governing permissions and
  +   limitations under the License.
  +==================================================================== */
   
   package org.apache.poi.hwpf.model;
   
  @@ -69,11 +30,17 @@
    * This class represents the bin table of Word document but it also serves as a
    * holder for all of the paragraphs of document that have been loaded into
    * memory.
  + *
  + * @author Ryan Ackley
    */
   public class PAPBinTable
   {
     ArrayList _paragraphs = new ArrayList();
     byte[] _dataStream;
  +
  +  public PAPBinTable()
  +  {
  +  }
   
     public PAPBinTable(byte[] documentStream, byte[] tableStream, byte[] dataStream, int offset,
                        int size, int fcMin)
  
  
  
  1.2       +21 -54    jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java
  
  Index: SectionTable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SectionTable.java	2 Mar 2004 06:22:01 -0000	1.1
  +++ SectionTable.java	6 Apr 2004 04:44:01 -0000	1.2
  @@ -1,58 +1,18 @@
  -/*
  - *  ====================================================================
  - *  The Apache Software License, Version 1.1
  - *
  - *  Copyright (c) 2003 The Apache Software Foundation.  All rights
  - *  reserved.
  - *
  - *  Redistribution and use in source and binary forms, with or without
  - *  modification, are permitted provided that the following conditions
  - *  are met:
  - *
  - *  1. Redistributions of source code must retain the above copyright
  - *  notice, this list of conditions and the following disclaimer.
  - *
  - *  2. Redistributions in binary form must reproduce the above copyright
  - *  notice, this list of conditions and the following disclaimer in
  - *  the documentation and/or other materials provided with the
  - *  distribution.
  - *
  - *  3. The end-user documentation included with the redistribution,
  - *  if any, must include the following acknowledgment:
  - *  "This product includes software developed by the
  - *  Apache Software Foundation (http://www.apache.org/)."
  - *  Alternately, this acknowledgment may appear in the software itself,
  - *  if and wherever such third-party acknowledgments normally appear.
  - *
  - *  4. The names "Apache" and "Apache Software Foundation" and
  - *  "Apache POI" must not be used to endorse or promote products
  - *  derived from this software without prior written permission. For
  - *  written permission, please contact apache@apache.org.
  - *
  - *  5. Products derived from this software may not be called "Apache",
  - *  "Apache POI", nor may "Apache" appear in their name, without
  - *  prior written permission of the Apache Software Foundation.
  - *
  - *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - *  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - *  DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - *  ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - *  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - *  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - *  SUCH DAMAGE.
  - *  ====================================================================
  - *
  - *  This software consists of voluntary contributions made by many
  - *  individuals on behalf of the Apache Software Foundation.  For more
  - *  information on the Apache Software Foundation, please see
  - *  <http://www.apache.org/>.
  - */
  +/* ====================================================================
  +   Copyright 2002-2004   Apache Software Foundation
   
  +   Licensed under the Apache License, Version 2.0 (the "License");
  +   you may not use this file except in compliance with the License.
  +   You may obtain a copy of the License at
  +
  +       http://www.apache.org/licenses/LICENSE-2.0
  +
  +   Unless required by applicable law or agreed to in writing, software
  +   distributed under the License is distributed on an "AS IS" BASIS,
  +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +   See the License for the specific language governing permissions and
  +   limitations under the License.
  +==================================================================== */
   
   package org.apache.poi.hwpf.model;
   
  @@ -63,11 +23,18 @@
   import org.apache.poi.util.LittleEndian;
   import org.apache.poi.hwpf.model.io.*;
   
  +/**
  + * @author Ryan Ackley
  + */
   public class SectionTable
   {
     private static final int SED_SIZE = 12;
   
     private ArrayList _sections = new ArrayList();
  +
  +  public SectionTable()
  +  {
  +  }
   
     public SectionTable(byte[] documentStream, byte[] tableStream, int offset,
                         int size, int fcMin)
  
  
  
  1.3       +22 -56    jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
  
  Index: TextPieceTable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TextPieceTable.java	23 Mar 2004 05:51:52 -0000	1.2
  +++ TextPieceTable.java	6 Apr 2004 04:44:01 -0000	1.3
  @@ -1,57 +1,18 @@
  -/*
  - *  ====================================================================
  - *  The Apache Software License, Version 1.1
  - *
  - *  Copyright (c) 2003 The Apache Software Foundation.  All rights
  - *  reserved.
  - *
  - *  Redistribution and use in source and binary forms, with or without
  - *  modification, are permitted provided that the following conditions
  - *  are met:
  - *
  - *  1. Redistributions of source code must retain the above copyright
  - *  notice, this list of conditions and the following disclaimer.
  - *
  - *  2. Redistributions in binary form must reproduce the above copyright
  - *  notice, this list of conditions and the following disclaimer in
  - *  the documentation and/or other materials provided with the
  - *  distribution.
  - *
  - *  3. The end-user documentation included with the redistribution,
  -  *  if any, must include the following acknowledgment:
  - *  "This product includes software developed by the
  - *  Apache Software Foundation (http://www.apache.org/)."
  - *  Alternately, this acknowledgment may appear in the software itself,
  - *  if and wherever such third-party acknowledgments normally appear.
  - *
  - *  4. The names "Apache" and "Apache Software Foundation" and
  - *  "Apache POI" must not be used to endorse or promote products
  - *  derived from this software without prior written permission. For
  - *  written permission, please contact apache@apache.org.
  - *
  - *  5. Products derived from this software may not be called "Apache",
  - *  "Apache POI", nor may "Apache" appear in their name, without
  - *  prior written permission of the Apache Software Foundation.
  - *
  - *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - *  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - *  DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - *  ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - *  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - *  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - *  SUCH DAMAGE.
  - *  ====================================================================
  - *
  - *  This software consists of voluntary contributions made by many
  - *  individuals on behalf of the Apache Software Foundation.  For more
  - *  information on the Apache Software Foundation, please see
  - *  <http://www.apache.org/>.
  - */
  +/* ====================================================================
  +   Copyright 2002-2004   Apache Software Foundation
  +
  +   Licensed under the Apache License, Version 2.0 (the "License");
  +   you may not use this file except in compliance with the License.
  +   You may obtain a copy of the License at
  +
  +       http://www.apache.org/licenses/LICENSE-2.0
  +
  +   Unless required by applicable law or agreed to in writing, software
  +   distributed under the License is distributed on an "AS IS" BASIS,
  +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +   See the License for the specific language governing permissions and
  +   limitations under the License.
  +==================================================================== */
   
   
   package org.apache.poi.hwpf.model;
  @@ -67,13 +28,19 @@
   
   import org.apache.poi.hwpf.model.io.*;
   
  -
  +/**
  + * @author Ryan Ackley
  + */
   public class TextPieceTable
   {
     ArrayList _textPieces = new ArrayList();
     //int _multiple;
     int _cpMin;
   
  +  public TextPieceTable()
  +  {
  +  }
  +
     public TextPieceTable(byte[] documentStream, byte[] tableStream, int offset,
                           int size, int fcMin)
       throws UnsupportedEncodingException
  @@ -236,5 +203,4 @@
       }
       return false;
     }
  -
   }
  
  
  

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