if (xfr == null) Styles styles = getWorkbook().getStyles(); xfr = styles.getNormalStyle();
if (xfr == null) Styles styles = getWorkbook().getStyles(); xfr = styles.getNormalStyle();
/** * Adds the format information to the shared records. Performs the necessary * checks (and clones) to ensure that the formats are not shared. * Called from setCellDetails and setCellFormat */ private void addCellFormat() { // Check to see if the format is one of the shared Workbook defaults. If // so, then get hold of the Workbook's specific instance Styles styles = sheet.getWorkbook().getStyles(); format = styles.getFormat(format); try { if (!format.isInitialized()) { formattingRecords.addStyle(format); } } catch (NumFormatRecordsException e) { logger.warn("Maximum number of format records exceeded. Using " + "default format."); format = styles.getNormalStyle(); } }
/** * Adds the format information to the shared records. Performs the necessary * checks (and clones) to ensure that the formats are not shared. * Called from setCellDetails and setCellFormat */ private void addCellFormat() { // Check to see if the format is one of the shared Workbook defaults. If // so, then get hold of the Workbook's specific instance Styles styles = sheet.getWorkbook().getStyles(); format = styles.getFormat(format); try { if (!format.isInitialized()) { formattingRecords.addStyle(format); } } catch (NumFormatRecordsException e) { logger.warn("Maximum number of format records exceeded. Using " + "default format."); format = styles.getNormalStyle(); } }
/** * Constructor. Creates the predetermined list of fonts */ public WritableFonts(WritableWorkbookImpl w) { super(); addFont(w.getStyles().getArial10Pt()); // Create the default fonts WritableFont f = new WritableFont(WritableFont.ARIAL); addFont(f); f = new WritableFont(WritableFont.ARIAL); addFont(f); f = new WritableFont(WritableFont.ARIAL); addFont(f); } }
/** * Constructor. Creates the predetermined list of fonts */ public WritableFonts(WritableWorkbookImpl w) { super(); addFont(w.getStyles().getArial10Pt()); // Create the default fonts WritableFont f = new WritableFont(WritableFont.ARIAL); addFont(f); f = new WritableFont(WritableFont.ARIAL); addFont(f); f = new WritableFont(WritableFont.ARIAL); addFont(f); } }