本文整理汇总了C#中NPOI.HSSF.Model.RecordStream.GetNext方法的典型用法代码示例。如果您正苦于以下问题:C# RecordStream.GetNext方法的具体用法?C# RecordStream.GetNext怎么用?C# RecordStream.GetNext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NPOI.HSSF.Model.RecordStream
的用法示例。
在下文中一共展示了RecordStream.GetNext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DVAxisAggregate
public DVAxisAggregate(RecordStream rs, ChartRecordAggregate container, AxisRecord axis)
: base(RuleName_DVAXIS, container)
{
if (axis == null)
{
this.axis = (AxisRecord)rs.GetNext();
rs.GetNext();
}
else
{
this.axis = axis;
}
if (rs.PeekNextChartSid() == ValueRangeRecord.sid)
valueRange = (ValueRangeRecord)rs.GetNext();
if (rs.PeekNextChartSid() == YMultRecord.sid)
axm = new AXMAggregate(rs, this);
axs = new AXSAggregate(rs, this);
if (rs.PeekNextChartSid() == CrtMlFrtRecord.sid)
crtmlfrt = new CrtMlFrtAggregate(rs, this);
Record r = rs.GetNext();//EndRecord
Debug.Assert(r.GetType() == typeof(EndRecord));
}
示例2: LDAggregate
public LDAggregate(RecordStream rs, ChartRecordAggregate container)
:base(RuleName_LD, container)
{
legend = (LegendRecord)rs.GetNext();
rs.GetNext();//BeginRecord
pos = (PosRecord)rs.GetNext();
attachedLabel = new AttachedLabelAggregate(rs, this);
if (rs.PeekNextChartSid() == FrameRecord.sid)
{
frame = new FrameAggregate(rs, this);
}
if (rs.PeekNextChartSid() == CrtLayout12Record.sid)
{
crtLayout = (CrtLayout12Record)rs.GetNext();
}
if (rs.PeekNextChartSid() == TextPropsStreamRecord.sid)
{
textProps = new TextPropsAggregate(rs, this);
}
if (rs.PeekNextChartSid() == CrtMlFrtRecord.sid)
{
crtMlFrt = new CrtMlFrtAggregate(rs, this);
}
Record r = rs.GetNext();//EndRecord
Debug.Assert(r.GetType() == typeof(EndRecord));
}
示例3: AxisParentAggregate
public AxisParentAggregate(RecordStream rs, ChartRecordAggregate container)
: base(RuleName_AXISPARENT, container)
{
axisPraent = (AxisParentRecord)rs.GetNext();
rs.GetNext();
pos = (PosRecord)rs.GetNext();
if (ChartFormatRecord.sid != rs.PeekNextChartSid())
{
try
{
axes = new AxesAggregate(rs, this);
}
catch
{
Debug.Print("not find axes rule records");
axes = null;
}
}
Debug.Assert(ChartFormatRecord.sid == rs.PeekNextChartSid());
while (ChartFormatRecord.sid == rs.PeekNextChartSid())
{
crtList.Add(new CRTAggregate(rs, this));
}
Record r = rs.GetNext();//EndRecord
Debug.Assert(r.GetType() == typeof(EndRecord));
}
示例4: TestAbnormalPivotTableRecords_bug46280
public void TestAbnormalPivotTableRecords_bug46280()
{
int SXVIEW_SID = ViewDefinitionRecord.sid;
Record[] inRecs = {
new RowRecord(0),
new NumberRecord(),
// normally MSODRAWING(0x00EC) would come here before SXVIEW
new UnknownRecord(SXVIEW_SID, System.Text.Encoding.UTF8.GetBytes("dummydata (SXVIEW: View DefInition)")),
new WindowTwoRecord(),
};
RecordStream rs = new RecordStream(Arrays.AsList(inRecs), 0);
RowBlocksReader rbr = new RowBlocksReader(rs);
if (rs.PeekNextClass() == typeof(WindowTwoRecord))
{
// Should have stopped at the SXVIEW record
throw new AssertionException("Identified bug 46280b");
}
RecordStream rbStream = rbr.PlainRecordStream;
Assert.AreEqual(inRecs[0], rbStream.GetNext());
Assert.AreEqual(inRecs[1], rbStream.GetNext());
Assert.IsFalse(rbStream.HasNext());
Assert.IsTrue(rs.HasNext());
Assert.AreEqual(inRecs[2], rs.GetNext());
Assert.AreEqual(inRecs[3], rs.GetNext());
}
示例5: CustomViewSettingsRecordAggregate
public CustomViewSettingsRecordAggregate(RecordStream rs)
{
_begin = rs.GetNext();
if (_begin.Sid != UserSViewBegin.sid)
{
throw new InvalidOperationException("Bad begin record");
}
List<RecordBase> temp = new List<RecordBase>();
while (rs.PeekNextSid() != UserSViewEnd.sid)
{
if (PageSettingsBlock.IsComponentRecord(rs.PeekNextSid()))
{
if (_psBlock != null)
{
throw new InvalidOperationException(
"Found more than one PageSettingsBlock in custom view Settings sub-stream");
}
_psBlock = new PageSettingsBlock(rs);
temp.Add(_psBlock);
continue;
}
temp.Add(rs.GetNext());
}
_recs = temp;
_end = rs.GetNext(); // no need to save EOF in field
if (_end.Sid != UserSViewEnd.sid)
{
throw new InvalidOperationException("Bad custom view Settings end record");
}
}
示例6: ReadARecord
private bool ReadARecord(RecordStream rs)
{
switch (rs.PeekNextSid())
{
case ProtectRecord.sid:
CheckNotPresent(_protectRecord);
_protectRecord = rs.GetNext() as ProtectRecord;
break;
case ObjectProtectRecord.sid:
CheckNotPresent(_objectProtectRecord);
_objectProtectRecord = rs.GetNext() as ObjectProtectRecord;
break;
case ScenarioProtectRecord.sid:
CheckNotPresent(_scenarioProtectRecord);
_scenarioProtectRecord = rs.GetNext() as ScenarioProtectRecord;
break;
case PasswordRecord.sid:
CheckNotPresent(_passwordRecord);
_passwordRecord = rs.GetNext() as PasswordRecord;
break;
default:
// all other record types are not part of the PageSettingsBlock
return false;
}
return true;
}
示例7: ChartSubstreamRecordAggregate
public ChartSubstreamRecordAggregate(RecordStream rs)
{
_bofRec = (BOFRecord)rs.GetNext();
List<RecordBase> temp = new List<RecordBase>();
while (rs.PeekNextClass() != typeof(EOFRecord))
{
Type a = rs.PeekNextClass();
if (PageSettingsBlock.IsComponentRecord(rs.PeekNextSid()))
{
if (_psBlock != null)
{
if (rs.PeekNextSid() == HeaderFooterRecord.sid)
{
// test samples: 45538_classic_Footer.xls, 45538_classic_Header.xls
_psBlock.AddLateHeaderFooter((HeaderFooterRecord)rs.GetNext());
continue;
}
throw new InvalidDataException(
"Found more than one PageSettingsBlock in chart sub-stream");
}
_psBlock = new PageSettingsBlock(rs);
temp.Add(_psBlock);
continue;
}
temp.Add(rs.GetNext());
}
_recs = temp;
Record eof = rs.GetNext(); // no need to save EOF in field
if (!(eof is EOFRecord))
{
throw new InvalidOperationException("Bad chart EOF");
}
}
示例8: AXMAggregate
public AXMAggregate(RecordStream rs, ChartRecordAggregate container)
: base(RuleName_AXM, container)
{
yMult = (YMultRecord)rs.GetNext();
startObject = (ChartStartObjectRecord)rs.GetNext();
attachedLabel = new AttachedLabelAggregate(rs, this);
endObject = (ChartEndObjectRecord)rs.GetNext();
}
示例9: DatAggregate
public DatAggregate(RecordStream rs, ChartRecordAggregate container)
: base(RuleName_DAT, container)
{
dat = (DatRecord)rs.GetNext();
rs.GetNext();
ld = new LDAggregate(rs, this);
Record r = rs.GetNext();//EndRecord
Debug.Assert(r.GetType() == typeof(EndRecord));
}
示例10: DataValidityTable
public DataValidityTable(RecordStream rs)
{
_headerRec = (DVALRecord)rs.GetNext();
IList temp = new ArrayList();
while (rs.PeekNextClass() == typeof(DVRecord))
{
temp.Add(rs.GetNext());
}
_validationList = temp;
}
示例11: CRNBlock
public CRNBlock(RecordStream rs)
{
_countRecord = (CRNCountRecord)rs.GetNext();
int nCRNs = _countRecord.NumberOfCRNs;
CRNRecord[] crns = new CRNRecord[nCRNs];
for (int i = 0; i < crns.Length; i++)
{
crns[i] = (CRNRecord)rs.GetNext();
}
_crns = crns;
}
示例12: CrtMlFrtAggregate
public CrtMlFrtAggregate(RecordStream rs, ChartRecordAggregate container)
: base(RuleName_CRTMLFRT, container)
{
crtmlFrt = (CrtMlFrtRecord)rs.GetNext();
if (rs.PeekNextChartSid() == CrtMlFrtContinueRecord.sid)
{
while (rs.PeekNextChartSid() == CrtMlFrtContinueRecord.sid)
{
continues.Add((CrtMlFrtContinueRecord)rs.GetNext());
}
}
}
示例13: ShapePropsAggregate
public ShapePropsAggregate(RecordStream rs, ChartRecordAggregate container)
: base(RuleName_SHAPEPROPS, container)
{
shapProps = (ShapePropsStreamRecord)rs.GetNext();
if (rs.PeekNextChartSid() == CrtMlFrtContinueRecord.sid)
{
while (rs.PeekNextChartSid() == CrtMlFrtContinueRecord.sid)
{
continues.Add((ContinueFrt12Record)rs.GetNext());
}
}
}
示例14: DFTTextAggregate
public DFTTextAggregate(RecordStream rs, ChartRecordAggregate container)
: base(RuleName_DFTTEXT, container)
{
if (rs.PeekNextChartSid() == DataLabExtRecord.sid)
{
dataLabExt = (DataLabExtRecord)rs.GetNext();
startObject = (ChartStartObjectRecord)rs.GetNext();
}
defaultText = (DefaultTextRecord)rs.GetNext();
attachedLabel = new AttachedLabelAggregate(rs, this);
if (startObject != null)
endObject = (ChartEndObjectRecord)rs.GetNext();
}
示例15: SeriesDataAggregate
public SeriesDataAggregate(RecordStream rs)
{
dimensions = (DimensionsRecord)rs.GetNext();
while (rs.PeekNextChartSid() == SeriesIndexRecord.sid)
{
SeriesIndexRecord siIndex = (SeriesIndexRecord)rs.GetNext();
int sid = rs.PeekNextChartSid();
List<Record> dataList = new List<Record>();
while (sid == NumberRecord.sid || sid == BoolErrRecord.sid || sid == BlankRecord.sid || sid == LabelRecord.sid)
{
dataList.Add(rs.GetNext());
}
dicData.Add(siIndex, dataList);
}
}