summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2011-05-03 05:56:22 +0000
committerNick Burch <nick@apache.org>2011-05-03 05:56:22 +0000
commitbae166f687aae81044f5b4f81d0222d2937cb33d (patch)
treebef1edaeb74cf846962efb8798ef8ac922cd570b
parent3454360494ce88d0acc0adda6aded3479d0670be (diff)
downloadpoi-bae166f687aae81044f5b4f81d0222d2937cb33d.tar.gz
poi-bae166f687aae81044f5b4f81d0222d2937cb33d.zip
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
-rw-r--r--src/documentation/content/xdocs/status.xml1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java1
-rw-r--r--src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml
index ceff12e6ab..7b1b3bbfd4 100644
--- a/src/documentation/content/xdocs/status.xml
+++ b/src/documentation/content/xdocs/status.xml
@@ -34,6 +34,7 @@
<changes>
<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">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>
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
index 926260e26a..ec981cad36 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
@@ -159,6 +159,7 @@ public class XWPFTable implements IBodyElement{
.sizeOfTcArray() : 0;
XWPFTableRow tabRow = new XWPFTableRow(ctTbl.addNewTr(), this);
addColumn(tabRow, sizeCol);
+ tableRows.add(tabRow);
return tabRow;
}
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java
index 91f43f4dff..6d9a0e93b3 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java
@@ -94,6 +94,7 @@ public class TestXWPFTable extends TestCase {
//add a new row
xtab.createRow();
+ assertEquals(4, xtab.getNumberOfRows());
//check number of cols
assertEquals(2, table.getTrArray(0).sizeOfTcArray());