public override HashtableElement Clone(WeakHashtable parentCollection) { return(new CellStyleData((CellStyleCachedCollection)parentCollection, false) { HorizontalAlignment = this.HorizontalAlignment, VerticalAlignment = this.VerticalAlignment, PatternStyle = this.PatternStyle, PatternBackgroundColor = this.PatternBackgroundColor, PatternForegroundColor = this.PatternForegroundColor, Indent = this.Indent, Rotation = this.Rotation, Locked = this.Locked, FormulaHidden = this.FormulaHidden, WrapText = this.WrapText, ShrinkToFit = this.ShrinkToFit, NumberFormat = this.NumberFormat, FontData = new ExcelFontData(this.FontData), BorderColor = (Color[])this.BorderColor.Clone(), BorderStyle = (LineStyle[])this.BorderStyle.Clone(), BordersUsed = this.BordersUsed }); }
private void AddToQueue() { WeakHashtable parentCollection = this.element.ParentCollection; Queue addQueue = parentCollection.AddQueue; if (addQueue.Count >= parentCollection.AddQueueSize) { ((CellStyle)addQueue.Dequeue()).Consolidate(); } addQueue.Enqueue(this); }
internal CellStyle(CellStyle style, WeakHashtable parentCollection) { this.UseFlags = CellStyleData.Properties.None; this.element = style.element; if (!this.element.IsInCache || (this.element.ParentCollection != parentCollection)) { this.CloneElement(parentCollection); this.AddToQueue(); } this.UseFlags = style.UseFlags; }
public WeekReferenceWithHash(WeakHashtable parent, HashtableElement target) : base(target) { this.parent = parent; this.hash = target.GetHashCode(); }
private void CloneElement(WeakHashtable parentCollection) { this.element = (CellStyleData)this.element.Clone(parentCollection); }
public HashtableElement(WeakHashtable parentCollection, bool isInCache) { this.parentCollection = parentCollection; this.isInCache = isInCache; }
public virtual HashtableElement Clone(WeakHashtable parentCollection) { throw new Exception("Internal: Must override Clone() in derived class"); }