poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1664236 - /poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java
Date Thu, 05 Mar 2015 06:31:18 GMT
Author: nick
Date: Thu Mar  5 06:31:18 2015
New Revision: 1664236

URL: http://svn.apache.org/r1664236
Log:
Patch from tntim96 from bug #56799 - Include CTTblGrid in the smaller poi-ooxml-schemas jar

Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java?rev=1664236&r1=1664235&r2=1664236&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java Thu Mar
 5 06:31:18 2015
@@ -29,6 +29,7 @@ import org.openxmlformats.schemas.wordpr
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblGrid;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.STBorder;
@@ -64,6 +65,17 @@ public class TestXWPFTable extends TestC
         assertNotNull(ctTable.getTrArray(0).getTcArray(0).getPArray(0));
     }
 
+    public void testTblGrid() {
+        XWPFDocument doc = new XWPFDocument();
+        CTTbl ctTable = CTTbl.Factory.newInstance();
+        CTTblGrid cttblgrid = ctTable.addNewTblGrid();
+        cttblgrid.addNewGridCol().setW(new BigInteger("123"));
+        cttblgrid.addNewGridCol().setW(new BigInteger("321"));
+
+        XWPFTable xtab = new XWPFTable(ctTable, doc);
+        assertEquals(123, xtab.getCTTbl().getTblGrid().getGridColArray(0).getW().intValue());
+        assertEquals(321, xtab.getCTTbl().getTblGrid().getGridColArray(1).getW().intValue());
+    }
 
     public void testGetText() {
         XWPFDocument doc = new XWPFDocument();



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


Mime
View raw message