public OldFormulaRecord(RecordInputStream ris) : base(ris, ris.Sid == biff2_sid) { ; if (IsBiff2) { field_4_value = ris.ReadDouble(); } else { long valueLongBits = ris.ReadLong(); specialCachedValue = SpecialCachedValue.Create(valueLongBits); if (specialCachedValue == null) { field_4_value = BitConverter.Int64BitsToDouble(valueLongBits); } } if (IsBiff2) { field_5_options = (short)ris.ReadUByte(); } else { field_5_options = ris.ReadShort(); } int expression_len = ris.ReadShort(); int nBytesAvailable = ris.Available(); field_6_Parsed_expr = Formula.Read(expression_len, ris, nBytesAvailable); }
public OldFormulaRecord(RecordInputStream ris) : base(ris, ris.Sid == biff2_sid) { ; if (IsBiff2) { field_4_value = ris.ReadDouble(); } else { long valueLongBits = ris.ReadLong(); specialCachedValue = SpecialCachedValue.Create(valueLongBits); if (specialCachedValue == null) { field_4_value = BitConverter.Int64BitsToDouble(valueLongBits); } } if (IsBiff2) { field_5_options = (short)ris.ReadUByte(); } else { field_5_options = ris.ReadShort(); } int expression_len = ris.ReadShort(); int nBytesAvailable = ris.Available(); field_6_Parsed_expr = Formula.Read(expression_len, ris, nBytesAvailable); }
/** * Constructs a Formula record and Sets its fields appropriately. * Note - id must be 0x06 (NOT 0x406 see MSKB #Q184647 for an * "explanation of this bug in the documentation) or an exception * will be throw upon validation * * @param in the RecordInputstream to Read the record from */ public FormulaRecord(RecordInputStream in1) : base(in1) { long valueLongBits = in1.ReadLong(); field_5_options = in1.ReadShort(); specialCachedValue = SpecialCachedValue.Create(valueLongBits); if (specialCachedValue == null) { field_4_value = BitConverter.Int64BitsToDouble(valueLongBits); } field_6_zero = in1.ReadInt(); int field_7_expression_len = in1.ReadShort(); field_8_parsed_expr = NPOI.SS.Formula.Formula.Read(field_7_expression_len, in1, in1.Available()); }
public void SetCachedResultBoolean(bool value) { specialCachedValue = SpecialCachedValue.CreateCachedBoolean(value); }
public void SetCachedResultErrorCode(int errorCode) { specialCachedValue = SpecialCachedValue.CreateCachedErrorCode(errorCode); }
public void SetCachedResultTypeString() { specialCachedValue = SpecialCachedValue.CreateForString(); }
public void SetCachedResultTypeEmptyString() { specialCachedValue = SpecialCachedValue.CreateCachedEmptyValue(); }
/** * Constructs a Formula record and Sets its fields appropriately. * Note - id must be 0x06 (NOT 0x406 see MSKB #Q184647 for an * "explanation of this bug in the documentation) or an exception * will be throw upon validation * * @param in the RecordInputstream to Read the record from */ public FormulaRecord(RecordInputStream in1):base(in1) { long valueLongBits = in1.ReadLong(); field_5_options = in1.ReadShort(); specialCachedValue = SpecialCachedValue.Create(valueLongBits); if (specialCachedValue == null) { field_4_value = BitConverter.Int64BitsToDouble(valueLongBits); } field_6_zero = in1.ReadInt(); int field_7_expression_len = in1.ReadShort(); field_8_parsed_expr = NPOI.SS.Formula.Formula.Read(field_7_expression_len, in1,in1.Available()); }
public void SetCachedResultBoolean(bool value) { specialCachedValue = SpecialCachedValue.CreateCachedBoolean(value); }
public void SetCachedResultErrorCode(int errorCode) { specialCachedValue = SpecialCachedValue.CreateCachedErrorCode(errorCode); }
public void SetCachedResultTypeString() { specialCachedValue = SpecialCachedValue.CreateForString(); }
public void SetCachedResultTypeEmptyString() { specialCachedValue = SpecialCachedValue.CreateCachedEmptyValue(); }
/** * Constructs a Formula record and Sets its fields appropriately. * Note - id must be 0x06 (NOT 0x406 see MSKB #Q184647 for an * "explanation of this bug in the documentation) or an exception * will be throw upon validation * * @param in the RecordInputstream to Read the record from */ public FormulaRecord(RecordInputStream in1) { try { field_1_row = in1.ReadUShort(); field_2_column = in1.ReadUShort(); field_3_xf = in1.ReadShort(); long valueLongBits = in1.ReadLong(); field_5_options = in1.ReadShort(); specialCachedValue = SpecialCachedValue.Create(valueLongBits); if (specialCachedValue == null) { field_4_value = BitConverter.Int64BitsToDouble(valueLongBits); } field_6_zero = in1.ReadInt(); int field_7_expression_len = in1.ReadShort(); field_8_parsed_expr = Ptg.ReadTokens(field_7_expression_len, in1); if (in1.Remaining == 10) { // TODO - this seems to occur when IntersectionPtg is present // 10 extra bytes are just 0x01 and 0x00 // This causes POI stderr: "WARN. Unread 10 bytes of record 0x6" } } catch (InvalidOperationException uoe) { throw new RecordFormatException(uoe); } if (in1.Remaining == 10) { // TODO - this seems to occur when IntersectionPtg Is present // 10 extra bytes are just 0x01 and 0x00 // This causes POI stderr: "WARN. UnRead 10 bytes of record 0x6" } }