Index: org/apache/poi/hssf/model/Workbook.java =================================================================== RCS file: /home/cvspublic/jakarta-poi/src/java/org/apache/poi/hssf/model/Workbook.java,v retrieving revision 1.15 diff -r1.15 Workbook.java 1835a1836,1843 > * Returns the list of FormatRecords in the workbook. > * @return ArrayList of FormatRecords in the notebook > */ > public ArrayList getFormats() { > return formats; > } > > /** cvs server: Diffing org/apache/poi/hssf/record cvs server: Diffing org/apache/poi/hssf/record/aggregates cvs server: Diffing org/apache/poi/hssf/record/formula cvs server: Diffing org/apache/poi/hssf/usermodel Index: org/apache/poi/hssf/usermodel/HSSFCellStyle.java =================================================================== RCS file: /home/cvspublic/jakarta-poi/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java,v retrieving revision 1.10 diff -r1.10 HSSFCellStyle.java 288c288 < * set the data format (only builtin formats are supported) --- > * set the data format (must be a valid format) 298c298 < * get the index of the built in format --- > * get the index of the format Index: org/apache/poi/hssf/usermodel/HSSFDataFormat.java =================================================================== RCS file: /home/cvspublic/jakarta-poi/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java,v retrieving revision 1.2 diff -r1.2 HSSFDataFormat.java 62a63 > import java.util.Iterator; 134a136,143 > Iterator i = workbook.getFormats().iterator(); > while (i.hasNext()) { > FormatRecord r = (FormatRecord)i.next(); > if (formats.size() < r.getIndexCode() + 1) { > formats.setSize(r.getIndexCode() + 1); > } > formats.set(r.getIndexCode(), r.getFormatString()); > } 279c288 < return (String) (builtinFormats.get(index) != null ? builtinFormats.get(index) : formats.get(index)); --- > return (String) (builtinFormats.size() > index && builtinFormats.get(index) != null ? builtinFormats.get(index) : formats.get(index));