internal void SaveToPxl(TPxlStream PxlStream, TPxlSaveData SaveData) { if (ActiveRow > FlxConsts.Max_PxlRows) { return; } if (ActiveCol > FlxConsts.Max_PxlColumns) { return; } TXlsCellRange Selection = new TXlsCellRange(ActiveRow, ActiveCol, ActiveRow, ActiveCol); if (SelectedCells != null && SelectedCells.Length > 0) { TXlsCellRange Selection2 = SelectedCells[0]; if (Selection2.Left >= 0 && Selection2.Right <= FlxConsts.Max_PxlColumns && Selection2.Left <= Selection2.Right) { if (Selection2.Top >= 0 && Selection2.Bottom <= FlxConsts.Max_PxlRows && Selection2.Top <= Selection2.Bottom) { Selection = Selection2; } } } PxlStream.WriteByte((byte)pxl.SELECTION); PxlStream.Write16((UInt16)Selection.Top); PxlStream.WriteByte((byte)Selection.Left); PxlStream.Write16((UInt16)Selection.Bottom); PxlStream.WriteByte((byte)Selection.Right); PxlStream.Write16((UInt16)ActiveRow); PxlStream.WriteByte((byte)ActiveCol); }
private void SaveOnePxlRecord(int i, int k, TPxlStream PxlStream, TPxlSaveData SaveData) { //We need to ensure this[i] is not bigger than Maxcolumns. this[k] can be=Maxcolumns+1. if (i > FlxConsts.Max_Columns97_2003) { return; } //really for pxl k should be Maxcolumns only if (k > FlxConsts.Max_Columns97_2003) { k = FlxConsts.Max_Columns97_2003; } PxlStream.WriteByte((byte)pxl.COLINFO); PxlStream.Write16((UInt16)i); PxlStream.Write16((UInt16)k); if (this[i] == null) { PxlStream.Write16((UInt16)0x900); //width PxlStream.Write16((UInt16)0); //xf PxlStream.WriteByte((byte)(0)); //options } else { PxlStream.Write16((UInt16)this[i].Width); PxlStream.Write16(SaveData.GetBiff8FromCellXF(this[i].XF)); PxlStream.WriteByte((byte)(this[i].Options & 1)); } }
internal override void SaveToPxl(TPxlStream PxlStream, int Row, TPxlSaveData SaveData) { base.SaveToPxl(PxlStream, Row, SaveData); if (OptionFlags2 != 0x00) { return; //Only worksheets. } PxlStream.WriteByte((byte)pxl.BOUNDSHEET); PxlStream.WriteByte(0); //reserved PxlStream.WriteString8(SheetName); }
internal override void SaveToPxl(TPxlStream PxlStream, int Row, TPxlSaveData SaveData) { base.SaveToPxl(PxlStream, Row, SaveData); PxlStream.WriteByte((byte)pxl.PANE); PxlStream.Write16((UInt16)ColSplit); PxlStream.Write16((UInt16)RowSplit); PxlStream.Write16((UInt16)FirstVisibleRow); PxlStream.Write16((UInt16)FirstVisibleCol); PxlStream.WriteByte((byte)ActivePane); }
internal override void SaveToPxl(TPxlStream PxlStream, int Row, TPxlSaveData SaveData) { base.SaveToPxl(PxlStream, Row, SaveData); PxlStream.WriteByte((byte)pxl.BOOLERR); PxlStream.Write16((UInt16)Row); PxlStream.WriteByte((byte)Col); PxlStream.Write16(SaveData.GetBiff8FromCellXF(XF)); byte[] b = new byte[2]; b[0] = BoolErr; b[1] = ErrFlag; PxlStream.Write(b, 0, 2); }
internal override void SaveToPxl(TPxlStream PxlStream, int Row, TPxlSaveData SaveData) { base.SaveToPxl(PxlStream, Row, SaveData); if (!PxlRecordIsValid(Row)) { return; } PxlStream.WriteByte((byte)pxl.BLANK); PxlStream.Write16((UInt16)Row); PxlStream.WriteByte((byte)Col); PxlStream.Write16(SaveData.GetBiff8FromCellXF(XF)); }
internal override void SaveToPxl(TPxlStream PxlStream, int Row, TPxlSaveData SaveData) { base.SaveToPxl(PxlStream, Row, SaveData); if (!PxlRecordIsValid(Row)) { return; } PxlStream.WriteByte((byte)pxl.NUMBER); PxlStream.Write16((UInt16)Row); PxlStream.WriteByte((byte)Col); PxlStream.Write16(SaveData.GetBiff8FromCellXF(XF)); PxlStream.Write(BitConverter.GetBytes(NumValue), 0, 8); }
internal static void SaveToPxl(TPxlStream PxlStream, int Row, int Col, int XF, string LabelValue, TPxlSaveData SaveData) { PxlStream.WriteByte((byte)pxl.LABEL); PxlStream.Write16((UInt16)Row); PxlStream.WriteByte((byte)Col); PxlStream.Write16(SaveData.GetBiff8FromCellXF(XF)); if (LabelValue == null) { LabelValue = String.Empty; } if (LabelValue.Length > 255) { LabelValue = LabelValue.Substring(0, 255); } PxlStream.WriteString16(LabelValue); }
internal override void SaveToPxl(TPxlStream PxlStream, int Row, TPxlSaveData SaveData) { base.SaveToPxl(PxlStream, Row, SaveData); int bType = BOFType; Debug.Assert(bType == 0x05 || bType == 0x10, "Only streams valid on Pxl are Globals and Worksheets"); PxlStream.WriteByte((byte)pxl.BOF); PxlStream.Write16(0x010F); //Pxl 2.0 PxlStream.Write16((UInt16)bType); }
internal override void SaveToPxl(TPxlStream PxlStream, int Row, TPxlSaveData SaveData) { base.SaveToPxl(PxlStream, Row, SaveData); PxlStream.WriteByte((byte)pxl.EOF); }