예제 #1
0
        internal SLCalculationCell Clone()
        {
            var cc = new SLCalculationCell();

            cc.RowIndex     = RowIndex;
            cc.ColumnIndex  = ColumnIndex;
            cc.SheetId      = SheetId;
            cc.InChildChain = InChildChain;
            cc.NewLevel     = NewLevel;
            cc.NewThread    = NewThread;
            cc.Array        = Array;

            return(cc);
        }
예제 #2
0
        /// <summary>
        ///     Adds a calculation cell if it doesn't already exist
        /// </summary>
        /// <param name="cc"></param>
        internal void AddCalculationCell(SLCalculationCell cc)
        {
            var bFound = false;

            foreach (var calc in CalculationCells)
            {
                if ((calc.SheetId == cc.SheetId) && (calc.RowIndex == cc.RowIndex) &&
                    (calc.ColumnIndex == cc.ColumnIndex))
                {
                    bFound = true;
                    break;
                }
            }

            if (!bFound)
            {
                CalculationCells.Add(cc.Clone());
            }
        }