View | Details | Raw Unified | Return to bug 56799
Collapse All | Expand All

(-)src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java (+12 lines)
Lines 29-34 Link Here
29
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl;
29
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl;
30
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders;
30
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders;
31
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar;
31
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar;
32
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblGrid;
32
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc;
33
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc;
33
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
34
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
34
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STBorder;
35
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STBorder;
Lines 64-70 Link Here
64
        assertNotNull(ctTable.getTrArray(0).getTcArray(0).getPArray(0));
65
        assertNotNull(ctTable.getTrArray(0).getTcArray(0).getPArray(0));
65
    }
66
    }
66
67
68
    public void testTblGrid() {
69
        XWPFDocument doc = new XWPFDocument();
70
        CTTbl ctTable = CTTbl.Factory.newInstance();
71
        CTTblGrid cttblgrid = ctTable.addNewTblGrid();
72
        cttblgrid.addNewGridCol().setW(new BigInteger("123"));
73
        cttblgrid.addNewGridCol().setW(new BigInteger("321"));
67
74
75
        XWPFTable xtab = new XWPFTable(ctTable, doc);
76
        assertEquals(123, xtab.getCTTbl().getTblGrid().getGridColArray(0).getW().intValue());
77
        assertEquals(321, xtab.getCTTbl().getTblGrid().getGridColArray(1).getW().intValue());
78
    }
79
68
    public void testGetText() {
80
    public void testGetText() {
69
        XWPFDocument doc = new XWPFDocument();
81
        XWPFDocument doc = new XWPFDocument();
70
        CTTbl table = CTTbl.Factory.newInstance();
82
        CTTbl table = CTTbl.Factory.newInstance();

Return to bug 56799