/// <summary> /// Creates a duplicate instance of this XF objet. /// </summary> /// <returns>A duplicate instance of this XF object.</returns> public object Clone() { XF clone = new XF(_doc); clone.Font = (Font)_font.Clone(); #if SILVERLIGHT clone.Format = new string(_format.ToCharArray()); #else clone.Format = (string)_format.Clone(); #endif if (!IsStyleXF) { clone.Style = (Style)_style.Clone(); } clone.HorizontalAlignment = HorizontalAlignment; clone.TextWrapRight = TextWrapRight; clone.VerticalAlignment = VerticalAlignment; clone.Rotation = Rotation; clone.IndentLevel = IndentLevel; clone.ShrinkToCell = ShrinkToCell; clone.TextDirection = TextDirection; clone.CellLocked = CellLocked; clone.FormulaHidden = FormulaHidden; clone.IsStyleXF = IsStyleXF; clone.UseNumber = UseNumber; clone.UseFont = UseFont; clone.UseMisc = UseMisc; clone.UseBorder = UseBorder; clone.UseBackground = UseBackground; clone.UseProtection = UseProtection; clone.LeftLineStyle = LeftLineStyle; clone.RightLineStyle = RightLineStyle; clone.TopLineStyle = TopLineStyle; clone.BottomLineStyle = BottomLineStyle; clone.LeftLineColor = LeftLineColor; clone.RightLineColor = RightLineColor; clone.DiagonalDescending = DiagonalDescending; clone.DiagonalAscending = DiagonalAscending; clone.TopLineColor = TopLineColor; clone.BottomLineColor = BottomLineColor; clone.DiagonalLineColor = DiagonalLineColor; clone.DiagonalLineStyle = DiagonalLineStyle; clone.Pattern = Pattern; clone.PatternColor = PatternColor; clone.PatternBackgroundColor = PatternBackgroundColor; clone.Target = Target; return(clone); }
// Token: 0x0600024F RID: 591 RVA: 0x0000AB70 File Offset: 0x00009B70 public ushort Add(Style style) { ushort?id = this.GetID(style); if (id == null) { if (this._styles == null) { this._styles = new List <Style>(); } id = new ushort?((ushort)this._styles.Count); this._styles.Add((Style)style.Clone()); } return(id.Value); }
/// <summary> /// Adds a Style object to this collection and returns the Style object's /// id value. /// </summary> /// <param name="style">The Style object to add to this collection.</param> /// <returns>The id value of the given Style object which has been added /// to this collection.</returns> public ushort Add(Style style) { ushort?id = GetID(style); if (id == null) { if (_styles == null) { _styles = new List <Style>(); } id = (ushort)_styles.Count; _styles.Add((Style)style.Clone()); } return((ushort)id); }
/// <summary> /// Adds a Style object to this collection and returns the Style object's /// id value. /// </summary> /// <param name="style">The Style object to add to this collection.</param> /// <returns>The id value of the given Style object which has been added /// to this collection.</returns> public ushort Add(Style style) { ushort? id = GetID(style); if (id == null) { if (_styles == null) _styles = new List<Style>(); id = (ushort)_styles.Count; _styles.Add((Style) style.Clone()); } return (ushort)id; }