public override void VisitContainedRecords(RecordVisitor rv)
 {
     for (int i = 0; i < _cfHeaders.Count; i++)
     {
         CFRecordsAggregate subAgg = (CFRecordsAggregate)_cfHeaders[i];
         subAgg.VisitContainedRecords(rv);
     }
 }
        public ConditionalFormattingTable(RecordStream rs)
        {
            IList temp = new ArrayList();

            while (rs.PeekNextClass() == typeof(CFHeaderRecord))
            {
                temp.Add(CFRecordsAggregate.CreateCFAggregate(rs));
            }
            _cfHeaders = temp;
        }
 public void UpdateFormulasAfterCellShift(FormulaShifter shifter, int externSheetIndex)
 {
     for (int i = 0; i < _cfHeaders.Count; i++)
     {
         CFRecordsAggregate subAgg = (CFRecordsAggregate)_cfHeaders[i];
         bool shouldKeep           = subAgg.UpdateFormulasAfterCellShift(shifter, externSheetIndex);
         if (!shouldKeep)
         {
             _cfHeaders.RemoveAt(i);
             i--;
         }
     }
 }
 /**
  * @return index of the newly added CF header aggregate
  */
 public int Add(CFRecordsAggregate cfAggregate)
 {
     _cfHeaders.Add(cfAggregate);
     return(_cfHeaders.Count - 1);
 }