/** * Initializes the dvParser */ private void initialize() { if (dvParser == null) { dvParser = new DVParser(data, externalSheet, workbook, workbookSettings); } }
/** * Retrieves the data for output to binary file * * @return the data to be written */ public byte[] getData() { if (dvParser == null) { return data; } return dvParser.getData(); }
/** * Gets the range of cells to which the data validation applies. If the * validation applies to just this cell, this will be reflected in the * returned range * * @return the range to which the same validation extends, or NULL if this * cell doesn't have a validation */ public Range getSharedDataValidationRange() { if (!dataValidation) { return null; } DVParser dvp = getDVParser(); return new SheetRangeImpl(writableCell.getSheet(), dvp.getFirstColumn(), dvp.getFirstRow(), dvp.getLastColumn(), dvp.getLastRow()); } }
/** * Sets the data validation based upon a named range */ public void setDataValidationRange(String namedRange) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(namedRange); dropDown = true; dataValidation = true; }
if (!cf.getDVParser().copied()) if (!cf.getDVParser().extendedCellsValidation()) if (cv.getColumn() == cf.getDVParser().getFirstColumn() && cv.getRow() == cf.getDVParser().getFirstRow())
/** * Accessor for first column * * @return the first column */ public int getFirstColumn() { if (dvParser == null) { initialize(); } return dvParser.getFirstColumn(); }
/** * Accessor for the last column * * @return the last column */ public int getLastColumn() { if (dvParser == null) { initialize(); } return dvParser.getLastColumn(); }
/** * Accessor for first row * * @return the first row */ public int getFirstRow() { if (dvParser == null) { initialize(); } return dvParser.getFirstRow(); }
/** * Accessor for the last row * * @return the last row */ public int getLastRow() { if (dvParser == null) { initialize(); } return dvParser.getLastRow(); }
public String getValidationFormula() { try { if (dvParser == null) { initialize(); } return dvParser.getValidationFormula(); } catch (FormulaException e) { logger.warn("Cannot read drop down range " + e.getMessage()); return ""; } } }
!wcf.getDVParser().extendedCellsValidation())
sourceDataValidation.getDVParser().extendCellValidation(extraCols, extraRows);
/** * Sets the data validation based upon a named range */ public void setDataValidationRange(String namedRange) { if (dataValidation && getDVParser().extendedCellsValidation()) { logger.warn("Cannot set data validation on " + CellReferenceHelper.getCellReference(writableCell) + " as it is part of a shared data validation"); return; } clearValidationSettings(); dvParser = new DVParser(namedRange); dropDown = true; dataValidation = true; }
if (!cf.getDVParser().copied()) if (!cf.getDVParser().extendedCellsValidation()) if (cv.getColumn() == cf.getDVParser().getFirstColumn() && cv.getRow() == cf.getDVParser().getFirstRow())
/** * Accessor for first column * * @return the first column */ public int getFirstColumn() { if (dvParser == null) { initialize(); } return dvParser.getFirstColumn(); }
/** * Accessor for the last column * * @return the last column */ public int getLastColumn() { if (dvParser == null) { initialize(); } return dvParser.getLastColumn(); }
/** * Accessor for first row * * @return the first row */ public int getFirstRow() { if (dvParser == null) { initialize(); } return dvParser.getFirstRow(); }
/** * Accessor for the last row * * @return the last row */ public int getLastRow() { if (dvParser == null) { initialize(); } return dvParser.getLastRow(); }
public String getValidationFormula() { try { if (dvParser == null) { initialize(); } return dvParser.getValidationFormula(); } catch (FormulaException e) { logger.warn("Cannot read drop down range " + e.getMessage()); return ""; } } }
!wcf.getDVParser().extendedCellsValidation())