From dc0f66c44ee20858fd09f9878d546888dc0476bb Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Mon, 1 Sep 2008 16:51:09 +0000 Subject: [PATCH] DV related fixes from Pierre Lavignotte git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@691017 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hssf/usermodel/HSSFSheet.java | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java b/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java index d1c464dc32..807afae160 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java @@ -34,7 +34,14 @@ import org.apache.poi.ddf.EscherRecord; import org.apache.poi.hssf.model.FormulaParser; import org.apache.poi.hssf.model.Sheet; import org.apache.poi.hssf.model.Workbook; -import org.apache.poi.hssf.record.*; +import org.apache.poi.hssf.record.CellValueRecordInterface; +import org.apache.poi.hssf.record.DVRecord; +import org.apache.poi.hssf.record.EscherAggregate; +import org.apache.poi.hssf.record.Record; +import org.apache.poi.hssf.record.RowRecord; +import org.apache.poi.hssf.record.SCLRecord; +import org.apache.poi.hssf.record.WSBoolRecord; +import org.apache.poi.hssf.record.WindowTwoRecord; import org.apache.poi.hssf.record.aggregates.DataValidityTable; import org.apache.poi.hssf.record.formula.Ptg; import org.apache.poi.hssf.record.formula.RefPtg; @@ -366,6 +373,22 @@ public final class HSSFSheet { DVRecord dvRecord = dataValidation.createDVRecord(workbook); dvt.addDataValidation(dvRecord); } + + /** + * Get the DVRecords objects that are associated to this sheet + * @return a list of DVRecord instances + */ + public List getDVRecords() { + List dvRecords = new ArrayList(); + List records = sheet.getRecords(); + + for(int index=0; index