Fix bug #51112 - Correct XWPFTable tracking of new rows

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1098927 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2011-05-03 05:56:22 +00:00
parent 3454360494
commit bae166f687
3 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,7 @@
<changes> <changes>
<release version="3.8-beta3" date="2011-??-??"> <release version="3.8-beta3" date="2011-??-??">
<action dev="poi-developers" type="fix">51112 - Correct XWPFTable tracking of new rows</action>
<action dev="poi-developers" type="fix">51113 - Correct XWPFParagraph tracking of inserted runs</action> <action dev="poi-developers" type="fix">51113 - Correct XWPFParagraph tracking of inserted runs</action>
<action dev="poi-developers" type="fix">51111 - Correct XWPFParagraph tracking of new runs</action> <action dev="poi-developers" type="fix">51111 - Correct XWPFParagraph tracking of new runs</action>
<action dev="poi-developers" type="fix">51115 - Handle DataFormatter escaping of "." in the same way as "-" and "/"</action> <action dev="poi-developers" type="fix">51115 - Handle DataFormatter escaping of "." in the same way as "-" and "/"</action>

View File

@ -159,6 +159,7 @@ public class XWPFTable implements IBodyElement{
.sizeOfTcArray() : 0; .sizeOfTcArray() : 0;
XWPFTableRow tabRow = new XWPFTableRow(ctTbl.addNewTr(), this); XWPFTableRow tabRow = new XWPFTableRow(ctTbl.addNewTr(), this);
addColumn(tabRow, sizeCol); addColumn(tabRow, sizeCol);
tableRows.add(tabRow);
return tabRow; return tabRow;
} }

View File

@ -94,6 +94,7 @@ public class TestXWPFTable extends TestCase {
//add a new row //add a new row
xtab.createRow(); xtab.createRow();
assertEquals(4, xtab.getNumberOfRows());
//check number of cols //check number of cols
assertEquals(2, table.getTrArray(0).sizeOfTcArray()); assertEquals(2, table.getTrArray(0).sizeOfTcArray());