summaryrefslogtreecommitdiff
path: root/xmerge/source/pexcel/java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-07-03 09:16:02 +0200
committerCaolán McNamara <caolanm@redhat.com>2012-08-20 16:34:38 +0100
commit08181e1c3e0df6556f4ec8732180630a780738f0 (patch)
treed0683fb097d89c0a5323e64030e4f111d1c8d974 /xmerge/source/pexcel/java
parent43c1aefd2dd5b25e1ff2cf4bf689427693a0bda1 (diff)
Remove dead java code, fields and local variables
Change-Id: Iac80b047d990fddd3b78366843afdff77620cd7f
Diffstat (limited to 'xmerge/source/pexcel/java')
-rw-r--r--xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelEncoder.java13
-rw-r--r--xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java7
-rw-r--r--xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java4
-rw-r--r--xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java6
-rw-r--r--xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java35
-rw-r--r--xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java3
-rw-r--r--xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java14
7 files changed, 5 insertions, 77 deletions
diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelEncoder.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelEncoder.java
index ce5779cf1e75..a0942a538ec4 100644
--- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelEncoder.java
+++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelEncoder.java
@@ -218,19 +218,6 @@ final class PocketExcelEncoder extends SpreadsheetEncoder {
wb.addSettings(s);
}
- /**
- * This method sets the format of a cell to <i>string</i>.
- *
- * @param format The cell format-may already contain display info,
- * such as alignment or font type.
- *
- * @return The updated format of the cell.
- */
- private long setFormatString(long format) {
-
- return 0;
- }
-
/**
* Set a cell's formatting options via a separately create
diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java
index 23650d110ab3..f9d2399af2e3 100644
--- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java
+++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java
@@ -38,7 +38,6 @@ import org.openoffice.xmerge.util.Debug;
*/
public class Worksheet {
- private String name;
private Workbook wb;
private ArrayList<Row> rows = new ArrayList<Row>();
private ArrayList<ColInfo> colInfo = new ArrayList<ColInfo>();
@@ -133,7 +132,7 @@ public class Worksheet {
case PocketExcelConstants.BOOLERR_CELL:
Debug.log(Debug.TRACE,"BOOLERR: Cell Value, Boolean or Error (05h)");
- BoolErrCell bec = new BoolErrCell(is);
+ new BoolErrCell(is);
break;
case PocketExcelConstants.FORMULA_CELL:
@@ -144,7 +143,7 @@ public class Worksheet {
case PocketExcelConstants.FORMULA_STRING:
Debug.log(Debug.TRACE,"String Value of a Formula (07h)");
- StringValue sv = new StringValue(is);
+ new StringValue(is);
break;
case PocketExcelConstants.ROW_DESCRIPTION:
@@ -170,7 +169,7 @@ public class Worksheet {
case PocketExcelConstants.NUMBER_FORMAT:
Debug.log(Debug.TRACE,"FORMAT: Number Format (1Eh)");
- NumberFormat nf = new NumberFormat(is);
+ new NumberFormat(is);
break;
case PocketExcelConstants.DEFAULT_ROW_HEIGHT:
diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java
index cc9f5806a354..506fd2777cf3 100644
--- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java
+++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java
@@ -82,10 +82,6 @@ public class FormulaCompiler {
return pt.getTokenID() == TokenConstants.TARGSEP;
}
- private boolean isBinaryOperator(Token pt) {
- return false;
- }
-
/**
* Re-order into Infix format
* @param tokens The tokens in RPN form
diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java
index fa3a183413d2..b852ce1c4688 100644
--- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java
+++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java
@@ -51,17 +51,15 @@ public class FormulaHelper {
* Sets the workbook cache so that global data such as
* <code>DefinedNames</code>, <code>Boundsheets</code> can be read
*
- * @param wb Wrokbook object containing all the global data
+ * @param wb Workbook object containing all the global data
*/
public void setWorkbook(Workbook wb) {
-
encoder.setWorkbook(wb);
decoder.setWorkbook(wb);
- parser.setWorkbook(wb);
}
/**
- * Convertes a string representation of a calc formula into an array of PocketXL bytes
+ * Converts a string representation of a calc formula into an array of PocketXL bytes
* @param formula The Formula String (e.g. 1+SUM(A1,B1))
*
* @throws UnsupportedFunctionException Thrown if a function in the formula is nto supported by Pocket Excel
diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java
index db7c8e59d180..813cf0a42908 100644
--- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java
+++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java
@@ -42,7 +42,6 @@ public class FormulaParser {
private int index = 1;
private TokenFactory tokenFactory;
private ArrayList<Token> tokenVector;
- private Workbook wb;
/**
* Default constructor
@@ -55,14 +54,6 @@ public class FormulaParser {
}
/**
- *
- */
- public void setWorkbook(Workbook wb) {
-
- this.wb = wb;
- }
-
- /**
* Parse method for parsing from a String to a byte[]
*
* @param formula A <code>String</code> representation of a formula
@@ -126,22 +117,6 @@ public class FormulaParser {
}
/**
- * Identify <, >, <=, >=, =, <>
- *
- * @param op The <code>String</code> which is to be identified
- * @return A boolean returning the result of the comparison
- */
- private boolean isLogicalOp(String op) {
- return ((op.compareTo(">") == 0) ||
- (op.compareTo("<") == 0) ||
- (op.compareTo(">=") == 0) ||
- (op.compareTo("<=") == 0) ||
- (op.compareTo("=") == 0) ||
- (op.compareTo("<>") == 0));
- }
-
-
- /**
* Identify characters that MAY be logical operator characters
*
* @param c The character which is to be identified
@@ -191,16 +166,6 @@ public class FormulaParser {
return (c == '%');
}
- /**
- * Identify letters or numbers
- *
- * @param c The character which is to be identified
- * @return A boolean returning the result of the comparison
- */
- private boolean isAlphaNum(char c) {
- return(isAlpha(c) || isDigit(c));
- }
-
/**
* Identify valid Characters for cell references
*
diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java
index 171abb0fdbb1..36a1cdde38e0 100644
--- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java
+++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java
@@ -47,7 +47,6 @@ public class TokenDecoder {
private TokenFactory tf;
private FunctionLookup fl;
private OperatorLookup operatorLookup;
- private OperandLookup operandLookup;
private Workbook wb;
/**
@@ -59,7 +58,6 @@ public class TokenDecoder {
tf = new TokenFactory();
fl = new FunctionLookup();
operatorLookup = new OperatorLookup();
- operandLookup = new OperandLookup();
}
/**
@@ -86,7 +84,6 @@ public class TokenDecoder {
ByteArrayInputStream bis = new ByteArrayInputStream(formula);
int b = 0 ;
- Token t;
while ((b = bis.read())!=-1)
{
diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java
index 2d26654d0a2c..7c25d6f5f9e9 100644
--- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java
+++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java
@@ -40,7 +40,6 @@ import org.openoffice.xmerge.util.EndianConverter;
*/
public class TokenEncoder {
- private FunctionLookup fl;
private String parseString;
private int index;
private Workbook wb;
@@ -49,9 +48,7 @@ public class TokenEncoder {
* Default Constructor
*/
public TokenEncoder() {
-
parseString = new String();
- fl = new FunctionLookup();
}
/**
@@ -212,16 +209,6 @@ public class TokenEncoder {
return(Character.isDigit(c));
}
- /**
- * Identify letters or numbers
- *
- * @param c The character which is to be identified
- * @return A boolean returning the result of the comparison
- */
- private boolean isAlphaNum(char c) {
- return(isAlpha(c) || isDigit(c));
- }
-
/**
* Parses a column reference and returns it's integer equivalent. (eg.
* A=0, D=3, BA=27)
@@ -261,7 +248,6 @@ public class TokenEncoder {
private int row() {
char ch = parseString.charAt(index);
String rowStr = new String();
- int row = 0;
boolean status = true;
do {