PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352840
13f79535-47bb-0310-9956-
ffa450edef68
return -1;
}
+ /**
+ * Returns the list of FormatRecords in the workbook.
+ * @return ArrayList of FormatRecords in the notebook
+ */
+ public ArrayList getFormats() {
+ return formats;
+ }
+
/**
* Creates a FormatRecord, inserts it, and returns the index code.
* @param format the format string
}
/**
- * set the data format (only builtin formats are supported)
+ * set the data format (must be a valid format)
* @see org.apache.poi.hssf.usermodel.HSSFDataFormat
*/
}
/**
- * get the index of the built in format
+ * get the index of the format
* @see org.apache.poi.hssf.usermodel.HSSFDataFormat
*/
if (movedBuiltins)
return ( String ) formats.get(index);
else
- 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));
}
/**