From 52f728ef2b3d8bfe24bfcd3c0bffdd0c7758e5f3 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Mon, 4 Jul 2016 01:49:28 +0000 Subject: [PATCH] bug 59773: replace for loops with for-each loops; javadocs fixes for JDK8 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751193 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hssf/record/CFRuleBase.java | 2 ++ .../hdgf/extractor/VisioTextExtractor.java | 23 +++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/java/org/apache/poi/hssf/record/CFRuleBase.java b/src/java/org/apache/poi/hssf/record/CFRuleBase.java index 3554039af2..e3ccaf6a6c 100644 --- a/src/java/org/apache/poi/hssf/record/CFRuleBase.java +++ b/src/java/org/apache/poi/hssf/record/CFRuleBase.java @@ -424,6 +424,8 @@ public abstract class CFRuleBase extends StandardRecord implements Cloneable { * One approach might be to apply the inverse of SharedFormulaRecord.convertSharedFormulas(Stack, int, int) * Note - two extra parameters (rowIx & colIx) will be required. They probably come from one of the Region objects. * + * @param formula The formula to parse, excluding the leading equals sign. + * @param sheet The sheet that the formula is on. * @return null if formula was null. */ public static Ptg[] parseFormula(String formula, HSSFSheet sheet) { diff --git a/src/scratchpad/src/org/apache/poi/hdgf/extractor/VisioTextExtractor.java b/src/scratchpad/src/org/apache/poi/hdgf/extractor/VisioTextExtractor.java index 6629187886..fae6e3f5c2 100644 --- a/src/scratchpad/src/org/apache/poi/hdgf/extractor/VisioTextExtractor.java +++ b/src/scratchpad/src/org/apache/poi/hdgf/extractor/VisioTextExtractor.java @@ -35,8 +35,8 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem; /** * Class to find all the text in a Visio file, and return it. - * Can opperate on the command line (outputs to stdout), or - * can return the text for you (eg for use with Lucene). + * Can operate on the command line (outputs to stdout), or + * can return the text for you (example: for use with Lucene). */ public final class VisioTextExtractor extends POIOLE2TextExtractor { private HDGFDiagram hdgf; @@ -61,11 +61,13 @@ public final class VisioTextExtractor extends POIOLE2TextExtractor { /** * Locates all the text entries in the file, and returns their * contents. + * + * @return An array of each Text item in the document */ public String[] getAllText() { ArrayList text = new ArrayList(); - for(int i=0; i\n */ + @Override public String getText() { StringBuffer text = new StringBuffer(); - String[] allText = getAllText(); - for(int i=0; i