/* ==================================================================== Licensed to the Apache Software Foundation (ASF) Under one or more contributor license agreements. See the NOTICE file distributed with this work for Additional information regarding copyright ownership. The ASF licenses this file to You Under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed Under the License is distributed on an "AS Is" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations Under the License. ==================================================================== */ namespace HH.WMS.Utils.NPOI.HSSF.UserModel { using System; using System.Text; using HH.WMS.Utils.NPOI.HSSF.Record; /// /// Used to modify the print Setup. /// @author Shawn Laubach (slaubach at apache dot org) /// public class HSSFPrintSetup :HH.WMS.Utils.NPOI.SS.UserModel.IPrintSetup { PrintSetupRecord printSetupRecord; /// /// Initializes a new instance of the class. /// /// Takes the low level print Setup record. public HSSFPrintSetup(PrintSetupRecord printSetupRecord) { this.printSetupRecord = printSetupRecord; } /// /// Gets or sets the size of the paper. /// /// The size of the paper. public short PaperSize { get { return printSetupRecord.PaperSize; } set { printSetupRecord.PaperSize = value; } } /// /// Gets or sets the scale. /// /// The scale. public short Scale { get { return printSetupRecord.Scale; } set { printSetupRecord.Scale = value; } } /// /// Gets or sets the page start. /// /// The page start. public short PageStart { get { return printSetupRecord.PageStart; } set { printSetupRecord.PageStart=value; } } /// /// Gets or sets the number of pages wide to fit sheet in. /// /// the number of pages wide to fit sheet in public short FitWidth { get { return printSetupRecord.FitWidth; } set { printSetupRecord.FitWidth = value; } } /// /// Gets or sets number of pages high to fit the sheet in /// /// number of pages high to fit the sheet in. public short FitHeight { get { return printSetupRecord.FitHeight; } set { printSetupRecord.FitHeight = value; } } /// /// Gets or sets the bit flags for the options. /// /// the bit flags for the options. public short Options { get { return printSetupRecord.Options; } set { printSetupRecord.Options=(value); } } /// /// Gets or sets the left to right print order. /// /// the left to right print order. public bool LeftToRight { get { return printSetupRecord.LeftToRight; } set { printSetupRecord.LeftToRight = value; } } /// /// Gets or sets the landscape mode. /// /// the landscape mode. public bool Landscape { get { return !printSetupRecord.Landscape; } set { printSetupRecord.Landscape = !value; } } /// /// Gets or sets the valid Settings. /// /// the valid Settings. public bool ValidSettings { get { return printSetupRecord.ValidSettings; } set { printSetupRecord.ValidSettings = value; } } /// /// Gets or sets the black and white Setting. /// /// black and white Setting public bool NoColor { get { return printSetupRecord.NoColor; } set { printSetupRecord.NoColor=value; } } public bool EndNote { get { return printSetupRecord.EndNote; } set { printSetupRecord.EndNote = value; } } public HH.WMS.Utils.NPOI.SS.UserModel.DisplayCellErrorType CellError { get { return (HH.WMS.Utils.NPOI.SS.UserModel.DisplayCellErrorType)printSetupRecord.CellError; } set { printSetupRecord.CellError=(short)value; } } /// /// Gets or sets the draft mode. /// /// the draft mode. public bool Draft { get { return printSetupRecord.Draft; } set { printSetupRecord.Draft = value; } } /// /// Gets or sets the print notes. /// /// the print notes. public bool Notes { get { return printSetupRecord.Notes; } set { printSetupRecord.Notes = value; } } /// /// Gets or sets a value indicating whether [no orientation]. /// /// true if [no orientation]; otherwise, false. public bool NoOrientation { get { return printSetupRecord.NoOrientation; } set { printSetupRecord.NoOrientation = value; } } /// /// Gets or sets the use page numbers. /// /// use page numbers. public bool UsePage { get { return printSetupRecord.UsePage; } set { printSetupRecord.UsePage = value; } } /// /// Gets or sets the horizontal resolution. /// /// the horizontal resolution. public short HResolution { get { return printSetupRecord.HResolution; } set { printSetupRecord.HResolution = value; } } /// /// Gets or sets the vertical resolution. /// /// the vertical resolution. public short VResolution { get { return printSetupRecord.VResolution; } set { printSetupRecord.VResolution = value; } } /// /// Gets or sets the header margin. /// /// The header margin. public double HeaderMargin { get { return printSetupRecord.HeaderMargin; } set { printSetupRecord.HeaderMargin=value; } } /// /// Gets or sets the footer margin. /// /// The footer margin. public double FooterMargin { get { return printSetupRecord.FooterMargin; } set { printSetupRecord.FooterMargin = value; } } /// /// Gets or sets the number of copies. /// /// the number of copies. public short Copies { get { return printSetupRecord.Copies; } set { printSetupRecord.Copies = value; } } } }