public static void SetBorder(XmlElement XmlElement, BorderCode borderCode, String where) { if (XmlElement == null) throw new ArgumentException("XmlElement is null"); if (borderCode == null || borderCode.BorderType == 0) return; if (string.IsNullOrEmpty(where)) { XmlElement.SetAttribute("border-style", GetBorderType(borderCode)); XmlElement.SetAttribute("border-color", GetColor(borderCode.Color)); XmlElement.SetAttribute("border-width", GetBorderWidth(borderCode)); } else { XmlElement.SetAttribute("border-" + where + "-style", GetBorderType(borderCode)); XmlElement.SetAttribute("border-" + where + "-color", GetColor(borderCode.Color)); XmlElement.SetAttribute("border-" + where + "-width", GetBorderWidth(borderCode)); } }
public static void AddBorder(BorderCode borderCode, String where, StringBuilder style) { if (borderCode == null || borderCode.IsEmpty) return; if (string.IsNullOrEmpty(where)) { style.Append("border:"); } else { style.Append("border-"); style.Append(where); } style.Append(":"); if (borderCode.LineWidth < 8) style.Append("thin"); else style.Append(GetBorderWidth(borderCode)); style.Append(' '); style.Append(GetBorderType(borderCode)); style.Append(' '); style.Append(GetColor(borderCode.Color)); style.Append(';'); }
public SectionProperties() { field_20_brcTop = new BorderCode(); field_21_brcLeft = new BorderCode(); field_22_brcBottom = new BorderCode(); field_23_brcRight = new BorderCode(); field_26_dttmPropRMark = new DateAndTime(); }
int _ico24 = -1; // default to -1 so we can ignore it for word 97 files public CharacterProperties() { field_17_fcPic = -1; field_22_dttmRMark = new DateAndTime(); field_23_dttmRMarkDel = new DateAndTime(); field_36_dttmPropRMark = new DateAndTime(); field_40_dttmDispFldRMark = new DateAndTime(); field_41_xstDispFldRMark = new byte[36]; field_42_shd = new ShadingDescriptor(); field_43_brc = new BorderCode(); field_7_hps = 20; field_24_istd = 10; field_16_wCharScale = 100; field_13_lidDefault = 0x0400; field_14_lidFE = 0x0400; }
public TableProperties(int columns) { field_7_itcMac = (short)columns; field_10_rgshd = new ShadingDescriptor[columns]; for (int x = 0; x < columns; x++) { field_10_rgshd[x] = new ShadingDescriptor(); } field_11_brcBottom = new BorderCode(); field_12_brcTop = new BorderCode(); field_13_brcLeft = new BorderCode(); field_14_brcRight = new BorderCode(); field_15_brcVertical = new BorderCode(); field_16_brcHorizontal = new BorderCode(); field_8_rgdxaCenter = new short[columns]; field_9_rgtc = new TableCellDescriptor[columns]; for (int x = 0; x < columns; x++) { field_9_rgtc[x] = new TableCellDescriptor(); } }
public void SetRightBorder(BorderCode right) { base.SetBrcRight(right); }
public void SetBottomBorder(BorderCode bottom) { base.SetBrcBottom(bottom); }
public void SetBarBorder(BorderCode bar) { _props.SetBrcBar(bar); _papx.UpdateSprm(SPRM_BRCBAR, bar.ToInt()); }
public void SetBottomBorder(BorderCode bottom) { _props.SetBrcBottom(bottom); _papx.UpdateSprm(SPRM_BRCBOTTOM, bottom.ToInt()); }
/** * Set the brcBar field for the PAP record. */ public void SetBrcBar(BorderCode field_66_brcBar) { this.field_66_brcBar = field_66_brcBar; }
/** * Set the brcHorizontal field for the TAP record. */ public void SetBrcHorizontal(BorderCode field_16_brcHorizontal) { this.field_16_brcHorizontal = field_16_brcHorizontal; }
public void SetTopBorder(BorderCode top) { base.SetBrcTop(top); }
public void SetLeftBorder(BorderCode left) { base.SetBrcLeft(left); }
public void SetBarBorder(BorderCode bar) { base.SetBrcBar(bar); }
/** * Set the brc field for the CHP record. */ public void SetBrc(BorderCode field_43_brc) { this.field_43_brc = field_43_brc; }
public void SetLeftBorder(BorderCode left) { _props.SetBrcLeft(left); _papx.UpdateSprm(SPRM_BRCLEFT, left.ToInt()); }
public static String GetBorderType(BorderCode borderCode) { if (borderCode == null) throw new ArgumentNullException("borderCode is null"); switch (borderCode.BorderType) { case 1: case 2: return "solid"; case 3: return "double"; case 5: return "solid"; case 6: return "dotted"; case 7: case 8: return "dashed"; case 9: return "dotted"; case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: return "double"; case 20: return "solid"; case 21: return "double"; case 22: return "dashed"; case 23: return "dashed"; case 24: return "ridge"; case 25: return "grooved"; default: return "solid"; } }
/** * Set the brcVertical field for the TAP record. */ public void SetBrcVertical(BorderCode field_15_brcVertical) { this.field_15_brcVertical = field_15_brcVertical; }
public static String GetBorderWidth(BorderCode borderCode) { int lineWidth = borderCode.LineWidth; int pt = lineWidth / 8; int pte = lineWidth - pt * 8; StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(pt); stringBuilder.Append("."); stringBuilder.Append(1000 / 8 * pte); stringBuilder.Append("pt"); return stringBuilder.ToString(); }
/** * Set the brcBetween field for the PAP record. */ public void SetBrcBetween(BorderCode field_65_brcBetween) { this.field_65_brcBetween = field_65_brcBetween; }
/** * Set the brcLeft field for the TC record. */ public void SetBrcLeft(BorderCode field_20_brcLeft) { this.field_20_brcLeft = field_20_brcLeft; }
protected PAPAbstractType() { this.field_11_lspd = new LineSpacingDescriptor(); this.field_11_lspd = new LineSpacingDescriptor(); this.field_28_dcs = new DropCapSpecifier(); this.field_32_fWidowControl = true; this.field_41_lvl = 9; this.field_61_brcTop = new BorderCode(); this.field_62_brcLeft = new BorderCode(); this.field_63_brcBottom = new BorderCode(); this.field_64_brcRight = new BorderCode(); this.field_65_brcBetween = new BorderCode(); this.field_66_brcBar = new BorderCode(); this.field_67_shd = new ShadingDescriptor(); this.field_68_anld = new byte[0]; this.field_69_phe = new byte[0]; this.field_72_dttmPropRMark = new DateAndTime(); this.field_74_rgdxaTab = new int[0]; this.field_75_rgtbd = new byte[0]; this.field_76_numrm = new byte[0]; this.field_77_ptap = new byte[0]; }
/** * Set the brcRight field for the TC record. */ public void SetBrcRight(BorderCode field_22_brcRight) { this.field_22_brcRight = field_22_brcRight; }
public override bool Equals(Object o) { BorderCode brc = (BorderCode)o; return(_info == brc._info && _info2 == brc._info2); }
public void SetRightBorder(BorderCode right) { _props.SetBrcRight(right); _papx.UpdateSprm(SPRM_BRCRIGHT, right.ToInt()); }
/** * Set the brcTop field for the TC record. */ public void SetBrcTop(BorderCode field_19_brcTop) { this.field_19_brcTop = field_19_brcTop; }
public void SetTopBorder(BorderCode top) { _props.SetBrcTop(top); _papx.UpdateSprm(SPRM_BRCTOP, top.ToInt()); }
/** * Set the brcBottom field for the TC record. */ public void SetBrcBottom(BorderCode field_21_brcBottom) { this.field_21_brcBottom = field_21_brcBottom; }