Search in sources :

Example 11 with CTTblPr

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

the class XWPFTable method getInsideHBorderSize.

public int getInsideHBorderSize() {
    int size = -1;
    CTTblPr tblPr = getTrPr();
    if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideH()) {
            CTBorder border = ctb.getInsideH();
            size = border.getSz().intValue();
        }
    }
    return size;
}
Also used : CTTblBorders(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders) CTBorder(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder) CTTblPr(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr)

Example 12 with CTTblPr

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

the class XWPFTable method getCellMarginLeft.

public int getCellMarginLeft() {
    int margin = 0;
    CTTblPr tblPr = getTrPr();
    CTTblCellMar tcm = tblPr.getTblCellMar();
    if (tcm != null) {
        CTTblWidth tw = tcm.getLeft();
        if (tw != null) {
            margin = tw.getW().intValue();
        }
    }
    return margin;
}
Also used : CTTblWidth(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth) CTTblPr(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr) CTTblCellMar(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar)

Example 13 with CTTblPr

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

the class XWPFTable method getCellMarginBottom.

public int getCellMarginBottom() {
    int margin = 0;
    CTTblPr tblPr = getTrPr();
    CTTblCellMar tcm = tblPr.getTblCellMar();
    if (tcm != null) {
        CTTblWidth tw = tcm.getBottom();
        if (tw != null) {
            margin = tw.getW().intValue();
        }
    }
    return margin;
}
Also used : CTTblWidth(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth) CTTblPr(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr) CTTblCellMar(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar)

Example 14 with CTTblPr

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

the class XWPFTable method getInsideHBorderSpace.

public int getInsideHBorderSpace() {
    int space = -1;
    CTTblPr tblPr = getTrPr();
    if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideH()) {
            CTBorder border = ctb.getInsideH();
            space = border.getSpace().intValue();
        }
    }
    return space;
}
Also used : CTTblBorders(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders) CTBorder(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder) CTTblPr(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr)

Example 15 with CTTblPr

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

the class XWPFTable method getInsideHBorderColor.

public String getInsideHBorderColor() {
    String color = null;
    CTTblPr tblPr = getTrPr();
    if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideH()) {
            CTBorder border = ctb.getInsideH();
            color = border.xgetColor().getStringValue();
        }
    }
    return color;
}
Also used : CTTblBorders(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders) CTBorder(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder) CTTblPr(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr) CTString(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTString)

Aggregations

CTTblPr (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr)26 CTTblBorders (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders)11 CTBorder (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder)10 CTTblWidth (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth)7 CTString (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTString)6 CTTblCellMar (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar)5 CTDecimalNumber (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDecimalNumber)4 BigInteger (java.math.BigInteger)3 XWPFParagraph (org.apache.poi.xwpf.usermodel.XWPFParagraph)3 XWPFTable (org.apache.poi.xwpf.usermodel.XWPFTable)3 XWPFTableCell (org.apache.poi.xwpf.usermodel.XWPFTableCell)3 XWPFTableRow (org.apache.poi.xwpf.usermodel.XWPFTableRow)3 FileOutputStream (java.io.FileOutputStream)2 OutputStream (java.io.OutputStream)2 XWPFDocument (org.apache.poi.xwpf.usermodel.XWPFDocument)2 XWPFRun (org.apache.poi.xwpf.usermodel.XWPFRun)2 CTHeight (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHeight)2 CTShd (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTShd)2 CTTbl (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl)2 CTTcPr (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr)2