public AutoFilterRecord(RecordInputStream in1) { field_1_iEntry = in1.ReadShort(); field_2_grbit = in1.ReadShort(); field_3_doper1 = new DOPERRecord(in1); field_4_doper2 = new DOPERRecord(in1); if (field_3_doper1.DataType == DOPERType.String && field_3_doper1.LengthOfString > 0) { rgch1_multibyte = (in1.ReadByte() != 0); if (rgch1_multibyte) { field_5_rgch1 = in1.ReadUnicodeLEString(field_3_doper1.LengthOfString); } else { field_5_rgch1 = in1.ReadCompressedUnicode(field_3_doper1.LengthOfString); } } if (field_4_doper2.DataType == DOPERType.String && field_4_doper2.LengthOfString > 0) { rgch2_multibyte = (in1.ReadByte() != 0); if (rgch2_multibyte) { field_6_rgch2 = in1.ReadUnicodeLEString(field_4_doper2.LengthOfString); } else { field_6_rgch2 = in1.ReadCompressedUnicode(field_4_doper2.LengthOfString); } } }
public AutoFilterRecord(RecordInputStream in1) { field_1_iEntry = in1.ReadShort(); field_2_grbit = in1.ReadShort(); field_3_doper1 = new DOPERRecord(in1); field_4_doper2 = new DOPERRecord(in1); if (field_3_doper1.DataType == DOPERType.String&&field_3_doper1.LengthOfString>0) { rgch1_multibyte = (in1.ReadByte() != 0); if (rgch1_multibyte) { field_5_rgch1 = in1.ReadUnicodeLEString(field_3_doper1.LengthOfString); } else { field_5_rgch1 = in1.ReadCompressedUnicode(field_3_doper1.LengthOfString); } } if (field_4_doper2.DataType == DOPERType.String && field_4_doper2.LengthOfString > 0) { rgch2_multibyte = (in1.ReadByte() != 0); if (rgch2_multibyte) { field_6_rgch2 = in1.ReadUnicodeLEString(field_4_doper2.LengthOfString); } else { field_6_rgch2 = in1.ReadCompressedUnicode(field_4_doper2.LengthOfString); } } }
public void TestChangeOfCompressionFlag_bug25866() { byte[] changingFlagSimpleData = HexRead.ReadFromString("" + "AA AA " // fake SID + "06 00 " // first rec len 6 + HED_DUMP1 ); RecordInputStream in1 = TestcaseRecordInputStream.Create(changingFlagSimpleData); String actual; try { actual = in1.ReadUnicodeLEString(18); } catch (ArgumentException e) { if ("compressByte in continue records must be 1 while Reading unicode LE string".Equals(e.Message)) { throw new AssertionException("Identified bug 45866"); } throw e; } Assert.AreEqual("\u591A\u8A00\u8A9E - Multilingual", actual); }
public ExtendedPivotTableViewFieldsRecord(RecordInputStream in1) { grbit1 = in1.ReadInt(); grbit2 = in1.ReadUByte(); citmShow = in1.ReadUByte(); isxdiSort = in1.ReadUShort(); isxdiShow = in1.ReadUShort(); // This record seems to have different valid encodings switch (in1.Remaining) { case 0: // as per "Microsoft Excel Developer's Kit" book // older version of SXVDEX - doesn't seem to have a sub-total name reserved1 = 0; reserved2 = 0; subName = null; return; case 10: // as per "MICROSOFT OFFICE EXCEL 97-2007 BINARY FILE FORMAT SPECIFICATION" pdf break; default: throw new RecordFormatException("Unexpected remaining size (" + in1.Remaining + ")"); } int cchSubName = in1.ReadUShort(); reserved1 = in1.ReadInt(); reserved2 = in1.ReadInt(); if (cchSubName != STRING_NOT_PRESENT_LEN) { subName = in1.ReadUnicodeLEString(cchSubName); } }
/** * Constructs a SeriesText record and Sets its fields appropriately. * * @param in the RecordInputstream to Read the record from */ public SeriesTextRecord(RecordInputStream in1) { field_1_id = in1.ReadShort(); int field_2_textLength = (byte)in1.ReadByte(); is16bit = (in1.ReadUByte() & 0x01) != 0; if (is16bit) { field_4_text = in1.ReadUnicodeLEString(field_2_textLength); } else { field_4_text = in1.ReadCompressedUnicode(field_2_textLength); } }
/** * Constructs a SeriesText record and Sets its fields appropriately. * * @param in the RecordInputstream to Read the record from */ public SeriesTextRecord(RecordInputStream in1) { field_1_id = in1.ReadShort(); int field_2_textLength = (byte)in1.ReadByte(); is16bit = (in1.ReadUByte() & 0x01) != 0; if (is16bit) { field_4_text = in1.ReadUnicodeLEString(field_2_textLength); } else { field_4_text = in1.ReadCompressedUnicode(field_2_textLength); } }
public ViewFieldsRecord(RecordInputStream in1) { sxaxis = in1.ReadShort(); cSub = in1.ReadShort(); grbitSub = in1.ReadShort(); cItm = in1.ReadShort(); int cchName = in1.ReadUShort(); if (cchName != STRING_NOT_PRESENT_LEN) { int flag = in1.ReadByte(); if ((flag & 0x01) != 0) { _name = in1.ReadUnicodeLEString(cchName); } else { _name = in1.ReadCompressedUnicode(cchName); } } }