Search in sources :

Example 6 with CTTrPr

use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTrPr in project poi by apache.

the class XWPFTableRow method setCantSplitRow.

/**
     * Controls whether to allow this table row to split across pages.
     * The logic for this attribute is a little unusual: a true value means
     * DON'T allow rows to split, false means allow rows to split.
     *
     * @param split - if true, don't allow row to be split. If false, allow
     *              row to be split.
     */
public void setCantSplitRow(boolean split) {
    CTTrPr trpr = getTrPr();
    CTOnOff onoff = (trpr.sizeOfCantSplitArray() > 0 ? trpr.getCantSplitArray(0) : trpr.addNewCantSplit());
    onoff.setVal(WMLHelper.convertBooleanToSTOnOff(split));
}
Also used : CTOnOff(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTOnOff) CTTrPr(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTrPr)

Example 7 with CTTrPr

use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTrPr in project poi by apache.

the class XWPFTableRow method getRepeat.

private boolean getRepeat() {
    boolean repeat = false;
    if (ctRow.isSetTrPr()) {
        CTTrPr trpr = getTrPr();
        if (trpr.sizeOfTblHeaderArray() > 0) {
            CTOnOff rpt = trpr.getTblHeaderArray(0);
            repeat = (rpt.isSetVal() ? WMLHelper.convertSTOnOffToBoolean(rpt.getVal()) : true);
        }
    }
    return repeat;
}
Also used : CTOnOff(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTOnOff) CTTrPr(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTrPr)

Aggregations

CTTrPr (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTrPr)7 CTOnOff (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTOnOff)4 CTHeight (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHeight)3 XWPFParagraph (org.apache.poi.xwpf.usermodel.XWPFParagraph)2 XWPFTable (org.apache.poi.xwpf.usermodel.XWPFTable)2 XWPFTableCell (org.apache.poi.xwpf.usermodel.XWPFTableCell)2 XWPFTableRow (org.apache.poi.xwpf.usermodel.XWPFTableRow)2 CTShd (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTShd)2 CTString (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTString)2 CTTblPr (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr)2 CTTcPr (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr)2 CTVerticalJc (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTVerticalJc)2 FileOutputStream (java.io.FileOutputStream)1 OutputStream (java.io.OutputStream)1 BigInteger (java.math.BigInteger)1 XWPFDocument (org.apache.poi.xwpf.usermodel.XWPFDocument)1 XWPFRun (org.apache.poi.xwpf.usermodel.XWPFRun)1 CTTbl (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl)1 CTTblWidth (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth)1