sackley     2004/07/10 21:38:32

  Modified:    src/scratchpad/src/org/apache/poi/hwpf/usermodel Range.java
                        Section.java Table.java
  Log:
  fixes for article
  
  Revision  Changes    Path
  1.10      +1 -1      
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
  
  Index: Range.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Range.java        19 Apr 2004 23:48:04 -0000      1.9
  +++ Range.java        11 Jul 2004 04:38:32 -0000      1.10
  @@ -336,7 +336,7 @@
   
       int insertIndex = _end - tp.getStart();
   
  -    if (tp.getStringBuffer().charAt(_end - 1) == '\r')
  +    if (tp.getStringBuffer().charAt(_end - 1) == '\r' && text.charAt(0) != '\u0007')
       {
         insertIndex--;
       }
  
  
  
  1.6       +6 -1      
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java
  
  Index: Section.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Section.java      9 Apr 2004 13:05:33 -0000       1.5
  +++ Section.java      11 Jul 2004 04:38:32 -0000      1.6
  @@ -14,7 +14,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
   ==================================================================== */
  -        
  +
   
   package org.apache.poi.hwpf.usermodel;
   
  @@ -35,6 +35,11 @@
     public int type()
     {
       return TYPE_SECTION;
  +  }
  +
  +  public int getNumColumns()
  +  {
  +    return _props.getCcolM1() + 1;
     }
   
     public Object clone()
  
  
  
  1.4       +2 -2      
jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Table.java
  
  Index: Table.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Table.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Table.java        9 Apr 2004 13:05:33 -0000       1.3
  +++ Table.java        11 Jul 2004 04:38:32 -0000      1.4
  @@ -14,7 +14,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
   ==================================================================== */
  -        
  +
   package org.apache.poi.hwpf.usermodel;
   
   import java.util.ArrayList;
  @@ -36,12 +36,12 @@
       while (rowEnd < numParagraphs)
       {
         Paragraph p = getParagraph(rowEnd);
  -      rowEnd++;
         if (p.isTableRowEnd() && p.getTableLevel() == levelNum)
         {
           _rows.add(new TableRow(rowStart, rowEnd, this, levelNum));
           rowStart = rowEnd;
         }
  +      rowEnd++;
       }
     }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to