Eclipse warnings, typos, ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713216 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8cff5d7e49
commit
4cdcc9fc24
@ -174,21 +174,19 @@ public class BigGridDemo {
|
||||
* @param entry the name of the sheet entry to substitute, e.g. xl/worksheets/sheet1.xml
|
||||
* @param out the stream to write the result to
|
||||
*/
|
||||
private static void substitute(File zipfile, File tmpfile, String entry, OutputStream out) throws IOException {
|
||||
private static void substitute(File zipfile, File tmpfile, String entry, OutputStream out) throws IOException {
|
||||
ZipFile zip = ZipHelper.openZipFile(zipfile);
|
||||
|
||||
try {
|
||||
ZipOutputStream zos = new ZipOutputStream(out);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Enumeration<ZipEntry> en = (Enumeration<ZipEntry>) zip.entries();
|
||||
while (en.hasMoreElements()) {
|
||||
ZipEntry ze = en.nextElement();
|
||||
if(!ze.getName().equals(entry)){
|
||||
zos.putNextEntry(new ZipEntry(ze.getName()));
|
||||
InputStream is = zip.getInputStream(ze);
|
||||
copyStream(is, zos);
|
||||
is.close();
|
||||
ZipOutputStream zos = new ZipOutputStream(out);
|
||||
|
||||
Enumeration<? extends ZipEntry> en = zip.entries();
|
||||
while (en.hasMoreElements()) {
|
||||
ZipEntry ze = en.nextElement();
|
||||
if(!ze.getName().equals(entry)){
|
||||
zos.putNextEntry(new ZipEntry(ze.getName()));
|
||||
InputStream is = zip.getInputStream(ze);
|
||||
copyStream(is, zos);
|
||||
is.close();
|
||||
}
|
||||
}
|
||||
zos.putNextEntry(new ZipEntry(entry));
|
||||
@ -198,7 +196,7 @@ public class BigGridDemo {
|
||||
|
||||
zos.close();
|
||||
} finally {
|
||||
zip.close();
|
||||
zip.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ import org.apache.poi.ss.formula.functions.*;
|
||||
|
||||
/**
|
||||
* Mappings from the Excel functions to our evaluation implementations
|
||||
* (where avilable)
|
||||
* (where available)
|
||||
*/
|
||||
public final class FunctionEval {
|
||||
/**
|
||||
|
@ -129,7 +129,7 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor
|
||||
|
||||
|
||||
/**
|
||||
* Retreives the text contents of the file
|
||||
* Retrieves the text contents of the file
|
||||
*/
|
||||
public String getText() {
|
||||
DataFormatter formatter;
|
||||
@ -194,8 +194,9 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor
|
||||
text.append(" Comment by ").append(comment.getAuthor()).append(": ").append(commentText);
|
||||
}
|
||||
|
||||
if(ri.hasNext())
|
||||
if(ri.hasNext()) {
|
||||
text.append("\t");
|
||||
}
|
||||
}
|
||||
text.append("\n");
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ import java.util.Map;
|
||||
import org.apache.poi.POIXMLDocumentPart;
|
||||
import org.apache.poi.openxml4j.opc.PackagePart;
|
||||
import org.apache.poi.openxml4j.opc.PackageRelationship;
|
||||
import org.apache.poi.util.DocumentHelper;
|
||||
import org.apache.xmlbeans.XmlException;
|
||||
import org.apache.xmlbeans.XmlOptions;
|
||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst;
|
||||
|
@ -34,7 +34,6 @@ import org.apache.poi.ss.SpreadsheetVersion;
|
||||
import org.apache.poi.ss.usermodel.BuiltinFormats;
|
||||
import org.apache.poi.ss.usermodel.FontFamily;
|
||||
import org.apache.poi.ss.usermodel.FontScheme;
|
||||
import org.apache.poi.util.DocumentHelper;
|
||||
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
|
||||
import org.apache.poi.xssf.usermodel.XSSFFactory;
|
||||
import org.apache.poi.xssf.usermodel.XSSFFont;
|
||||
|
@ -64,7 +64,6 @@ import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.util.CellReference;
|
||||
import org.apache.poi.ss.util.WorkbookUtil;
|
||||
import org.apache.poi.util.Beta;
|
||||
import org.apache.poi.util.DocumentHelper;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.apache.poi.util.Internal;
|
||||
import org.apache.poi.util.POILogFactory;
|
||||
|
@ -23,10 +23,17 @@ import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.apache.poi.hssf.HSSFTestDataSamples;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.formula.eval.BlankEval;
|
||||
import org.apache.poi.ss.formula.eval.ErrorEval;
|
||||
import org.apache.poi.ss.formula.eval.MissingArgEval;
|
||||
import org.apache.poi.ss.formula.eval.NumberEval;
|
||||
import org.apache.poi.ss.formula.eval.ValueEval;
|
||||
import org.apache.poi.ss.formula.ptg.AreaErrPtg;
|
||||
import org.apache.poi.ss.formula.ptg.AttrPtg;
|
||||
import org.apache.poi.ss.formula.ptg.DeletedArea3DPtg;
|
||||
@ -34,16 +41,6 @@ import org.apache.poi.ss.formula.ptg.DeletedRef3DPtg;
|
||||
import org.apache.poi.ss.formula.ptg.IntPtg;
|
||||
import org.apache.poi.ss.formula.ptg.Ptg;
|
||||
import org.apache.poi.ss.formula.ptg.RefErrorPtg;
|
||||
import org.apache.poi.ss.formula.eval.BlankEval;
|
||||
import org.apache.poi.ss.formula.eval.ErrorEval;
|
||||
import org.apache.poi.ss.formula.eval.MissingArgEval;
|
||||
import org.apache.poi.ss.formula.eval.NumberEval;
|
||||
import org.apache.poi.ss.formula.eval.ValueEval;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellValue;
|
||||
import org.apache.poi.ss.usermodel.FormulaEvaluator;
|
||||
@ -51,6 +48,8 @@ import org.apache.poi.ss.usermodel.Name;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Tests {@link WorkbookEvaluator}.
|
||||
|
Loading…
Reference in New Issue
Block a user