Esempio n. 1
0
 /**
  * Adds the specified new record in the correct place in sheet records list
  * 
  */
 public static void AddNewSheetRecord(List<RecordBase> sheetRecords, RecordBase newRecord)
 {
     int index = FindSheetInsertPos(sheetRecords, newRecord.GetType());
     sheetRecords.Insert(index, newRecord);
 }
Esempio n. 2
0
 private static bool IsGutsPriorRecord(RecordBase rb)
 {
     if (rb is Record)
     {
         Record record = (Record)rb;
         switch (record.Sid)
         {
             case BOFRecord.sid:
             case IndexRecord.sid:
             // calc settings block
                 case UncalcedRecord.sid:
                 case CalcCountRecord.sid:
                 case CalcModeRecord.sid:
                 case PrecisionRecord.sid:
                 case RefModeRecord.sid:
                 case DeltaRecord.sid:
                 case IterationRecord.sid:
                 case DateWindow1904Record.sid:
                 case SaveRecalcRecord.sid:
             // end calc settings
             case PrintHeadersRecord.sid:
             case PrintGridlinesRecord.sid:
             case GridsetRecord.sid:
                 return true;
             // DefaultRowHeightRecord.sid is next
         }
     }
     return false;
 }
Esempio n. 3
0
 private static bool IsPageBreakPriorRecord(RecordBase rb)
 {
     if (rb is Record)
     {
         Record record = (Record)rb;
         switch (record.Sid)
         {
             case BOFRecord.sid:
             case IndexRecord.sid:
             // calc settings block
             case UncalcedRecord.sid:
             case CalcCountRecord.sid:
             case CalcModeRecord.sid:
             case PrecisionRecord.sid:
             case RefModeRecord.sid:
             case DeltaRecord.sid:
             case IterationRecord.sid:
             case DateWindow1904Record.sid:
             case SaveRecalcRecord.sid:
             // end calc settings
             case PrintHeadersRecord.sid:
             case PrintGridlinesRecord.sid:
             case GridsetRecord.sid:
             case DefaultRowHeightRecord.sid:
             case UnknownRecord.SHEETPR_0081:
                 return true;
             // next is the 'Worksheet Protection Block'
         }
     }
     return false;
 }
Esempio n. 4
0
 private static bool IsDVTPriorRecord(RecordBase rb)
 {
     if (rb is MergedCellsTable || rb is ConditionalFormattingTable)
     {
         return true;
     }
     short sid = ((Record)rb).Sid;
     switch (sid)
     {
         case WindowTwoRecord.sid:
         case UnknownRecord.SCL_00A0:
         case PaneRecord.sid:
         case SelectionRecord.sid:
         case UnknownRecord.STANDARDWIDTH_0099:
         // MergedCellsTable
         case UnknownRecord.LABELRANGES_015F:
         case UnknownRecord.PHONETICPR_00EF:
         // ConditionalFormattingTable
         case HyperlinkRecord.sid:
         case UnknownRecord.QUICKTIP_0800:
             return true;
     }
     return false;
 }
 public void Append(RecordBase r)
 {
     _recs.Add(r);
 }