Ejemplo n.º 1
0
        /**
         * Copy constructor.  Called when copying sheets
         * @param copy the settings to copy
         */
        public SheetSettings(SheetSettings copy,Sheet s)
        {
            Assert.verify(copy != null);

            sheet = s;  // for internal use when accessing ranges
            orientation = copy.orientation;
            pageOrder = copy.pageOrder;
            paperSize = copy.paperSize;
            sheetProtected = copy.sheetProtected;
            hidden = copy.hidden;
            selected = false; // don't copy the selected flag
            headerMargin = copy.headerMargin;
            footerMargin = copy.footerMargin;
            scaleFactor = copy.scaleFactor;
            pageStart = copy.pageStart;
            fitWidth = copy.fitWidth;
            fitHeight = copy.fitHeight;
            horizontalPrintResolution = copy.horizontalPrintResolution;
            verticalPrintResolution = copy.verticalPrintResolution;
            leftMargin = copy.leftMargin;
            rightMargin = copy.rightMargin;
            topMargin = copy.topMargin;
            bottomMargin = copy.bottomMargin;
            fitToPages = copy.fitToPages;
            password = copy.password;
            passwordHash = copy.passwordHash;
            defaultColumnWidth = copy.defaultColumnWidth;
            defaultRowHeight = copy.defaultRowHeight;
            zoomFactor = copy.zoomFactor;
            pageBreakPreviewMagnification = copy.pageBreakPreviewMagnification;
            normalMagnification = copy.normalMagnification;
            showGridLines = copy.showGridLines;
            displayZeroValues = copy.displayZeroValues;
            pageBreakPreviewMode = copy.pageBreakPreviewMode;
            horizontalFreeze = copy.horizontalFreeze;
            verticalFreeze = copy.verticalFreeze;
            horizontalCentre = copy.horizontalCentre;
            verticalCentre = copy.verticalCentre;
            copies = copy.copies;
            header = new HeaderFooter(copy.header);
            footer = new HeaderFooter(copy.footer);
            automaticFormulaCalculation = copy.automaticFormulaCalculation;
            recalculateFormulasBeforeSave = copy.recalculateFormulasBeforeSave;

            if (copy.printArea != null)
                {
                printArea = new SheetRangeImpl
                  (sheet,
                   copy.getPrintArea().getTopLeft().getColumn(),
                   copy.getPrintArea().getTopLeft().getRow(),
                   copy.getPrintArea().getBottomRight().getColumn(),
                   copy.getPrintArea().getBottomRight().getRow());
                }

            if (copy.printTitlesRow != null)
                {
                printTitlesRow = new SheetRangeImpl
                  (sheet,
                   copy.getPrintTitlesRow().getTopLeft().getColumn(),
                   copy.getPrintTitlesRow().getTopLeft().getRow(),
                   copy.getPrintTitlesRow().getBottomRight().getColumn(),
                   copy.getPrintTitlesRow().getBottomRight().getRow());
                }

            if (copy.printTitlesCol != null)
                {
                printTitlesCol = new SheetRangeImpl
                  (sheet,
                   copy.getPrintTitlesCol().getTopLeft().getColumn(),
                   copy.getPrintTitlesCol().getTopLeft().getRow(),
                   copy.getPrintTitlesCol().getBottomRight().getColumn(),
                   copy.getPrintTitlesCol().getBottomRight().getRow());
                }
        }
Ejemplo n.º 2
0
 /**
  * Default constructor
  */
 public SheetSettings(Sheet s)
 {
     sheet = s; // for internal use, when accessing ranges
     orientation = DEFAULT_ORIENTATION;
     pageOrder = DEFAULT_ORDER;
     paperSize = DEFAULT_PAPER_SIZE;
     sheetProtected = false;
     hidden = false;
     selected = false;
     headerMargin = DEFAULT_HEADER_MARGIN;
     footerMargin = DEFAULT_FOOTER_MARGIN;
     horizontalPrintResolution = DEFAULT_PRINT_RESOLUTION;
     verticalPrintResolution = DEFAULT_PRINT_RESOLUTION;
     leftMargin = DEFAULT_WIDTH_MARGIN;
     rightMargin = DEFAULT_WIDTH_MARGIN;
     topMargin = DEFAULT_HEIGHT_MARGIN;
     bottomMargin = DEFAULT_HEIGHT_MARGIN;
     fitToPages = false;
     showGridLines = true;
     printGridLines = false;
     printHeaders = false;
     pageBreakPreviewMode = false;
     displayZeroValues = true;
     defaultColumnWidth = DEFAULT_DEFAULT_COLUMN_WIDTH;
     defaultRowHeight = DEFAULT_DEFAULT_ROW_HEIGHT;
     zoomFactor = DEFAULT_ZOOM_FACTOR;
     pageBreakPreviewMagnification = DEFAULT_PAGE_BREAK_PREVIEW_MAGNIFICATION;
     normalMagnification = DEFAULT_NORMAL_MAGNIFICATION;
     horizontalFreeze = 0;
     verticalFreeze = 0;
     copies = 1;
     header = new HeaderFooter();
     footer = new HeaderFooter();
     automaticFormulaCalculation = true;
     recalculateFormulasBeforeSave = true;
 }
Ejemplo n.º 3
0
 /**
  * Sets the orientation
  *
  * @param o the orientation
  */
 public void setOrientation(PageOrientation o)
 {
     orientation = o;
 }
Ejemplo n.º 4
0
 /**
  * Sets the paper orientation for printing this sheet
  *
  * @param po the orientation
  */
 public void setOrientation(PageOrientation po)
 {
     orientation = po;
 }
Ejemplo n.º 5
0
 /**
  * Constructor, taking the sheet settings.  This object just
  * takes the various fields from the bean in which it is interested
  *
  * @param the sheet settings
  */
 public SetupRecord(SheetSettings s)
     : base(Type.SETUP)
 {
     orientation = s.getOrientation();
     order = s.getPageOrder();
     headerMargin = s.getHeaderMargin();
     footerMargin = s.getFooterMargin();
     paperSize = s.getPaperSize().getValue();
     horizontalPrintResolution = s.getHorizontalPrintResolution();
     verticalPrintResolution = s.getVerticalPrintResolution();
     fitWidth = s.getFitWidth();
     fitHeight = s.getFitHeight();
     pageStart = s.getPageStart();
     scaleFactor = s.getScaleFactor();
     copies = s.getCopies();
     initialized = true;
 }