示例#1
0
        /**
         * Get a <b>copy</b> of the currently used CT_Border, if none is used, return a new instance.
         */
        private CT_Border GetCTBorder()
        {
            CT_Border ctBorder;
            if (_cellXf.applyBorder)
            {
                int idx = (int)_cellXf.borderId;
                XSSFCellBorder cf = _stylesSource.GetBorderAt(idx);

                ctBorder = (CT_Border)cf.GetCTBorder();
            }
            else
            {
                ctBorder = new CT_Border();
                ctBorder.AddNewLeft();
                ctBorder.AddNewRight();
                ctBorder.AddNewTop();
                ctBorder.AddNewBottom();
                ctBorder.AddNewDiagonal();
            }
            return ctBorder;
        }
示例#2
0
 private static CT_Border CreateDefaultBorder()
 {
     CT_Border ctBorder = new CT_Border();
     ctBorder.AddNewLeft();
     ctBorder.AddNewRight();
     ctBorder.AddNewTop();
     ctBorder.AddNewBottom();
     ctBorder.AddNewDiagonal();
     return ctBorder;
 }