Example #1
0
        public void SetInsideVBorder(XWPFTable.XWPFBorderType type, int size, int space, string rgbColor)
        {
            CT_TblPr      trPr         = this.GetTrPr();
            CT_TblBorders ctTblBorders = trPr.IsSetTblBorders() ? trPr.tblBorders : trPr.AddNewTblBorders();
            CT_Border     ctBorder     = ctTblBorders.IsSetInsideV() ? ctTblBorders.insideV : ctTblBorders.AddNewInsideV();

            ctBorder.val   = XWPFTable.xwpfBorderTypeMap[type];
            ctBorder.sz    = (ulong)size;
            ctBorder.space = (ulong)space;
            ctBorder.color = rgbColor;
        }
Example #2
0
        public void SetInsideVBorder(XWPFBorderType type, int size, int space, String rgbColor)
        {
            CT_TblPr      tblPr = GetTrPr();
            CT_TblBorders ctb   = tblPr.IsSetTblBorders() ? tblPr.tblBorders : tblPr.AddNewTblBorders();
            CT_Border     b     = ctb.IsSetInsideV() ? ctb.insideV : ctb.AddNewInsideV();

            b.val   = (xwpfBorderTypeMap[type]);
            b.sz    = (ulong)size;
            b.space = (ulong)space;
            b.color = (rgbColor);
        }
Example #3
0
        public void SetRightBorder(XWPFBorderType type, int size, int space, String rgbColor)
        {
            CT_TblPr      tblPr = GetTrPr();
            CT_TblBorders ctb   = tblPr.IsSetTblBorders() ? tblPr.tblBorders : tblPr.AddNewTblBorders();
            CT_Border     b     = ctb.right != null ? ctb.right : ctb.AddNewRight();

            b.val   = xwpfBorderTypeMap[type];
            b.sz    = (ulong)size;
            b.space = (ulong)space;
            b.color = (rgbColor);
        }
Example #4
0
        public string GetInsideVBorderColor()
        {
            string   str  = (string)null;
            CT_TblPr trPr = this.GetTrPr();

            if (trPr.IsSetTblBorders())
            {
                CT_TblBorders tblBorders = trPr.tblBorders;
                if (tblBorders.IsSetInsideV())
                {
                    str = tblBorders.insideV.color;
                }
            }
            return(str);
        }
Example #5
0
        public int GetInsideVBorderSpace()
        {
            int      num  = -1;
            CT_TblPr trPr = this.GetTrPr();

            if (trPr.IsSetTblBorders())
            {
                CT_TblBorders tblBorders = trPr.tblBorders;
                if (tblBorders.IsSetInsideV())
                {
                    num = (int)tblBorders.insideV.space;
                }
            }
            return(num);
        }
Example #6
0
        public int GetInsideHBorderSize()
        {
            int      num  = -1;
            CT_TblPr trPr = this.GetTrPr();

            if (trPr.IsSetTblBorders())
            {
                CT_TblBorders tblBorders = trPr.tblBorders;
                if (tblBorders.IsSetInsideH())
                {
                    num = (int)tblBorders.insideH.sz;
                }
            }
            return(num);
        }
Example #7
0
        public XWPFTable.XWPFBorderType GetInsideVBorderType()
        {
            XWPFTable.XWPFBorderType xwpfBorderType = XWPFTable.XWPFBorderType.NONE;
            CT_TblPr trPr = this.GetTrPr();

            if (trPr.IsSetTblBorders())
            {
                CT_TblBorders tblBorders = trPr.tblBorders;
                if (tblBorders.IsSetInsideV())
                {
                    CT_Border insideV = tblBorders.insideV;
                    xwpfBorderType = XWPFTable.stBorderTypeMap[insideV.val];
                }
            }
            return(xwpfBorderType);
        }
Example #8
0
        public String GetInsideVBorderColor()
        {
            String color = null;

            CT_TblPr tblPr = GetTrPr();

            if (tblPr.IsSetTblBorders())
            {
                CT_TblBorders ctb = tblPr.tblBorders;
                if (ctb.IsSetInsideV())
                {
                    CT_Border border = ctb.insideV;
                    color = border.color;
                }
            }
            return(color);
        }
Example #9
0
        public int GetInsideVBorderSpace()
        {
            int space = -1;

            CT_TblPr tblPr = GetTrPr();

            if (tblPr.IsSetTblBorders())
            {
                CT_TblBorders ctb = tblPr.tblBorders;
                if (ctb.IsSetInsideV())
                {
                    CT_Border border = ctb.insideV;
                    space = (int)border.space;
                }
            }
            return(space);
        }
Example #10
0
        public XWPFBorderType GetInsideVBorderType()
        {
            XWPFBorderType bt = XWPFBorderType.NONE;

            CT_TblPr tblPr = GetTrPr();

            if (tblPr.IsSetTblBorders())
            {
                CT_TblBorders ctb = tblPr.tblBorders;
                if (ctb.IsSetInsideV())
                {
                    CT_Border border = ctb.insideV;
                    bt = stBorderTypeMap[border.val];
                }
            }
            return(bt);
        }
Example #11
0
        public int GetInsideHBorderSize()
        {
            int size = -1;

            CT_TblPr tblPr = GetTrPr();

            if (tblPr.IsSetTblBorders())
            {
                CT_TblBorders ctb = tblPr.tblBorders;
                if (ctb.IsSetInsideH())
                {
                    CT_Border border = ctb.insideH;
                    size = (int)border.sz;
                }
            }
            return(size);
        }