public void FillFields(RecordInputStream in1) { this.field_Addr_number = in1.ReadShort(); this.field_regions_list = new ArrayList(this.field_Addr_number); for (int k = 0; k < this.field_Addr_number; k++) { short first_row = in1.ReadShort(); short first_col = in1.ReadShort(); short last_row = first_row; short last_col = first_col; if (in1.Remaining >= 4) { last_row = in1.ReadShort(); last_col = in1.ReadShort(); } else { // Ran out of data // For now, Issue a warning, finish, and // hope for the best.... logger.Log(POILogger.WARN, "Ran out of data reading cell references for DVRecord"); k = this.field_Addr_number; } AddrStructure region = new AddrStructure(first_row, first_col, last_row, last_col); this.field_regions_list.Add(region); } }
/** * Constructs a Font record and Sets its fields appropriately. * * @param in the RecordInputstream to Read the record from */ public FontRecord(RecordInputStream in1) { field_1_font_height = in1.ReadShort(); field_2_attributes = in1.ReadShort(); field_3_color_palette_index = in1.ReadShort(); field_4_bold_weight = in1.ReadShort(); field_5_base_sub_script = in1.ReadShort(); field_6_underline = (byte)in1.ReadByte(); field_7_family = (byte)in1.ReadByte(); field_8_charset = (byte)in1.ReadByte(); field_9_zero = (byte)in1.ReadByte(); int field_10_font_name_len = (byte)in1.ReadByte(); int unicodeFlags = in1.ReadUByte(); // options byte present always (even if no character data) if (field_10_font_name_len > 0) { if (unicodeFlags == 0) { // Is compressed Unicode field_11_font_name = in1.ReadCompressedUnicode(field_10_font_name_len); } else { // Is not compressed Unicode field_11_font_name = in1.ReadUnicodeLEString(field_10_font_name_len); } } else { field_11_font_name = ""; } }
/** * Constructs a MulRK record and Sets its fields appropriately. * * @param in the RecordInputstream to Read the record from */ public MulRKRecord(RecordInputStream in1) { field_1_row = in1.ReadUShort(); field_2_first_col = in1.ReadShort(); field_3_rks = RkRec.ParseRKs(in1); field_4_last_col = in1.ReadShort(); }
public FeatRecord(RecordInputStream in1) { futureHeader = new FtrHeader(in1); isf_sharedFeatureType = in1.ReadShort(); reserved1 = (byte)in1.ReadByte(); reserved2 = in1.ReadInt(); int cref = in1.ReadUShort(); cbFeatData = in1.ReadInt(); reserved3 = in1.ReadShort(); cellRefs = new CellRangeAddress[cref]; for (int i = 0; i < cellRefs.Length; i++) { cellRefs[i] = new CellRangeAddress(in1); } switch (isf_sharedFeatureType) { case FeatHdrRecord.SHAREDFEATURES_ISFPROTECTION: sharedFeature = new FeatProtection(in1); break; case FeatHdrRecord.SHAREDFEATURES_ISFFEC2: sharedFeature = new FeatFormulaErr2(in1); break; case FeatHdrRecord.SHAREDFEATURES_ISFFACTOID: sharedFeature = new FeatSmartTag(in1); break; default: System.Console.WriteLine("Unknown Shared Feature " + isf_sharedFeatureType + " found!"); break; } }
/** * Constructs a Guts record and Sets its fields appropriately. * @param in the RecordInputstream to Read the record from */ public GutsRecord(RecordInputStream in1) { field_1_left_row_gutter = in1.ReadShort(); field_2_top_col_gutter = in1.ReadShort(); field_3_row_level_max = in1.ReadShort(); field_4_col_level_max = in1.ReadShort(); }
/** * Constructs a MulBlank record and Sets its fields appropriately. * * @param in the RecordInputstream to Read the record from */ public MulBlankRecord(RecordInputStream in1) { _row = in1.ReadUShort(); _first_col = in1.ReadShort(); _xfs = ParseXFs(in1); _last_col = in1.ReadShort(); }
public FtrHeader(RecordInputStream in1) { recordType = in1.ReadShort(); grbitFrt = in1.ReadShort(); reserved = new byte[8]; in1.Read(reserved, 0, 8); }
/** * @param in the RecordInputstream to Read the record from */ public SharedFormulaRecord(RecordInputStream in1) : base(in1) { field_5_reserved = in1.ReadShort(); int field_6_expression_len = in1.ReadShort(); int nAvailableBytes = in1.Available(); field_7_parsed_expr = LF.Utils.NPOI.SS.Formula.Formula.Read(field_6_expression_len, in1, nAvailableBytes); }
public CFHeaderRecord(RecordInputStream in1) { field_1_numcf = in1.ReadShort(); field_2_need_recalculation = in1.ReadShort(); field_3_enclosing_cell_range = new CellRangeAddress(in1); field_4_cell_ranges = new CellRangeAddressList(in1); }
/** * Constructs a Dimensions record and Sets its fields appropriately. * @param in the RecordInputstream to Read the record from */ public DimensionsRecord(RecordInputStream in1) { field_1_first_row = in1.ReadInt(); field_2_last_row = in1.ReadInt(); field_3_first_col = in1.ReadShort(); field_4_last_col = in1.ReadShort(); field_5_zero = in1.ReadShort(); }
/** * Constructs a Pane record and Sets its fields appropriately. * * @param in the RecordInputstream to Read the record from */ public PaneRecord(RecordInputStream in1) { field_1_x = in1.ReadShort(); field_2_y = in1.ReadShort(); field_3_topRow = in1.ReadShort(); field_4_leftColumn = in1.ReadShort(); field_5_activePane = in1.ReadShort(); }
/** * Constructs a ChartFormatRecord record and Sets its fields appropriately. * @param in the RecordInputstream to Read the record from */ public ChartFormatRecord(RecordInputStream in1) { field1_x_position = in1.ReadInt(); field2_y_position = in1.ReadInt(); field3_width = in1.ReadInt(); field4_height = in1.ReadInt(); field5_grbit = in1.ReadShort(); field6_icrt = in1.ReadShort(); }
public TableRecord(RecordInputStream in1) : base(in1) { field_5_flags = in1.ReadByte(); field_6_res = in1.ReadByte(); field_7_rowInputRow = in1.ReadShort(); field_8_colInputRow = in1.ReadShort(); field_9_rowInputCol = in1.ReadShort(); field_10_colInputCol = in1.ReadShort(); }
public CRNCountRecord(RecordInputStream in1) { field_1_number_crn_records = in1.ReadShort(); if (field_1_number_crn_records < 0) { // TODO - seems like the sign bit of this field might be used for some other purpose // see example file for test case "TestBugs.test19599()" field_1_number_crn_records = (short)-field_1_number_crn_records; } field_2_sheet_table_index = in1.ReadShort(); }
public ChartEndBlockRecord(RecordInputStream in1) { rt = in1.ReadShort(); grbitFrt = in1.ReadShort(); iObjectKind = in1.ReadShort(); // Often, but not always has 6 unused bytes at the end if(in1.Available() == 0) { unused = new byte[0]; } else { unused = new byte[6]; in1.ReadFully(unused); } }
public ChartFRTInfoRecord(RecordInputStream in1) { rt = in1.ReadShort(); grbitFrt = in1.ReadShort(); verOriginator = (byte)in1.ReadByte(); verWriter = (byte)in1.ReadByte(); int cCFRTID = in1.ReadShort(); rgCFRTID = new CFRTID[cCFRTID]; for (int i = 0; i < cCFRTID; i++) { rgCFRTID[i] = new CFRTID(in1); } }
/// <summary> /// Constructs a Selection record and Sets its fields appropriately. /// </summary> /// <param name="in1">the RecordInputstream to Read the record from</param> public SelectionRecord(RecordInputStream in1) { field_1_pane = (byte)in1.ReadByte(); field_2_row_active_cell = in1.ReadUShort(); field_3_col_active_cell = in1.ReadShort(); field_4_ref_active_cell = in1.ReadShort(); int field_5_num_refs = in1.ReadUShort(); field_6_refs = new CellRangeAddress8Bit[field_5_num_refs]; for (int i = 0; i < field_5_num_refs; i++) { field_6_refs[i] = new CellRangeAddress8Bit(in1); } }
/** * Constructs a WindowOne record and Sets its fields appropriately. * @param in the RecordInputstream to Read the record from */ public WindowOneRecord(RecordInputStream in1) { field_1_h_hold = in1.ReadShort(); field_2_v_hold = in1.ReadShort(); field_3_width = in1.ReadShort(); field_4_height = in1.ReadShort(); field_5_options = in1.ReadShort(); field_6_active_sheet = in1.ReadShort(); field_7_first_visible_tab = in1.ReadShort(); field_8_num_selected_tabs = in1.ReadShort(); field_9_tab_width_ratio = in1.ReadShort(); }
public int FillField(RecordInputStream in1) { short tokenSize = in1.ReadShort(); formulaTokens = Ptg.ReadTokens(tokenSize, in1); return tokenSize + 2; }
/** * Constructs a <c>NoteRecord</c> and Fills its fields * from the supplied <c>RecordInputStream</c>. * * @param in the stream to Read from */ public NoteRecord(RecordInputStream in1) { field_1_row = in1.ReadShort(); field_2_col = in1.ReadUShort(); field_3_flags = in1.ReadShort(); field_4_shapeid = in1.ReadUShort(); int length = in1.ReadShort(); field_5_hasMultibyte = in1.ReadByte() != 0x00; if (field_5_hasMultibyte) { field_6_author = StringUtil.ReadUnicodeLE(in1, length); } else { field_6_author = StringUtil.ReadCompressedUnicode(in1, length); } if (in1.Available() == 1) { field_7_padding = (byte)in1.ReadByte(); } }
public CRNRecord(RecordInputStream in1) { field_1_last_column_index = in1.ReadByte() & 0x00FF; field_2_first_column_index = in1.ReadByte() & 0x00FF; field_3_row_index = in1.ReadShort(); int nValues = field_1_last_column_index - field_2_first_column_index + 1; field_4_constant_values = ConstantValueParser.Parse(in1, nValues); }
/** * Constructs a WindowTwo record and Sets its fields appropriately. * @param in the RecordInputstream to Read the record from */ public WindowTwoRecord(RecordInputStream in1) { int size = in1.Remaining; field_1_options = in1.ReadShort(); field_2_top_row = in1.ReadShort(); field_3_left_col = in1.ReadShort(); field_4_header_color = in1.ReadInt(); if (size > 10) { field_5_page_break_zoom = in1.ReadShort(); field_6_normal_zoom = in1.ReadShort(); } if (size > 14) { // there Is a special case of this record that has only 14 bytes...undocumented! field_7_reserved = in1.ReadInt(); } }
/** * Constructs a Format record and Sets its fields appropriately. * @param in the RecordInputstream to Read the record from */ public FormatRecord(RecordInputStream in1) { field_1_index_code = in1.ReadShort(); int field_3_unicode_len = in1.ReadShort(); field_3_hasMultibyte = (in1.ReadByte() & (byte)0x01) != 0; if (field_3_hasMultibyte) { // Unicode field_4_formatstring = in1.ReadUnicodeLEString(field_3_unicode_len); } else { // not Unicode field_4_formatstring = in1.ReadCompressedUnicode(field_3_unicode_len); } }
/** * Constructs a TabID record and Sets its fields appropriately. * @param in the RecordInputstream to Read the record from */ public TabIdRecord(RecordInputStream in1) { _tabids = new short[in1.Remaining / 2]; for (int k = 0; k < _tabids.Length; k++) { _tabids[k] = in1.ReadShort(); } }
/** * Constructs a DVAL record and Sets its fields appropriately. * * @param in the RecordInputstream to Read the record from */ public DVALRecord(RecordInputStream in1) { this.field_1_options = in1.ReadShort(); this.field_2_horiz_pos = in1.ReadInt(); this.field_3_vert_pos = in1.ReadInt(); this.field_cbo_id = in1.ReadInt(); this.field_5_dv_no = in1.ReadInt(); }
/** * Constructs a Tick record and Sets its fields appropriately. * * @param in the RecordInputstream to Read the record from */ public TickRecord(RecordInputStream in1) { field_1_majorTickType = (byte)in1.ReadByte(); field_2_minorTickType = (byte)in1.ReadByte(); field_3_labelPosition = (byte)in1.ReadByte(); field_4_background = (byte)in1.ReadByte(); field_5_labelColorRgb = (byte)in1.ReadInt(); field_6_zero1 = in1.ReadInt(); field_7_zero2 = in1.ReadInt(); field_8_zero3 = in1.ReadInt(); field_9_zero4 = in1.ReadInt(); field_10_options = in1.ReadShort(); field_11_tickColor = in1.ReadShort(); field_12_zero5 = in1.ReadShort(); }
/** * Constructs a FileSharing record and Sets its fields appropriately. * @param in the RecordInputstream to Read the record from */ public FileSharingRecord(RecordInputStream in1) { field_1_Readonly = in1.ReadShort(); field_2_password = in1.ReadShort(); int nameLen = in1.ReadShort(); if (nameLen > 0) { // TODO - Current examples(3) from junits only have zero Length username. field_3_username_unicode_options = (byte)in1.ReadByte(); field_3_username_value = in1.ReadCompressedUnicode(nameLen); } else { field_3_username_value = ""; } }
/** * Constructs a PaletteRecord record and Sets its fields appropriately. * @param in the RecordInputstream to Read the record from */ public PaletteRecord(RecordInputStream in1) { short field_1_numcolors = in1.ReadShort(); field_2_colors = new List<PColor>(field_1_numcolors); for (int k = 0; k < field_1_numcolors; k++) { field_2_colors.Add(new PColor(in1)); } }
/** * Constructs a DBCellRecord and Sets its fields appropriately * @param in the RecordInputstream to Read the record from */ public DBCellRecord(RecordInputStream in1) { field_1_row_offset = in1.ReadUShort(); int size = in1.Remaining; field_2_cell_offsets = new short[size / 2]; for (int i = 0; i < field_2_cell_offsets.Length; i++) { field_2_cell_offsets[i] = in1.ReadShort(); } }
/** * Constructs a Style record and Sets its fields appropriately. * @param in the RecordInputstream to Read the record from */ public StyleRecord(RecordInputStream in1) { field_1_xf_index = in1.ReadShort(); if (IsBuiltin) { field_2_builtin_style = in1.ReadByte(); field_3_outline_style_level = in1.ReadByte(); } else { int field_2_name_length = in1.ReadShort(); // Some files from Crystal Reports lack // the remaining fields, which Is naughty if (in1.Remaining <1) { // Some files from Crystal Reports lack the is16BitUnicode byte // the remaining fields, which is naughty if (field_2_name_length != 0) { throw new RecordFormatException("Ran out of data reading style record"); } // guess this is OK if the string length is zero field_4_name = ""; } else { field_3_stringHasMultibyte = in1.ReadByte() != 0x00; if (field_3_stringHasMultibyte) { field_4_name = StringUtil.ReadUnicodeLE(in1, field_2_name_length); } else { field_4_name = StringUtil.ReadCompressedUnicode(in1,field_2_name_length); } } } // todo sanity Check exception to make sure we're one or the other }