internal ExcelWorksheet(string name, ExcelWorksheetCollection parent) { this.defaultColumnWidth = 2340; this.pageBreakViewZoom = 60; this.zoom = 100; this.windowOptions = WorksheetWindowOptions.DefaultGridLineColor | WorksheetWindowOptions.ShowGridLines | WorksheetWindowOptions.ShowOutlineSymbols | WorksheetWindowOptions.ShowSheetHeaders | WorksheetWindowOptions.ShowZeroValues; this.paperSize = 0; this.scalingFactor = 100; this.startPageNumber = 1; this.fitWorksheetWidthToPages = 0; this.fitWorksheetHeightToPages = 0; this.setupOptions = SetupOptions.Portrait; this.printResolution = 0; this.verticalPrintResolution = 0; this.headerMargin = 0.5; this.footerMargin = 0.5; this.numberOfCopies = 1; this.WSBoolOpt = WSBoolOptions.ColGroupRight | WSBoolOptions.RowGroupBelow | WSBoolOptions.ShowAutoBreaks | WSBoolOptions.ShowColumnOutline | WSBoolOptions.ShowRowOutline; this.name = name; this.parent = parent; this.rows = new ExcelRowCollection(this); this.columns = new ExcelColumnCollection(this); this.mergedRanges = new MergedCellRanges(this); this.horizontalPageBreaks = new HorizontalPageBreakCollection(); this.verticalPageBreaks = new VerticalPageBreakCollection(); this.pictures = new ExcelPictureCollection(this); this.shapes = new ExcelShapeCollection(this); this.printOptions = new ExcelPrintOptions(this); this.viewOptions = new ExcelViewOptions(this); }
private void SetWindowOption(bool val, WorksheetWindowOptions option) { this.windowOptions &= ~option; if (val) { this.windowOptions |= option; } }
public Window2Record(WorksheetWindowOptions window2Options, int firstRow, int firstColumn, int pageBreakViewZoom, int zoom) { this.smallRecord = false; this.window2Options = window2Options; this.firstRow = firstRow; this.firstColumn = firstColumn; this.pageBreakViewZoom = pageBreakViewZoom; this.zoom = zoom; }
internal ExcelWorksheet(string name, ExcelWorksheetCollection parent, ExcelWorksheet sourceWorksheet) { this.defaultColumnWidth = 2340; this.pageBreakViewZoom = 60; this.zoom = 100; this.windowOptions = WorksheetWindowOptions.DefaultGridLineColor | WorksheetWindowOptions.ShowGridLines | WorksheetWindowOptions.ShowOutlineSymbols | WorksheetWindowOptions.ShowSheetHeaders | WorksheetWindowOptions.ShowZeroValues; this.paperSize = 0; this.scalingFactor = 100; this.startPageNumber = 1; this.fitWorksheetWidthToPages = 0; this.fitWorksheetHeightToPages = 0; this.setupOptions = SetupOptions.Portrait; this.printResolution = 0; this.verticalPrintResolution = 0; this.headerMargin = 0.5; this.footerMargin = 0.5; this.numberOfCopies = 1; this.WSBoolOpt = WSBoolOptions.ColGroupRight | WSBoolOptions.RowGroupBelow | WSBoolOptions.ShowAutoBreaks | WSBoolOptions.ShowColumnOutline | WSBoolOptions.ShowRowOutline; this.name = name; this.parent = parent; this.protectedWorksheet = sourceWorksheet.protectedWorksheet; this.rows = new ExcelRowCollection(this, sourceWorksheet.rows); this.columns = new ExcelColumnCollection(this, sourceWorksheet.columns); this.defaultColumnWidth = sourceWorksheet.defaultColumnWidth; this.mergedRanges = new MergedCellRanges(this, sourceWorksheet.mergedRanges); this.WSBoolOpt = sourceWorksheet.WSBoolOpt; if (sourceWorksheet.PreservedWorksheetRecords != null) { this.PreservedWorksheetRecords = new PreservedRecords(sourceWorksheet.PreservedWorksheetRecords); } this.windowOptions = sourceWorksheet.windowOptions & ~(WorksheetWindowOptions.SheetSelected | WorksheetWindowOptions.SheetVisible); this.firstVisibleRow = sourceWorksheet.firstVisibleRow; this.firstVisibleColumn = sourceWorksheet.firstVisibleColumn; this.pageBreakViewZoom = sourceWorksheet.pageBreakViewZoom; this.zoom = sourceWorksheet.zoom; this.horizontalPageBreaks = new HorizontalPageBreakCollection(sourceWorksheet.horizontalPageBreaks); this.verticalPageBreaks = new VerticalPageBreakCollection(sourceWorksheet.verticalPageBreaks); this.paperSize = sourceWorksheet.paperSize; this.scalingFactor = sourceWorksheet.scalingFactor; this.startPageNumber = sourceWorksheet.startPageNumber; this.fitWorksheetWidthToPages = sourceWorksheet.fitWorksheetWidthToPages; this.fitWorksheetHeightToPages = sourceWorksheet.fitWorksheetHeightToPages; this.setupOptions = sourceWorksheet.setupOptions; this.printResolution = sourceWorksheet.printResolution; this.verticalPrintResolution = sourceWorksheet.verticalPrintResolution; this.headerMargin = sourceWorksheet.headerMargin; this.footerMargin = sourceWorksheet.footerMargin; this.numberOfCopies = sourceWorksheet.numberOfCopies; this.namedRanges = new NamedRangeCollection(this, sourceWorksheet.NamedRanges); this.pictures = new ExcelPictureCollection(this, sourceWorksheet.Pictures); this.shapes = new ExcelShapeCollection(this, sourceWorksheet.Shapes); this.printOptions = new ExcelPrintOptions(this); this.viewOptions = new ExcelViewOptions(this); }
public Window2Record(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) { this.window2Options = (WorksheetWindowOptions)br.ReadUInt16(); this.firstRow = br.ReadUInt16(); this.firstColumn = br.ReadUInt16(); if (bodyLength == 18) { this.smallRecord = false; br.ReadUInt16(); br.ReadUInt16(); this.pageBreakViewZoom = br.ReadUInt16(); this.zoom = br.ReadUInt16(); br.ReadUInt32(); } else { if (bodyLength != 10) { throw new Exception("Internal error: Window2 record of size " + this.BodySize); } this.smallRecord = true; br.ReadUInt32(); } }
internal void SetWindowOption(bool val, WorksheetWindowOptions option) { this.windowOptions = (WorksheetWindowOptions)Utilities.SetBit((ushort)this.windowOptions, (ushort)option, val); }
internal bool GetWindowOption(WorksheetWindowOptions option) { return(Utilities.IsBitSet((ushort)this.windowOptions, (ushort)option)); }
private bool GetWindowOption(WorksheetWindowOptions option) { return((this.windowOptions & option) != ((WorksheetWindowOptions)((short)0))); }