diff options
author | Noel Grandin <noel@peralex.com> | 2012-07-03 09:16:02 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-08-20 16:34:38 +0100 |
commit | 08181e1c3e0df6556f4ec8732180630a780738f0 (patch) | |
tree | d0683fb097d89c0a5323e64030e4f111d1c8d974 /xmerge | |
parent | 43c1aefd2dd5b25e1ff2cf4bf689427693a0bda1 (diff) |
Remove dead java code, fields and local variables
Change-Id: Iac80b047d990fddd3b78366843afdff77620cd7f
Diffstat (limited to 'xmerge')
36 files changed, 9 insertions, 304 deletions
diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java index 959a092e4e5a..11e62eb26892 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java @@ -83,10 +83,7 @@ public final class DocumentDeserializerImpl */ public Document deserialize() throws IOException, ConvertException { - int numberOfPDBs = cd.getNumDocuments(); Document doc = null; - int i=0; - ConvertData cdOut; Iterator<Object> e = cd.getDocumentEnumeration(); while (e.hasNext()) { PalmDocument palmDoc = (PalmDocument) e.next(); diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java index 8ab3ddf82e55..f3e9f045c957 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java @@ -79,8 +79,6 @@ public class DocumentMergerImpl implements DocumentMerger { NodeMergeAlgorithm charMerge = new CharacterBaseParagraphMerge(); DocumentMerge docMerge = new DocumentMerge(cc_, charMerge); - Iterator result = null; - docMerge.applyDifference(i1, i2, diffTable); } } diff --git a/xmerge/source/bridge/java/XMergeBridge.java b/xmerge/source/bridge/java/XMergeBridge.java index 494396cdedf2..a2c3445ff384 100644 --- a/xmerge/source/bridge/java/XMergeBridge.java +++ b/xmerge/source/bridge/java/XMergeBridge.java @@ -71,12 +71,10 @@ public class XMergeBridge { private static XMultiServiceFactory xMSF; - private static XDocumentHandler exportDocHandler=null; private static XInputStream xInStream =null; private static XOutputStream xOutStream=null; private static String udJarPath=null; private static XOutputStream xos = null; - private static XOutputStreamToOutputStreamAdapter adaptedStream=null; private static String offMime=null; private static String sdMime=null; private static String sFileName=null; @@ -150,11 +148,7 @@ public class XMergeBridge { sFileName=""; sURL=""; - String sDirectory = null; - String udConvertClass=msUserData[0]; udJarPath=msUserData[1]; - String udImport =msUserData[2]; - String udExport =msUserData[3]; offMime =msUserData[4]; sdMime = msUserData[5]; com.sun.star.io.XInputStream xis=null; @@ -231,12 +225,7 @@ public class XMergeBridge { sFileName=null; sURL=null; - String sDirectory = null; - String title=null; - String udConvertClass=msUserData[0]; udJarPath=msUserData[1]; - String udImport =msUserData[2]; - String udExport =msUserData[3]; offMime =msUserData[4]; sdMime = msUserData[5]; @@ -257,10 +246,6 @@ public class XMergeBridge { if (pValue[i].Name.compareTo("URL")==0){ sURL=(String)AnyConverter.toObject(new Type(java.lang.String.class), pValue[i].Value); } - - if (pValue[i].Name.compareTo("Title")==0){ - title=(String)AnyConverter.toObject(new Type(java.lang.String.class), pValue[i].Value); - } } catch(com.sun.star.lang.IllegalArgumentException AnyExec){ System.out.println("\nIllegalArgumentException "+AnyExec); @@ -434,7 +419,6 @@ public class XMergeBridge { String jarName = pluginUrl; String name= getFileName(FileName); - ConverterInfo converterInfo = null; Iterator<ConverterInfo> ciEnum= null; XInputStreamToInputStreamAdapter xis =new XInputStreamToInputStreamAdapter(xml); @@ -479,7 +463,6 @@ public class XMergeBridge { if (docEnum.hasNext()){ Document docOut = (Document)docEnum.next(); - String fileName = docOut.getFileName(); docOut.write(newxos); newxos.flush(); @@ -502,7 +485,6 @@ public class XMergeBridge { FileOutputStream fos = new FileOutputStream(newFile); docOut = (Document)docEnum.next(); - fileName = docOut.getFileName(); docOut.write(fos); fos.flush(); fos.close(); 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 { diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java index ba849a759a10..b268836a9a24 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java @@ -79,8 +79,6 @@ public class DocumentMergerImpl implements DocumentMerger { NodeMergeAlgorithm charMerge = new CharacterBaseParagraphMerge(); DocumentMerge docMerge = new DocumentMerge(cc_, charMerge); - Iterator result = null; - docMerge.applyDifference(i1, i2, diffTable); } } diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java index feb991a5d65c..da58d608eb71 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java @@ -184,8 +184,6 @@ class Paragraph implements PocketWordConstants { boolean inSequence = false; boolean sawText = false; - String s = new String(); // For debugging - // Start from the very beginning for (int i = 0; i < totalLength; i++) { // Will encounter at least two codes first @@ -399,7 +397,6 @@ class Paragraph implements PocketWordConstants { sb.append((char)data[i]); sawText = true; - s = sb.toString(); } } diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java index 909dc25b5530..3b267f6b2f0c 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java @@ -49,7 +49,6 @@ public class PocketWordDocument implements Document, PocketWordConstants { private DocumentDescriptor descriptor; private ArrayList<Paragraph> paragraphs; - private ParaStyle pStyle; private Paragraph currentPara; /* @@ -114,7 +113,6 @@ public class PocketWordDocument implements Document, PocketWordConstants { } byte[] font = new byte[80]; - int numfonts = 0; do { docData.read(font); @@ -308,7 +306,6 @@ public class PocketWordDocument implements Document, PocketWordConstants { paragraphs.add(para); - pStyle = style; currentPara = para; if (listElement) { diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java index 9ab74066cf5b..96a5e25cabd3 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java @@ -126,7 +126,6 @@ implements DOCConstants, OfficeConstants, DocumentDeserializer { * @param parentDoc The parent <code>Document</code>. */ private void readStyleCatalog(Document parentDoc) { - Element rootNode = null; try { java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); parentDoc.write(bos); diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java index b67b5c6600c0..b663ce3cb8d3 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java @@ -81,8 +81,6 @@ public class DocumentMergerImpl implements DocumentMerger { NodeMergeAlgorithm charMerge = new CharacterBaseParagraphMerge(); DocumentMerge docMerge = new DocumentMerge(cc_, charMerge); - Iterator result = null; - docMerge.applyDifference(i1, i2, diffTable); } } 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 bcd363e56e3a..632ef3ec1f0d 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 @@ -290,7 +290,7 @@ final class WSDecoder implements DOCConstants { } // read the number of records - unsigned 2 bytes - header.textRecordCount = dis.readShort() & 0x0000ffff; + dis.readShort(); // read the record size - unsigned 2 bytes header.textRecordSize = dis.readShort() & 0x0000ffff; @@ -327,9 +327,6 @@ final class WSDecoder implements DOCConstants { /** length of text section */ int textLen = 0; - /** number of text records */ - int textRecordCount = 0; - /** * size of a text record. This is normally the same as * TEXT_RECORD_SIZE, but some applications may modify this. diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java index 7632320cbe7d..fa2729e5940b 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java @@ -81,8 +81,6 @@ class textRecord { byte[] getBytes() { DataOutputStream os = null; // Used for storing the data ByteArrayOutputStream bs = null; // Used for storing the data - byte ftBytes[] = null; - byte ctBytes[] = null; try { bs = new ByteArrayOutputStream(); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java index 86024f138caf..d00b1e610eed 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java @@ -60,10 +60,6 @@ public class DOMDocument private String fileName = null; private String fileExt = null; - /** Resources object. */ - private Resources res = null; - - /** * Default constructor. * @@ -98,7 +94,6 @@ public class DOMDocument */ public DOMDocument(String name, String ext,boolean namespaceAware, boolean validating) { - res = Resources.getInstance(); factory.setValidating(validating); factory.setNamespaceAware(namespaceAware); this.fileExt = ext; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java index baca3dec1d80..1514e65c177d 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java @@ -83,9 +83,6 @@ public abstract class OfficeDocument private String documentName = null; private String fileName = null; - /** Resources object. */ - private Resources res = null; - /** * <code>OfficeZip</code> object to store zip contents from * read <code>InputStream</code>. Note that this member @@ -119,8 +116,6 @@ public abstract class OfficeDocument * @param validating Value for <code>validating</code> flag. */ public OfficeDocument(String name, boolean namespaceAware, boolean validating) { - - res = Resources.getInstance(); factory.setValidating(validating); factory.setNamespaceAware(namespaceAware); this.documentName = trimDocumentName(name); @@ -747,7 +742,7 @@ public abstract class OfficeDocument DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder= builderFactory.newDocumentBuilder(); DOMImplementation domImpl = builder.getDOMImplementation(); - DocumentType docType =domImpl.createDocumentType("office:document","-//OpenOffice.org//DTD OfficeDocument 1.0//EN",null); + domImpl.createDocumentType("office:document","-//OpenOffice.org//DTD OfficeDocument 1.0//EN",null); org.w3c.dom.Document newDoc = domImpl.createDocument("http://openoffice.org/2000/office","office:document",null); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java index 818a4f250db9..bc7696ebe517 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java @@ -117,7 +117,6 @@ public class StyleCatalog { for (int j = 0; j < families.length; j++) { if (families[j].equals(familyName)) { - Class<?> styleClass = classes[j]; callConstructor(classes[j], child); found = true; } @@ -322,41 +321,6 @@ public class StyleCatalog { /** - * Check whether a given node represents a <code>Style</code> - * that should be added to the catalog, and if so, return the - * class type for it. If <code>Style</code> should not be added, - * or if node is not a <code>Style</code>, return null. - * - * @param node The <code>Node</code> to be checked. - * @param families An array of <code>Style</code> families. - * @param classes An array of class types corresponding to the - * families array. - * @param defaultClass The default class. - * - * @return The class that is appropriate for this node. - */ - private Class<?> getClass(Node node, String[] families, Class<?>[] classes, - Class<?> defaultClass) { - NamedNodeMap attributes = node.getAttributes(); - if (attributes != null) { - int len = attributes.getLength(); - for (int i = 0; i < len; i++) { - Node attr = attributes.item(i); - if (attr.getNodeName().equals("style:family")) { - String familyName = attr.getNodeValue(); - for (int j = 0; j < families.length; j++) { - if (families[j].equals(familyName)) - return classes[j]; - } - return defaultClass; - } - } - } - return null; - } - - - /** * Find the family attribute of a <code>Style</code> <code>Node</code>. * * @param node The <code>Node</code> to check. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java index 5e3e84a71825..4dec10b5a477 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java @@ -259,24 +259,4 @@ public class ColumnStyle extends Style implements Cloneable { } } - private static String[] ignored = { - "fo:break-before", "fo:keep-with-next" - }; - - /* - * This code checks whether an attribute is one that we - * intentionally ignore. - * - * @param attribute The attribute to check. - * - * @return true if <code>attribute</code> can be ignored, - * otherwise false. - */ - private boolean isIgnored(String attribute) { - for (int i = 0; i < ignored.length; i++) { - if (ignored[i].equals(attribute)) - return true; - } - return false; - } } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java index a743dc6e04b4..fcdaba41edb9 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java @@ -113,8 +113,6 @@ public class DocumentMergerImpl implements DocumentMerger { NodeMergeAlgorithm rowMerger = new PositionBaseRowMerge(cc_); MergeAlgorithm merger = new SheetMerge(cc_, rowMerger); - Iterator result = null; - merger.applyDifference(i1, i2, diffResult); } } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java index 55b064f6b4b4..db3674b4c74d 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java @@ -259,24 +259,4 @@ public class RowStyle extends Style implements Cloneable { } } - private static String[] ignored = { - "fo:break-before", "fo:keep-with-next" - }; - - /* - * This code checks whether an attribute is one that we - * intentionally ignore. - * - * @param attribute The attribute to check. - * - * @return true if <code>attribute</code> can be ignored, - * otherwise false. - */ - private boolean isIgnored(String attribute) { - for (int i = 0; i < ignored.length; i++) { - if (ignored[i].equals(attribute)) - return true; - } - return false; - } } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java index 73a57401a23d..b4f5b60686ce 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java @@ -45,8 +45,6 @@ public class SheetSettings implements OfficeConstants { private int splitPointX = 0; private int splitPointY = 0; private int posLeft = 0; - private int posRight = 0; - private int posBottom = 0; private int posTop = 0; private int paneNumber = 2; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java index 82ab17fafaca..a8c971695fb2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java @@ -53,15 +53,6 @@ import org.w3c.dom.NodeList; public abstract class SxcDocumentSerializer implements OfficeConstants, DocumentSerializer { - /** The cell foreground <code>Color</code>. */ - private Color foreground = Color.black; - - /** The cell background <code>Color</code>. */ - private Color background = Color.white; - - /** The cell format. */ - private long format = 0; - /** <code>Format</code> object describing the cell. */ private Format fmt = null; @@ -85,9 +76,6 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, */ private ArrayList<ColumnRowInfo> ColumnRowList; - /** Width, in characters, of the current cell display data. */ - private int displayWidth = 0; - /** * A <code>SpreadsheetEncoder</code> object for encoding to * appropriate format. @@ -270,8 +258,6 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, Debug.log(Debug.TRACE, "<NAMED:EXPRESSIONS>"); - NamedNodeMap att = node.getAttributes(); - if (node.hasChildNodes()) { NodeList nodeList = node.getChildNodes(); @@ -638,9 +624,6 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, if (tableValueTypeNode != null) { - // Make sure we initialize to 0 the width of the current cell - displayWidth = 0; - String cellType = tableValueTypeNode.getNodeValue(); @@ -759,9 +742,6 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } } - // Clear out format for current cell after it is written - format = 0; - // Increase the column counter by the number of times the // last cell was repeated. colID += colsRepeated; @@ -952,20 +932,5 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, return decimals; } - /* - * Utility method to retrieve a Node attribute. - */ - private String getAttribute (Node node, String attribute) { - NamedNodeMap attrNodes = node.getAttributes(); - - if (attrNodes != null) { - Node attr = attrNodes.getNamedItem(attribute); - if (attr != null) { - return attr.getNodeValue(); - } - } - return null; - } - } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java index caf135382277..b162827b40a2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java @@ -63,7 +63,6 @@ public final class DocumentDeserializerImpl implements DocumentDeserializer,URIResolver { /** A <code>ConvertData</code> object assigned to this object. */ - private InputStream is = null; private ConvertData cd = null; private PluginFactoryImpl pluginFactory = null; @@ -101,7 +100,6 @@ public final class DocumentDeserializerImpl Iterator<Object> enumerate = cd.getDocumentEnumeration(); org.w3c.dom.Document domDoc=null; DOMDocument docOut=null; - GenericOfficeDocument doc = null; ByteArrayOutputStream baos =null; GenericOfficeDocument sxwDoc = new GenericOfficeDocument("output"); while (enumerate.hasNext()) { diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java index d26c0fae5fb4..26a763eb6f5d 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java @@ -79,8 +79,6 @@ public class DocumentMergerImpl implements DocumentMerger { NodeMergeAlgorithm charMerge = new CharacterBaseParagraphMerge(); DocumentMerge docMerge = new DocumentMerge(cc_, charMerge); - Iterator result = null; - docMerge.applyDifference(i1, i2, diffTable); } } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java index 8de934082dee..911e6a6599f5 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java @@ -180,7 +180,6 @@ public final class DocumentSerializerImpl System.out.println("\n Error with Xslt\n"); } - String ext = pluginFactory.getDeviceFileExtension(); DOMDocument resultDomDoc=(DOMDocument)pluginFactory.createDeviceDocument(docName,new ByteArrayInputStream(baos.toByteArray())); cd.addDocument (resultDomDoc); return cd; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java index d152b52f04fd..b92b25ee23c2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java @@ -42,8 +42,6 @@ import org.openoffice.xmerge.util.Resources; */ public final class CellNodeIterator extends NodeIterator { - private Resources res = Resources.getInstance(); - // can be expanded to an array in the future, not necessary right now private static final String SUPPORTED_TAG1 = OfficeConstants.TAG_TABLE_CELL; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java index 0d2a3aa67b64..77bc4732452e 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java @@ -73,24 +73,6 @@ public class CharArrayLCSAlgorithm { return diffArray; } - - /** - * Debug function Used to print out the nicely formatted - * difference table. - * - * @param diffTable The difference table to display. - */ - private void printDiffTable(int[][] diffTable) { - - for (int i = 0; i < diffTable.length; i++) { - for (int j = 0; j < diffTable[i].length; j++) { - System.out.print(" " + diffTable[i][j] + " "); - } - System.out.println(); - } - } - - /** * Create the difference table. * The difference table is used internal to keep track what diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java index ec93778a78de..7a0cdf2c4680 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java @@ -73,9 +73,6 @@ public class IteratorRowCompare implements DiffAlgorithm { */ public Difference[] computeDiffs(Iterator orgSeq, Iterator modSeq) { - int orgSeqlen = orgSeq.elementCount(); - int modSeqlen = modSeq.elementCount(); - ArrayList<Difference> diffVector = new ArrayList<Difference>(); // i and j are counters to keep track the current position in the diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java index bb7b35ae8cc4..1327e4b36b2e 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java @@ -39,14 +39,6 @@ public final class ObjectArrayIterator implements Iterator { /** - * Private default constructor. - */ - private ObjectArrayIterator() { - // do not allow user new a ObjectArrayIterator without argument - } - - - /** * Standard constructor. * * @param objArray The <code>Object</code> array. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java index ef816b6d9e57..7564f23d866c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java @@ -33,8 +33,6 @@ import org.openoffice.xmerge.util.Resources; */ public final class RowIterator extends NodeIterator { - private Resources res = Resources.getInstance(); - // TODO: should compare the ConverterCapabilities supported feature only! // otherwise even though one with a chart, one without, will still be // considered to be not equivalent. 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 37917a1d47b3..d9a691f0d79b 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 @@ -38,11 +38,6 @@ public final class CharacterBaseParagraphMerge implements NodeMergeAlgorithm { - private class cacheCharArray { - public cacheCharArray(int cacheSize) { - } - } - /** * Merge two paragraph <code>Node</code> by using Longest Common @@ -79,9 +74,7 @@ public final class CharacterBaseParagraphMerge Difference[] diffs) { List<TextNodeEntry> orgNodeList = orgParser.getNodeList(); - List<TextNodeEntry> modNodeList = modParser.getNodeList(); int diffCount = 0; - int modNodeListCnt = 0; int numNode = orgNodeList.size(); for (int i = 0; i < numNode; i++) { diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java index b79a4e11caf4..cb60e1614b2a 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java @@ -101,8 +101,6 @@ public class DocumentMerge implements MergeAlgorithm { int operation = currentDiff.getOperation(); - Object currentElement; - switch (operation) { case Difference.DELETE: @@ -132,11 +130,9 @@ public class DocumentMerge implements MergeAlgorithm { // empty } - currentElement = orgSeq.currentElement(); - for (; orgSeqCounter < currentDiff.getOrgPosition(); - orgSeqCounter++, currentElement = orgSeq.next()) { + orgSeqCounter++, orgSeq.next()) { // empty } @@ -159,11 +155,9 @@ public class DocumentMerge implements MergeAlgorithm { // empty } - currentElement = orgSeq.currentElement(); - for (; orgSeqCounter < currentDiff.getOrgPosition(); - orgSeqCounter++, currentElement = orgSeq.next()) { + orgSeqCounter++, orgSeq.next()) { // empty } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java index 37b504132f95..20b5ce5b437a 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java @@ -226,14 +226,6 @@ public class ConverterInfo { /** - * Create a default constructor so we can use isValidOfficeType - * without having to actually have a valid ConverterInfo. - */ - private ConverterInfo() { - } - - - /** * Returns an instance of the DocumentDeserializerFactory interface. * * @return instance of the DocumentDeserializer for this ConverterInfo. |