Exemple #1
0
 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
     });
 }
Exemple #2
0
        private void AddToQueue()
        {
            WeakHashtable parentCollection = this.element.ParentCollection;
            Queue         addQueue         = parentCollection.AddQueue;

            if (addQueue.Count >= parentCollection.AddQueueSize)
            {
                ((CellStyle)addQueue.Dequeue()).Consolidate();
            }
            addQueue.Enqueue(this);
        }
Exemple #3
0
 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;
 }
Exemple #4
0
 public WeekReferenceWithHash(WeakHashtable parent, HashtableElement target) : base(target)
 {
     this.parent = parent;
     this.hash   = target.GetHashCode();
 }
Exemple #5
0
 private void CloneElement(WeakHashtable parentCollection)
 {
     this.element = (CellStyleData)this.element.Clone(parentCollection);
 }
Exemple #6
0
 public HashtableElement(WeakHashtable parentCollection, bool isInCache)
 {
     this.parentCollection = parentCollection;
     this.isInCache        = isInCache;
 }
Exemple #7
0
 public virtual HashtableElement Clone(WeakHashtable parentCollection)
 {
     throw new Exception("Internal: Must override Clone() in derived class");
 }