diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-13 10:08:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-13 10:24:10 +0200 |
commit | 34bcf9b498bccb5c924f4cec850ff15d88df6f07 (patch) | |
tree | 4d9604ec8c3b73639338ec45a0618b5daa5cf0ed /xmerge | |
parent | 347926e8e57c1825261daa46c1886aa2ebf9571b (diff) |
java: remove dead methods
found by UCDetector
Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
Diffstat (limited to 'xmerge')
19 files changed, 14 insertions, 580 deletions
diff --git a/xmerge/source/bridge/java/XMergeBridge.java b/xmerge/source/bridge/java/XMergeBridge.java index 72771f5b56ab..65e8504fd4a5 100644 --- a/xmerge/source/bridge/java/XMergeBridge.java +++ b/xmerge/source/bridge/java/XMergeBridge.java @@ -280,25 +280,7 @@ public class XMergeBridge { return true; } - public String replace(String origString, String origChar, String replaceChar){ - String tmp=""; - int index=origString.indexOf(origChar); - if(index !=-1){ - while (index !=-1){ - String first =origString.substring(0,index); - first=first.concat(replaceChar); - tmp=tmp.concat(first); - origString=origString.substring(index+1,origString.length()); - index=origString.indexOf(origChar); - if(index==-1) { - tmp=tmp.concat(origString); - } - } - - } - return tmp; - } private String needsMask(String origString){ if (origString.contains("&")) { diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java index c3a12fef4cbb..d95e37cdc815 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java @@ -221,61 +221,7 @@ public class Convert implements Cloneable { } } - /** - * NEW (HJ): - * Convert the input specified in calls to the <code>addInputStream</code> - * method to the output format specified by this <code>Convert</code> - * class. - * The (de)serializer may use the URLs to resolve links and choose name(s) - * for destination document(s). - * - * @return The output data. - * - * @param sFromURL URL of the source document (may be null if unknown) - * @param sToURL URL of the destination document (may be null if unknown) - * - * @throws ConvertException If any conversion error occurs. - * @throws IOException If any I/O error occurs. - */ - public ConvertData convert(String sFromURL, String sToURL) throws - ConvertException, IOException { - - ConvertData dataOut = new ConvertData(); - - if (toOffice) { - - // From device format to Office format - - DocumentDeserializerFactory myDocDeserializerFactory = - ci.getDocDeserializerFactory(); - DocumentDeserializer deser = - myDocDeserializerFactory.createDocumentDeserializer(inputCD); - Document officeDoc = deser instanceof DocumentSerializer2 ? - ((DocumentDeserializer2) deser).deserialize(sFromURL,sToURL) : - deser.deserialize(); - - - dataOut.addDocument(officeDoc); - return dataOut; - - } else { - // From Office format to device format - - DocumentSerializerFactory myDocSerializerFactory = - ci.getDocSerializerFactory(); - - Iterator<Object> e = inputCD.getDocumentEnumeration(); - - Document doc = (Document) e.next(); - DocumentSerializer ser = myDocSerializerFactory.createDocumentSerializer(doc); - dataOut = ser instanceof DocumentSerializer2 ? - ((DocumentSerializer2) ser).serialize(sFromURL,sToURL) : - ser.serialize(); - - return dataOut; - } - } /** * Returns the appropriate "Office" <code>Document</code> @@ -296,22 +242,6 @@ public class Convert implements Cloneable { } - /** - * Returns the appropriate "Device" <code>Document</code> - * object for this plug-in. - * - * @param name The name of the <code>Document</code> to create. - * @param is The <code>InputStream</code> corresponding to the - * <code>Document</code> to create. - * - * @return The appropriate "Device" <code>Document</code> - * object for this plug-in. - * - * @throws IOException If any I/O error occurs. - */ - public Document getDeviceDocument(String name, InputStream is) - throws IOException { - return(ci.getPluginFactory().createDeviceDocument(name, is)); - } + } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java index ccd03e227327..75417be8c527 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java @@ -34,29 +34,7 @@ import org.openoffice.xmerge.util.registry.ConverterInfoMgr; */ public class ConverterFactory { - /** - * Confirms whether or not a particular conversion can be done - * based on the Mime types of the files to be converted to and - * from. - * - * @param mimeTypeIn The mime input type. - * @param mimeTypeOut The mime output type. - * - * @return true if the conversion is possible, false otherwise. - */ - public boolean canConvert(String mimeTypeIn, String mimeTypeOut) { - - ConverterInfo foundInfo; - // findConverterInfo expects the second paramenter to be the - // destination MimeType - if (ConverterInfo.isValidOfficeType(mimeTypeOut)) - foundInfo = ConverterInfoMgr.findConverterInfo(mimeTypeIn, mimeTypeOut); - else - foundInfo = ConverterInfoMgr.findConverterInfo(mimeTypeOut, mimeTypeIn); - - return foundInfo != null; - } /** 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 37480d7cbd61..475a7d166f5d 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 @@ -337,16 +337,7 @@ public class DOMDocument } - /** - * Initializes a new DOM <code>Document</code> with the content - * containing minimum XML tags. - * - * @throws IOException If any I/O error occurs. - */ - public final void initContentDOM() throws IOException { - contentDoc = createDOM(""); - } /** * <p>Creates a new DOM <code>Document</code> containing minimum diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java index 5e34469f9a49..961fc444d54e 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java @@ -332,60 +332,9 @@ public final class PalmDB { } - /** - * Write out the number of Records followed by what - * will be written out by each <code>Record</code> object. - * - * @param os The <code>OutputStream</code> to write the - * object. - * - * @throws IOException If any I/O error occurs. - */ - public void write(OutputStream os) throws IOException { - - DataOutputStream out = new DataOutputStream(os); - // write out PDB name - out.write(bName); - // write out 2 bytes for number of records - out.writeShort(records.length); - // let each Record object write out its own info. - for (Record record : records) { - record.write(out); - } - } - - /** - * Read the necessary data to create a PDB from - * the <code>InputStream</code>. - * - * @param is The <code>InputStream</code> to read data - * in order to restore the object. - * - * @throws IOException If any I/O error occurs. - */ - public void read(InputStream is) throws IOException { - - DataInputStream in = new DataInputStream(is); - - // read in the PDB name. - byte[] bytes = new byte[NAME_LENGTH]; - in.readFully(bytes); - store(bytes); - - // read in number of records - int nrec = in.readUnsignedShort(); - records = new Record[nrec]; - - // read in the Record infos - for (int i = 0; i < nrec; i++) { - - records[i] = new Record(); - records[i].read(in); - } - } /** * Override equals method of <code>Object</code>. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java index d63156248fee..a9658c96af30 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java @@ -55,80 +55,7 @@ import java.io.DataInputStream; public final class PdbDecoder { - /** - * <p>This method decodes a PDB file into a <code>PalmDB</code> - * object.</p> - * - * <p>First, the header data is read using the <code>PdbHeader</code> - * <code>read</code> method. Next, the RecordList section is - * read and the <code>Record</code> offsets are stored for use when - * parsing the Records. Based on these offsets, the bytes - * corresponding to each <code>Record</code> are read and each is - * stored in a <code>Record</code> object. Lastly, the data is - * used to create a <code>PalmDB</code> object.</p> - * - * @param fileName PDB file name. - * - * @throws IOException If I/O error occurs. - */ - public PalmDB parse(String fileName) throws IOException { - - RandomAccessFile file = new RandomAccessFile(fileName, "r"); - - // read the PDB header - PdbHeader header = new PdbHeader(); - header.read(file); - - Record recArray[] = new Record[header.numRecords]; - if (header.numRecords != 0) { - - // read in the record indices + offsets - - int recOffset[] = new int[header.numRecords]; - byte recAttrs[] = new byte[header.numRecords]; - - for (int i = 0; i < header.numRecords; i++) { - - recOffset[i] = file.readInt(); - // read in attributes (1 byte) + unique id (3 bytes) - // take away the unique id, store the attributes - - int attr = file.readInt(); - recAttrs[i] = (byte) (attr >>> 24); - } - - - // read the records - - int lastIndex = header.numRecords - 1; - - for (int i = 0; i < lastIndex; i++) { - - file.seek(recOffset[i]); - int len = recOffset[i+1] - recOffset[i]; - byte[] bytes = new byte[len]; - file.readFully(bytes); - recArray[i] = new Record(bytes, recAttrs[i]); - } - - // last record - file.seek(recOffset[lastIndex]); - int len = (int) file.length() - recOffset[lastIndex]; - byte[] bytes = new byte[len]; - file.readFully(bytes); - recArray[lastIndex] = new Record(bytes, recAttrs[lastIndex]); - - } - - file.close(); - - // create PalmDB and return it - PalmDB pdb = new PalmDB(header.pdbName, header.creatorID, - header.typeID, header.version, header.attribute, recArray); - - return pdb; - } /** * <p>This method decodes a PDB file into a <code>PalmDB</code> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java index a2ddbb19574b..85147c7980e2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java @@ -33,59 +33,8 @@ public final class PdbUtil { final static int HEADER_SIZE = 78; - /** - * <p>This method converts a 4 letter string into the Palm ID - * integer.</p> - * - * <p>It is normally used to convert the Palm creator ID string into - * the integer version of it. Also use for data types, etc.</p> - * - * @param s Four character <code>String</code>. - * - * @return Palm ID representing the <code>String</code>. - * - * @throws ArrayIndexOutOfBoundsException If <code>String</code> - * parameter contains less than four characters. - */ - public static int intID(String s) { - // grab the first char and put it in the high bits - // note that we only want 8 lower bits of it. - int temp = s.charAt(0); - int id = temp << 24; - // grab the second char and add it in. - temp = s.charAt(1) & 0x00ff; - id += temp << 16; - // grab the second char and add it in. - temp = s.charAt(2) & 0x00ff; - id += temp << 8; - - // grab the last char and add it in - id += s.charAt(3) & 0x00ff; - - return id; - } - - - /** - * This method converts an integer into a <code>String</code> - * given the Palm ID format. - * - * @param i Palm ID. - * - * @return <code>String</code> representation. - */ - public static String stringID(int i) { - - char ch[] = new char[4]; - ch[0] = (char) (i >>> 24); - ch[1] = (char) ((i >> 16) & 0x00ff); - ch[2] = (char) ((i >> 8) & 0x00ff); - ch[3] = (char) (i & 0x00ff); - - return new String(ch); - } } 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 f3909beab31d..b90a285938ce 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 @@ -338,52 +338,6 @@ public abstract class OfficeDocument } /** - * Returns the embedded object corresponding to the name provided. - * The name should be stripped of any preceding path characters, such as - * '/', '.' or '#'. - * - * @param name The name of the embedded object to retrieve. - * - * @return An <code>EmbeddedObject</code> instance representing the named - * object. - */ - public EmbeddedObject getEmbeddedObject(String name) { - if (name == null) { - return null; - } - - if (embeddedObjects == null) { - getEmbeddedObjects(); - } - - if (embeddedObjects.containsKey(name)) { - return embeddedObjects.get(name); - } - else { - return null; - } - } - - - /** - * Adds a new embedded object to the document. - * - * @param embObj An instance of <code>EmbeddedObject</code>. - */ - public void addEmbeddedObject(EmbeddedObject embObj) { - if (embObj == null) { - return; - } - - if (embeddedObjects == null) { - embeddedObjects = new HashMap<String, EmbeddedObject>(); - } - - embeddedObjects.put(embObj.getName(), embObj); - } - - - /** * Read the Office <code>Document</code> from the given * <code>InputStream</code>. * 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 44eb33c3bdfc..4ed8f865c9bf 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 @@ -331,31 +331,10 @@ public class ParaStyle extends Style implements Cloneable { } - /** - * Check whether an attribute is set in this <code>Style</code>. - * - * @param attrIndex The attribute index to check. - * - * @return true if the attribute at specified index is set, - * false otherwise. - */ - public boolean isAttributeSet(int attrIndex) { - return isSet[attrIndex]; - } - /** - * Get the value of an integer attribute. - * - * @param attrIndex Index of the attribute. - * - * @return Value of the attribute, 0 if not set. - */ - public int getAttribute(int attrIndex) { - if (isSet[attrIndex]) - return value[attrIndex]; - else return 0; - } + + /** diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/Style.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/Style.java index 6e85a41706f6..1f5bcd5ce44c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/Style.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/Style.java @@ -181,19 +181,7 @@ public class Style { } - /** - * Write this <code>Style</code> object's attributes to the given - * <code>Node</code>. This may involve writing child - * <code>Node</code> objects as well. This is similar to the - * <code>writeNode</code> method, but the <code>Node</code> - * already exists, and this does <b>not</b> write the name, - * family, and parent attributes, which are assumed to already - * exist in the <code>Node</code>. - * - * @param node The <code>Node</code> to add style attributes. - */ - public void writeAttributes(Node node) { - } + /** 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 c60c43b0848e..70ac5cebfd35 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 @@ -231,20 +231,7 @@ public class StyleCatalog { } - /** - * Given a <code>Style</code> <code>s</code>, return the - * <code>style</code> that is the closest match. Not currently - * implemented. - * - * @param s <code>Style</code> to match. - * - * @return The <code>Style</code> that most closely matches. - */ - public Style getBestMatch(Style s) { - // DJP: is this needed? - // DJP ToDo: implement this - return null; - } + /** @@ -290,33 +277,7 @@ public class StyleCatalog { } - /** - * Dump the <code>Style</code> table in Comma Separated Value (CSV) - * format - * - * @param para If true, dump in paragraph <code>Style</code>, - * otherwise dump in text style. - */ - public void dumpCSV(boolean para) { - if (!para) { - TextStyle.dumpHdr(); - int nStyles = styles.size(); - for (int i = 0; i < nStyles; i++) { - Style s = styles.get(i); - if (s.getClass().equals(TextStyle.class)) - ((TextStyle)s).dumpCSV(); - } - } else { - ParaStyle.dumpHdr(); - int nStyles = styles.size(); - for (int i = 0; i < nStyles; i++) { - Style s = styles.get(i); - if (s.getClass().equals(ParaStyle.class)) - ((ParaStyle)s).dumpCSV(); - } - } - } /** diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java index b04579bde788..c3b4857e7f5c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java @@ -258,36 +258,10 @@ public class TextStyle extends Style implements Cloneable { } - /** - * Return true if text <code>attribute</code> is set in this - * <code>Style</code>. An attribute that is set may have a - * value of <i>on</i> or <i>off</i>. - * - * @param attribute The attribute to check ({@link #BOLD}, - * {@link #ITALIC}, etc.). - * - * @return true if text <code>attribute</code> is set in this - * <code>Style</code>, false otherwise. - */ - public boolean isSet(int attribute) { - return (!((mask & attribute) == 0)); - } - /** - * Return true if the <code>attribute</code> is set to <i>on</i> - * - * @param attribute Attribute to check ({@link #BOLD}, - * {@link #ITALIC}, etc.) - * - * @return true if <code>attribute</code> is set to <i>on</i>, - * otherwise false. - */ - public boolean getAttribute(int attribute) { - if ((mask & attribute) == 0) - return false; - return (!((values & attribute) == 0)); - } + + /** @@ -335,19 +309,7 @@ public class TextStyle extends Style implements Cloneable { } - /** - * Set the font and/or background <code>Color</code> for this - * <code>Style</code>. - * - * @param fontColor The font <code>Color</code> to set. - * @param backgroundColor The background <code>Color</code> to set. - */ - public void setColors(Color fontColor, Color backgroundColor) { - if (fontColor != null) - this.fontColor = fontColor; - if (backgroundColor != null) - this.bgColor = backgroundColor; - } + /** diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java index bd47df2bb70b..20f1a790dcce 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java @@ -69,14 +69,7 @@ public class BookSettings implements OfficeConstants { this.hasColumnRowHeaders = hasColumnRowHeaders; } - /** - * Get the flag indicating whether we have row/column headers. - * - * @return Flag indicating whether we have row/column headers. - */ - public boolean hasColumnRowHeaders() { - return hasColumnRowHeaders; - } + /** * Gets the <code>Vector</code> of <code>SheetSettings</code> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java index c0925599d3ec..3bf1dc70c2ec 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java @@ -169,20 +169,7 @@ public class Format implements Cloneable { return (!((attributes & attribute) == 0)); } - /** - * Return true if text <code>attribute</code> is set in this - * <code>Style</code>.An attribute that is set may have a - * value of <i>on</i> or <i>off</i>. - * - * @param attribute The attribute to check ({@link #BOLD}, - * {@link #ITALIC}, etc.). - * - * @return true if text <code>attribute</code> is set in this - * <code>Style</code>, false otherwise. - */ - public boolean isSet(int attribute) { - return (!((mask & attribute) == 0)); - } + /** * Set the formatting category of this object, ie number, date, 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 23d6f794c6e1..be2b5ccc3db5 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 @@ -142,18 +142,7 @@ public class SheetSettings implements OfficeConstants { return (new Point(splitTypeX, splitTypeY)); } - /** - * Sets the top row visible in the lower pane and the leftmost column - * visibile in the right pane. - * - * @param top The top row visible in the lower pane - * @param left The leftmost column visibile in the right pane - */ - public void setTopLeft(int top, int left) { - posLeft = left; - posTop = top; - } /** * Gets the leftmost column visibile in the right pane. 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 3cc0a35e6b39..3b79122f32f6 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 @@ -41,15 +41,7 @@ public abstract class SpreadsheetEncoder { public abstract void createWorksheet(String sheetName) throws IOException; - /** - * Set a cell's formatting options via a separately create - * <code>Format</code> object. - * - * @param row The row number of the cell to be changed - * @param column The column number of the cell to be changed - * @param fmt Object containing formatting settings for this cell. - */ - public abstract void setCellFormat(int row, int column, Format fmt); + /** @@ -73,12 +65,7 @@ public abstract class SpreadsheetEncoder { public abstract int getNumberOfSheets(); - /** - * Get the names of the sheets in the WorkBook. - * - * @param sheet The required sheet. - */ - public abstract String getSheetName(int sheet); + /** diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Iterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Iterator.java index 7a35abb03bd8..ae4988676052 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Iterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Iterator.java @@ -37,13 +37,7 @@ public interface Iterator { public Object next(); - /** - * Move to previous element in the sequence. - * - * @return The <code>Object</code> of the previous element in the sequence. - * If there is no previous element, then return null. - */ - public Object previous(); + /** @@ -55,13 +49,7 @@ public interface Iterator { public Object start(); - /** - * Move to the end of the sequence. - * - * @return The <code>Object</code> of the last element in the sequence. - * If it is empty, then return null. - */ - public Object end(); + /** diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.java index 03722fb309ca..cf137abc6052 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.java @@ -192,37 +192,10 @@ public final class Debug { } - /** - * Prints out information regarding platform. - */ - public static void logSystemInfo() { - if (writer != null) { - writer.println(); - writer.println("Platform Information:"); - writer.println("OS : " + System.getProperty("os.name")); - writer.println("Version : " + System.getProperty("os.version")); - writer.println("Platform : " + System.getProperty("os.arch")); - writer.println("JDK Version : " + System.getProperty("java.version")); - writer.println("JDK Vendor : " + System.getProperty("java.vendor")); - writer.println(); - } - } - /** - * Prints out timestamp. - */ - public static void logTime() { - - if (writer != null) { - - Date time = Calendar.getInstance().getTime(); - DateFormat dt = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL); - writer.println(dt.format(time)); - } - } /** @@ -300,29 +273,6 @@ public final class Debug { } - /** - * Converts the given bytes to a <code>String</code> of - * Hex digits. - * - * @param bytes <code>byte</code> array. - * - * @return Hex representation in a <code>String</code>. - */ - public static String byteArrayToHexString(byte bytes[]) { - - StringBuffer buff = new StringBuffer(); - - for (int i = 0; i < bytes.length; i++) { - int ch = (bytes[i] & 0xff); - String str = Integer.toHexString(ch); - if (str.length() < 2) - buff.append('0'); - buff.append(str); - buff.append(' '); - } - - return buff.toString(); - } } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java index 3b28d2f5ce8f..854be77254b7 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java @@ -58,17 +58,7 @@ public class TwipsConverter { return twips; } - /** - * <p>Convert from twips to cm's</p> - * - * @param value The <code>short</code> to be converted. - * - * @return float containing the converted - */ - public static float twips2inches(int value) { - return (float) value/1440; - } |