private void openOOXML(InputStream zipFile) throws IOException { try(ZipInputStream zis = new ZipInputStream(zipFile)) { ZipEntry zipEntry; while ((zipEntry = zis.getNextEntry()) != null) { if (endsWithIgnoreCase(zipEntry.getName(), VBA_PROJECT_OOXML)) { try { // Make a NPOIFS from the contents, and close the stream this.fs = new POIFSFileSystem(zis); return; } catch (IOException e) { // Tidy up zis.close(); // Pass on throw e; } } } } throw new IllegalArgumentException("No VBA project found"); }
if(endsWithIgnoreCase(cellRef, "#REF!")) { throw new IllegalArgumentException("Cell reference invalid: " + cellRef);
System.arraycopy(pictureBytes, idxStart, pdfBytes, 0, pictureBytesLen); String filename = source.getShapeName().trim(); if (!endsWithIgnoreCase(filename, ".pdf")) { filename += ".pdf";
private void openOOXML(InputStream zipFile) throws IOException { try(ZipInputStream zis = new ZipInputStream(zipFile)) { ZipEntry zipEntry; while ((zipEntry = zis.getNextEntry()) != null) { if (endsWithIgnoreCase(zipEntry.getName(), VBA_PROJECT_OOXML)) { try { // Make a NPOIFS from the contents, and close the stream this.fs = new POIFSFileSystem(zis); return; } catch (IOException e) { // Tidy up zis.close(); // Pass on throw e; } } } } throw new IllegalArgumentException("No VBA project found"); }
if(endsWithIgnoreCase(cellRef, "#REF!")) { throw new IllegalArgumentException("Cell reference invalid: " + cellRef);
System.arraycopy(pictureBytes, idxStart, pdfBytes, 0, pictureBytesLen); String filename = source.getShapeName().trim(); if (!endsWithIgnoreCase(filename, ".pdf")) { filename += ".pdf";