diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-21 08:58:57 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-28 16:15:43 +0200 |
commit | 0439c5189a81aa74e2e998b773cf7a4b1271c83f (patch) | |
tree | 44ac85dc15e09c73b248680543a976bd84f0dc70 /xmerge | |
parent | 59c05d030e6e95924ef442b23b86b674518e593b (diff) |
Java cleanup - remove unused local fields and variables and parameters
Change-Id: I5114bf2e390f3f5052819710329a789fc78c60f2
Diffstat (limited to 'xmerge')
13 files changed, 14 insertions, 81 deletions
diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelDecoder.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelDecoder.java index a8736046a3fc..6115c14e123e 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelDecoder.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelDecoder.java @@ -62,17 +62,8 @@ final class PocketExcelDecoder extends SpreadsheetDecoder { /** * Constructor creates a Pocket Excel WorkBook. - * - * @param name The name of the WorkBook. - * @param worksheetNames set of Strings equivalent to the worksheets - * contained in the workbook - * @param password The password for the workBook. - * - * @throws IOException If any I/O error occurs. */ - PocketExcelDecoder(String name, String[] worksheetNames, String password) throws IOException { - super(name, password); - + PocketExcelDecoder() { fmt = new Format(); } 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 a0942a538ec4..e642bff4fb30 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 @@ -43,15 +43,11 @@ final class PocketExcelEncoder extends SpreadsheetEncoder { * Constructor creates a Pocket Excel WorkBook. * * @param name The name of the WorkBook. - * @param password The password for the WorkBook. * * @throws IOException If any I/O error occurs. */ - PocketExcelEncoder(String name, String password) throws IOException { - - super(name, password); + PocketExcelEncoder(String name) throws IOException { wb = new Workbook(name); - } diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentDeserializerImpl.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentDeserializerImpl.java index 3a7fc7c5f689..1bff41db1377 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentDeserializerImpl.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentDeserializerImpl.java @@ -63,8 +63,7 @@ public final class SxcDocumentDeserializerImpl extends SxcDocumentDeserializer { */ public SpreadsheetDecoder createDecoder(String workbook, String[] worksheetNames, String password) throws IOException { - - return new PocketExcelDecoder(workbook, worksheetNames, password); + return new PocketExcelDecoder(); } diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentSerializerImpl.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentSerializerImpl.java index 2689e2488c6b..bf3c3a803682 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentSerializerImpl.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentSerializerImpl.java @@ -60,11 +60,11 @@ public final class SxcDocumentSerializerImpl extends SxcDocumentSerializer { // contain a path or the file extension. String docName = sxcDoc.getName(); - // TODO - get real values for password when implemnted in XML + // TODO - get real values for password when implemented in XML // Passwords are not currently stored in StarCalc XML format. String password = null; - encoder = new PocketExcelEncoder(docName, password); + encoder = new PocketExcelEncoder(docName); // get dom document org.w3c.dom.Document domDoc = sxcDoc.getContentDOM(); diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java index 9441c81cde8c..c5b12ce0e354 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java @@ -140,7 +140,7 @@ final class WSDecoder implements DOCConstants { while (curIndex < rawData.length) { if (WsePara.isValid(rawData, curIndex)) { v.add(new WsePara(rawData, curIndex)); - curIndex = WsePara.computeNewIndex(rawData, curIndex); + curIndex = WsePara.computeNewIndex(curIndex); } else if (WseTextRun.isValid(rawData, curIndex)) { v.add(new WseTextRun(rawData, curIndex, fontTable, colorTable)); curIndex = WseTextRun.computeNewIndex(rawData, curIndex); diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java index 3d7cec7b259b..e8136328bde5 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java @@ -51,7 +51,6 @@ final class WSEncoder { private short version; private int textLen; private short maxRecSize; - private int textRecCount = 0; /* WordSmith document elements. */ diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java index b50d3e50f6ad..dc860584f291 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java @@ -29,37 +29,6 @@ package org.openoffice.xmerge.converter.xml.sxw.wordsmith; abstract class Wse { /** - * Return true if <code>dataArray[startIndex]</code> is the start - * of a valid element of this type. - * - * @param dataArray <code>byte</code> array. - * @param startIndex The start index. - * - * @return true if <code>dataArray[startIndex]</code> is the - * start of a valid element of this type, false otherwise. - */ - static boolean isValid(byte dataArray[], int startIndex) { - return false; - } - - - /** - * Compute and return the index of the first <code>byte</code> - * following this element. It is assumed that the element - * starting at <code>dataArray[startIndex]</code> is valid. - * - * @param dataArray <code>byte</code> array. - * @param startIndex The start index. - * - * @return The index of the first <code>byte</code> following - * this element. - */ - static int computeNewIndex(byte dataArray[], int startIndex) { - return 0; - } - - - /** * Return the total number of bytes needed to represent this * object. * diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java index 3e18805557e9..c620f2127f9e 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java @@ -84,12 +84,11 @@ class WseHeader extends Wse { * following this element. It is assumed that the element * starting at <code>dataArray[startIndex]</code> is valid. * - * @param dataArray <code>byte</code> array. * @param startIndex The start index. * * @return The first <code>byte</code> following this element. */ - static int computeNewIndex(byte dataArray[], int startIndex) { + static int computeNewIndex(int startIndex) { return startIndex + 18; } diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java index 166f55088b01..e9b33d69788c 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java @@ -155,13 +155,12 @@ class WsePara extends Wse { * <code>dataArray[startIndex]</code> is the beginning of a valid * paragraph descriptor. * - * @param dataArray <code>byte</code> array. * @param startIndex The start index. * * @return The index of the first <code>byte</code> following the * paragraph description. */ - static int computeNewIndex(byte dataArray[], int startIndex) { + static int computeNewIndex(int startIndex) { return startIndex + 13; } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java index 8d7761f63ffa..82650fd7c8f6 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java @@ -27,14 +27,12 @@ import org.openoffice.xmerge.util.Debug; abstract class conversionAlgorithm { - int I(String val) { - return 0; - } + abstract int I(String val); } - /* - * This algorithm expects only values in millimeters, e.g. "20.3mm". - */ +/** + * This algorithm expects only values in millimeters, e.g. "20.3mm". + */ class horizSize extends conversionAlgorithm { int I(String value) { if (value.endsWith("mm")) { diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java index c54ccea7b89b..380497d60463 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java @@ -32,12 +32,6 @@ import org.openoffice.xmerge.ConvertData; public abstract class SpreadsheetDecoder { /** - * Constructor for creating new <code>SpreadsheetDecoder</code>. - */ - public SpreadsheetDecoder(String name, String password) throws IOException { - } - - /** * Returns the total number of sheets in the WorkBook. * * @return The number of sheets in the WorkBook. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java index bb2c0af88309..aae852c1d6a4 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java @@ -33,17 +33,6 @@ public abstract class SpreadsheetEncoder { /** - * Creates new SpreadsheetEncoder. - * - * @param name The name of the WorkBook to be created. - * @param password An optional password for the WorkBook. - * - * @throws IOException If any I/O error occurs. - */ - public SpreadsheetEncoder(String name, String password) throws IOException { } - - - /** * Create a new WorkSheet within the WorkBook. * * @param sheetName The name of the WorkSheet. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java index d9a691f0d79b..36c1b72c856b 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java @@ -130,14 +130,14 @@ public final class CharacterBaseParagraphMerge orgTextNode.endChar() + ">"); Debug.log(Debug.INFO, " extraChar value <" + extraChar + ">"); - coreMerge(orgDiffCount, diffCount, diffs, orgParser, + coreMerge(orgDiffCount, diffCount, diffs, modParser, orgTextNode, extraChar); } } } private void coreMerge(int startDiffNum, int endDiffNum, Difference[] diffs, - CharacterParser orgParser, CharacterParser modParser, + CharacterParser modParser, TextNodeEntry orgTextNode, int extraChar) { Node orgNode = orgTextNode.node(); |