/** * @param width */ public void SetWidth(int width) { CT_TblPr tblPr = GetTrPr(); CT_TblWidth tblWidth = tblPr.IsSetTblW() ? tblPr.tblW : tblPr .AddNewTblW(); tblWidth.w = width.ToString(); }
public int GetCellMarginRight() { int result = 0; CT_TblCellMar tblCellMar = this.GetTrPr().tblCellMar; if (tblCellMar != null) { CT_TblWidth right = tblCellMar.right; if (right != null) { int.TryParse(right.w, out result); } } return(result); }
public int GetCellMarginBottom() { int result = 0; CT_TblCellMar tblCellMar = this.GetTrPr().tblCellMar; if (tblCellMar != null) { CT_TblWidth bottom = tblCellMar.bottom; if (bottom != null) { int.TryParse(bottom.w, out result); } } return(result); }
public int GetCellMarginLeft() { int result = 0; CT_TblCellMar tblCellMar = this.GetTrPr().tblCellMar; if (tblCellMar != null) { CT_TblWidth left = tblCellMar.left; if (left != null) { int.TryParse(left.w, out result); } } return(result); }
public int GetCellMarginTop() { int result = 0; CT_TblCellMar tblCellMar = this.GetTrPr().tblCellMar; if (tblCellMar != null) { CT_TblWidth top = tblCellMar.top; if (top != null) { int.TryParse(top.w, out result); } } return(result); }
public int GetCellMarginRight() { int margin = 0; CT_TblPr tblPr = GetTrPr(); CT_TblCellMar tcm = tblPr.tblCellMar; if (tcm != null) { CT_TblWidth tw = tcm.right; if (tw != null) { int.TryParse(tw.w, out margin); } } return(margin); }
public void SetCellMargins(int top, int left, int bottom, int right) { CT_TblPr trPr = this.GetTrPr(); CT_TblCellMar ctTblCellMar = trPr.IsSetTblCellMar() ? trPr.tblCellMar : trPr.AddNewTblCellMar(); CT_TblWidth ctTblWidth1 = ctTblCellMar.IsSetLeft() ? ctTblCellMar.left : ctTblCellMar.AddNewLeft(); ctTblWidth1.type = ST_TblWidth.dxa; ctTblWidth1.w = left.ToString(); CT_TblWidth ctTblWidth2 = ctTblCellMar.IsSetTop() ? ctTblCellMar.top : ctTblCellMar.AddNewTop(); ctTblWidth2.type = ST_TblWidth.dxa; ctTblWidth2.w = top.ToString(); CT_TblWidth ctTblWidth3 = ctTblCellMar.IsSetBottom() ? ctTblCellMar.bottom : ctTblCellMar.AddNewBottom(); ctTblWidth3.type = ST_TblWidth.dxa; ctTblWidth3.w = bottom.ToString(); CT_TblWidth ctTblWidth4 = ctTblCellMar.IsSetRight() ? ctTblCellMar.right : ctTblCellMar.AddNewRight(); ctTblWidth4.type = ST_TblWidth.dxa; ctTblWidth4.w = right.ToString(); }
public void SetCellMargins(int top, int left, int bottom, int right) { CT_TblPr tblPr = GetTrPr(); CT_TblCellMar tcm = tblPr.IsSetTblCellMar() ? tblPr.tblCellMar : tblPr.AddNewTblCellMar(); CT_TblWidth tw = tcm.IsSetLeft() ? tcm.left : tcm.AddNewLeft(); tw.type = (ST_TblWidth.dxa); tw.w = left.ToString(); tw = tcm.IsSetTop() ? tcm.top : tcm.AddNewTop(); tw.type = (ST_TblWidth.dxa); tw.w = top.ToString(); tw = tcm.IsSetBottom() ? tcm.bottom : tcm.AddNewBottom(); tw.type = (ST_TblWidth.dxa); tw.w = bottom.ToString(); tw = tcm.IsSetRight() ? tcm.right : tcm.AddNewRight(); tw.type = (ST_TblWidth.dxa); tw.w = right.ToString(); }