diff options
author | Dominik Stadler <centic@apache.org> | 2013-08-23 18:54:05 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2013-08-23 18:54:05 +0000 |
commit | fb90b50dbfc2e916401fd38c64a7f0f7461254d7 (patch) | |
tree | f27335340bb764e7d268a022ad930c803ea0e807 /src/java | |
parent | fa39b0e7918aff2f6280dbf89ffe2614e7257a84 (diff) | |
download | poi-fb90b50dbfc2e916401fd38c64a7f0f7461254d7.tar.gz poi-fb90b50dbfc2e916401fd38c64a7f0f7461254d7.zip |
Some Eclipse warnings removed
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1516980 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/poi/ss/formula/FormulaRenderer.java | 3 | ||||
-rw-r--r-- | src/java/org/apache/poi/ss/formula/ptg/Area3DPtg.java | 6 | ||||
-rw-r--r-- | src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/java/org/apache/poi/ss/formula/FormulaRenderer.java b/src/java/org/apache/poi/ss/formula/FormulaRenderer.java index 13c1eef56f..78eb16ddbb 100644 --- a/src/java/org/apache/poi/ss/formula/FormulaRenderer.java +++ b/src/java/org/apache/poi/ss/formula/FormulaRenderer.java @@ -49,8 +49,7 @@ public class FormulaRenderer { } Stack<String> stack = new Stack<String>(); - for (int i=0 ; i < ptgs.length; i++) { - Ptg ptg = ptgs[i]; + for (Ptg ptg : ptgs) { // TODO - what about MemNoMemPtg? if(ptg instanceof MemAreaPtg || ptg instanceof MemFuncPtg || ptg instanceof MemErrPtg) { // marks the start of a list of area expressions which will be naturally combined diff --git a/src/java/org/apache/poi/ss/formula/ptg/Area3DPtg.java b/src/java/org/apache/poi/ss/formula/ptg/Area3DPtg.java index 2bee023b6e..a5f1001a16 100644 --- a/src/java/org/apache/poi/ss/formula/ptg/Area3DPtg.java +++ b/src/java/org/apache/poi/ss/formula/ptg/Area3DPtg.java @@ -17,10 +17,10 @@ package org.apache.poi.ss.formula.ptg; -import org.apache.poi.ss.util.AreaReference; import org.apache.poi.ss.formula.ExternSheetReferenceToken; import org.apache.poi.ss.formula.FormulaRenderingWorkbook; import org.apache.poi.ss.formula.WorkbookDependentFormula; +import org.apache.poi.ss.util.AreaReference; import org.apache.poi.util.LittleEndianInput; import org.apache.poi.util.LittleEndianOutput; @@ -61,6 +61,7 @@ public final class Area3DPtg extends AreaPtgBase implements WorkbookDependentFor setExternSheetIndex(externIdx); } + @Override public String toString() { StringBuffer sb = new StringBuffer(); sb.append(getClass().getName()); @@ -72,12 +73,14 @@ public final class Area3DPtg extends AreaPtgBase implements WorkbookDependentFor return sb.toString(); } + @Override public void write(LittleEndianOutput out) { out.writeByte(sid + getPtgClass()); out.writeShort(field_1_index_extern_sheet); writeCoordinates(out); } + @Override public int getSize() { return SIZE; } @@ -99,6 +102,7 @@ public final class Area3DPtg extends AreaPtgBase implements WorkbookDependentFor public String toFormulaString(FormulaRenderingWorkbook book) { return ExternSheetNameResolver.prependSheetName(book, field_1_index_extern_sheet, formatReferenceAsString()); } + @Override public String toFormulaString() { throw new RuntimeException("3D references need a workbook to determine formula text"); } diff --git a/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java b/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java index 4499319b62..a0bb8f696e 100644 --- a/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java +++ b/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java @@ -39,6 +39,7 @@ public final class AreaPtg extends Area2DPtgBase { public AreaPtg(AreaReference areaRef) { super(areaRef); } + @Override protected byte getSid() { return sid; } |