*/
public static POITextExtractor[] getEmbededDocsTextExtractors(POIOLE2TextExtractor ext) throws IOException {
// Find all the embeded directories
- ArrayList dirs = new ArrayList();
+ ArrayList<Entry> dirs = new ArrayList<Entry>();
POIFSFileSystem fs = ext.getFileSystem();
if(fs == null) {
throw new IllegalStateException("The extractor didn't know which POIFS it came from!");
* @author Julien Chable, CDubet
*
*/
+@Deprecated
public abstract class Package extends OPCPackage {
/**
/**
* @deprecated use {@link OPCPackage}
*/
- protected Package(PackageAccess access) {
+ @Deprecated
+ protected Package(PackageAccess access) {
super(access);
}
/**
* @deprecated use {@link OPCPackage#open(String)}
*/
+ @Deprecated
public static Package open(String path) throws InvalidFormatException {
return open(path, defaultPackageAccess);
}
/**
* @deprecated use {@link OPCPackage#open(String,PackageAccess)}
*/
+ @Deprecated
public static Package open(String path, PackageAccess access)
throws InvalidFormatException {
if (path == null || "".equals(path.trim())
/**
* @deprecated use {@link OPCPackage#open(InputStream)}
*/
+ @Deprecated
public static Package open(InputStream in) throws InvalidFormatException,
IOException {
Package pack = new ZipPackage(in, PackageAccess.READ);
/**
* @deprecated use {@link OPCPackage#openOrCreate(java.io.File)}
*/
+ @Deprecated
public static Package openOrCreate(File file) throws InvalidFormatException {
Package retPackage = null;
if (file.exists()) {
/**
* @deprecated use {@link OPCPackage#create(String)}
*/
+ @Deprecated
public static Package create(String path) {
return create(new File(path));
}
/**
* @deprecated use {@link OPCPackage#create(File)}
*/
+ @Deprecated
public static Package create(File file) {
if (file == null || (file.exists() && file.isDirectory()))
throw new IllegalArgumentException("file");
/**
* @deprecated use {@link OPCPackage#create(OutputStream)}
*/
+ @Deprecated
public static Package create(OutputStream output) {
Package pkg = null;
pkg = new ZipPackage();
case XSSFCell.CELL_TYPE_STRING: value = cell.getStringCellValue(); break;
case XSSFCell.CELL_TYPE_BOOLEAN: value += cell.getBooleanCellValue(); break;
- case XSSFCell.CELL_TYPE_ERROR: value = cell.getErrorCellString();
+ case XSSFCell.CELL_TYPE_ERROR: value = cell.getErrorCellString(); break;
case XSSFCell.CELL_TYPE_FORMULA: value = cell.getStringCellValue(); break;
case XSSFCell.CELL_TYPE_NUMERIC: value += cell.getRawValue(); break;
default: ;
xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing">
*/
if(isNew) xmlOptions.setSaveSyntheticDocumentElement(new QName(CTDrawing.type.getName().getNamespaceURI(), "wsDr", "xdr"));
- Map map = new HashMap();
+ Map<String, String> map = new HashMap<String, String>();
map.put("http://schemas.openxmlformats.org/drawingml/2006/main", "a");
map.put(STRelationshipId.type.getName().getNamespaceURI(), "r");
xmlOptions.setSaveSuggestedPrefixes(map);
}
try {
- Class cls = descriptor.getRelationClass();
+ Class<? extends POIXMLDocumentPart> cls = descriptor.getRelationClass();
Constructor<? extends POIXMLDocumentPart> constructor = cls.getDeclaredConstructor(PackagePart.class, PackageRelationship.class);
return constructor.newInstance(part, rel);
} catch (Exception e){
public POIXMLDocumentPart newDocumentPart(POIXMLRelation descriptor){
try {
- Class cls = descriptor.getRelationClass();
+ Class<? extends POIXMLDocumentPart> cls = descriptor.getRelationClass();
Constructor<? extends POIXMLDocumentPart> constructor = cls.getDeclaredConstructor();
return constructor.newInstance();
} catch (Exception e){
* @param stabilityClassifier used to optimise caching performance. Pass <code>null</code>
* for the (conservative) assumption that any cell may have its definition changed after
* evaluation begins.
- * @deprecated (Sep 2009) (reduce overloading) use {@link #create(HSSFWorkbook, IStabilityClassifier, UDFFinder)}
+ * @deprecated (Sep 2009) (reduce overloading) use {@link #create(XSSFWorkbook, org.apache.poi.ss.formula.IStabilityClassifier, org.apache.poi.hssf.record.formula.udf.UDFFinder)}
*/
- public XSSFFormulaEvaluator(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier) {
+ @Deprecated
+ public XSSFFormulaEvaluator(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier) {
_bookEvaluator = new WorkbookEvaluator(XSSFEvaluationWorkbook.create(workbook), stabilityClassifier, null);
}
private XSSFFormulaEvaluator(XSSFWorkbook workbook, IStabilityClassifier stabilityClassifier, UDFFinder udfFinder) {
XmlOptions xmlOptions = new XmlOptions(DEFAULT_XML_OPTIONS);
xmlOptions.setSaveSyntheticDocumentElement(new QName(CTWorksheet.type.getName().getNamespaceURI(), "worksheet"));
- Map map = new HashMap();
+ Map<String, String> map = new HashMap<String, String>();
map.put(STRelationshipId.type.getName().getNamespaceURI(), "r");
xmlOptions.setSaveSuggestedPrefixes(map);
private XmlOptions commit(XWPFHeaderFooter wrapper) {
XmlOptions xmlOptions = new XmlOptions(wrapper.DEFAULT_XML_OPTIONS);
- Map map = new HashMap();
+ Map<String, String> map = new HashMap<String, String>();
map.put("http://schemas.openxmlformats.org/officeDocument/2006/math", "m");
map.put("urn:schemas-microsoft-com:office:office", "o");
map.put("http://schemas.openxmlformats.org/officeDocument/2006/relationships", "r");
XmlOptions xmlOptions = new XmlOptions(DEFAULT_XML_OPTIONS);
xmlOptions.setSaveSyntheticDocumentElement(new QName(CTDocument1.type.getName().getNamespaceURI(), "document"));
- Map map = new HashMap();
+ Map<String, String> map = new HashMap<String, String>();
map.put("http://schemas.openxmlformats.org/officeDocument/2006/math", "m");
map.put("urn:schemas-microsoft-com:office:office", "o");
map.put("http://schemas.openxmlformats.org/officeDocument/2006/relationships", "r");
}
try {
- Class cls = descriptor.getRelationClass();
+ Class<? extends POIXMLDocumentPart> cls = descriptor.getRelationClass();
Constructor<? extends POIXMLDocumentPart> constructor = cls.getDeclaredConstructor(PackagePart.class, PackageRelationship.class);
return constructor.newInstance(part, rel);
} catch (Exception e){
public POIXMLDocumentPart newDocumentPart(POIXMLRelation descriptor){
try {
- Class cls = descriptor.getRelationClass();
+ Class<? extends POIXMLDocumentPart> cls = descriptor.getRelationClass();
Constructor<? extends POIXMLDocumentPart> constructor = cls.getDeclaredConstructor();
return constructor.newInstance();
} catch (Exception e){
try {
uri = new URI(s);
} catch (URISyntaxException e) {
- assertTrue(s == "[Content_Types].xml");
+ assertTrue(s.equals("[Content_Types].xml"));
continue;
}
assertFalse("This part name SHOULD NOT be valid: " + s,