diff options
author | Bálint Dózsa <dozsabalint@gmail.com> | 2011-02-15 11:34:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-02-15 11:34:08 +0000 |
commit | eb726f281df215ed0158732c178c69adc1bad5da (patch) | |
tree | 01b52b47b3aecb659ec14469dff9da1721001409 /xmerge | |
parent | ef0534f8446028a57ed0aebd3d19d2a5cc662faa (diff) |
Remove dead codes
Diffstat (limited to 'xmerge')
16 files changed, 0 insertions, 104 deletions
diff --git a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java index 37768fa4fb02..cd872329b596 100644 --- a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java +++ b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java @@ -111,8 +111,6 @@ final class MinicalcDecoder extends SpreadsheetDecoder { Debug.log(Debug.ERROR, "MinicalcDecoder.constructor:" + e.getMessage()); throw new IOException(e.getMessage()); - // e.printStackTrace(); - } } @@ -237,8 +235,6 @@ final class MinicalcDecoder extends SpreadsheetDecoder { Debug.log(Debug.ERROR, "MinicalcDecoder.setWorksheet:" + e.getMessage()); throw new IOException(e.getMessage()); - // e.printStackTrace(); - } } @@ -286,8 +282,6 @@ final class MinicalcDecoder extends SpreadsheetDecoder { Debug.log(Debug.ERROR, "MinicalcDecoder.goToNextCell:" + e.getMessage()); throw new IOException(e.getMessage()); - // e.printStackTrace(); - } return gotCell; diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java index fe61eb3c5ee8..28c7b627cf59 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java @@ -57,7 +57,6 @@ public class BeginningOfFile implements BIFFRecord { setSubStreamWBGlobal(); else setSubStreamWorkSheet(); - // this.subStream = EndianConverter.writeShort(dt); } public BeginningOfFile(InputStream is) throws IOException { @@ -73,12 +72,10 @@ public class BeginningOfFile implements BIFFRecord { } private void setSubStreamWBGlobal() { - // subStream = new byte[] {0x05}; subStream = EndianConverter.writeShort((short) 0x05); } private void setSubStreamWorkSheet() { - // subStream = new byte[] {0x10}; subStream = EndianConverter.writeShort((short) 0x10); } diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java index 91186fa27c3c..9211bfb8e2bf 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java @@ -79,7 +79,6 @@ public class CodePage implements BIFFRecord { int numOfBytesRead = input.read(codepage); numOfBytesRead += input.read(unknown1); numOfBytesRead += input.read(unknown2); - // numOfBytesRead += input.read(unknown3); unknown3 = (byte) input.read(); numOfBytesRead++; 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 2e060ca0a148..ff1facbcc279 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 @@ -154,7 +154,6 @@ public class FormulaCompiler { bPop = false; } else { tmpTok = (Token)evalStack.pop(); - //if (!(isOpenBrace(tmpTok) || isParamDelimiter(tmpTok))) { //Don't output brackets and commas if (!isParamDelimiter(tmpTok)) { //Don't output commas rpnExpr.add(tmpTok); } 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 29098b72cc17..91c0074f4698 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 @@ -551,15 +551,5 @@ implements DOCConstants, OfficeConstants, DocumentDeserializer { Debug.log(Debug.TRACE, str); } - - - /* - public static void main(String args[]) { - - // DocumentDeserializerImpl d = new DocumentDeserializerImpl(new InputStream()); - - Node nodes[] = parseText("Tab here:\tThen some more text"); - } -*/ } 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 36b21e21b931..bbd105a2097f 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 @@ -261,30 +261,13 @@ class WsePara extends Wse { temp = firstIndent / 1.6; values[2] = (new Double(temp)).toString() + "mm"; -/* if ((lineSpace & LS_MULTIPLE) != 0) { - temp = (lineSpace & LS_VALUEMASK) / 2; - temp *= 100; - values[3] = (new Double(temp)).toString() + "%"; - } else { - values[3] = (new Double(temp)).toString() + "mm"; - // DJP: handle other cases - } -*/ temp = spaceBefore / 1.6; -// values[4] = (new Double(temp)).toString() + "mm"; values[3] = (new Double(temp)).toString() + "mm"; temp = spaceAfter / 1.6; -// values[5] = (new Double(temp)).toString() + "mm"; values[4] = (new Double(temp)).toString() + "mm"; switch (misc) { - -// case ALIGN_RIGHT: values[6] = "right"; break; -// case ALIGN_LEFT: values[6] = "left"; break; -// case ALIGN_CENTER:values[6] = "center"; break; -// case ALIGN_JUST: values[6] = "justified"; break; - case ALIGN_RIGHT: values[5] = "right"; break; case ALIGN_LEFT: values[5] = "left"; break; case ALIGN_CENTER:values[5] = "center"; break; 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 e14ce25999db..9ba4aca7cf41 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 @@ -202,7 +202,6 @@ public class DOMDocument builder = factory.newDocumentBuilder(); } catch (ParserConfigurationException ex) { System.out.println("Error:"+ ex); - //throw new OfficeDocumentException(ex); } try { @@ -211,7 +210,6 @@ public class DOMDocument } catch (SAXException ex) { System.out.println("Error:"+ ex); - //throw new OfficeDocumentException(ex); } } 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 d3372be5a757..a6be6c044852 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 @@ -531,13 +531,9 @@ public abstract class OfficeDocument } else{ try{ - //System.out.println("\nParsing Input stream, validating?: "+builder.isValidating()); - //contentDoc= builder.parse((InputStream)is); - Reader r = secondHack(is); InputSource ins = new InputSource(r); org.w3c.dom.Document newDoc = builder.parse(ins); - //org.w3c.dom.Document newDoc = builder.parse((InputStream)is); Element rootElement=newDoc.getDocumentElement(); NodeList nodeList; @@ -829,13 +825,11 @@ public abstract class OfficeDocument } byte contentBytes[] = docToBytes(newDoc); - //System.out.println(new String(contentBytes)); os.write(contentBytes); } catch(Exception exc){ System.out.println("\nException in OfficeDocument.write():" +exc); } - //byte contentBytes[] = docToBytes(contentDoc); } } 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 e68327792374..1fc12df46fb8 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 @@ -532,8 +532,6 @@ public class ParaStyle extends Style implements Cloneable { for (int i = 0; i < NR_PROPERTIES; i++) { if (ps.isSet[i]) { - // if (!isSet[i]) return false; - if (i < NR_PROPERTIES - 1) { // Compare the actual values. We allow a margin of error // here because the conversion loses precision. 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 c783d366a68b..4548d672bb9f 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 @@ -289,7 +289,6 @@ public class StyleCatalog { styleNode.setAttribute("style:family", s.getFamily()); Element propertiesNode = (Element) s.createNode(parentDoc, "style:properties"); - // if (propertiesNode.getFirstChild() != null) // DJP: only add node if has children OR attributes if (propertiesNode != null) styleNode.appendChild(propertiesNode); 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 b0cfc09893bc..faa9dc7c7352 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 @@ -651,10 +651,6 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } } - - // for (int j = 0; j < colsRepeated; j++) { - - if (tableValueTypeNode != null) { // Make sure we initialize to 0 the width of the current cell @@ -858,7 +854,6 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, } String s = buffer.toString(); - // displayWidth = calculateContentWidth(s); addCell(s); } @@ -960,8 +955,6 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, String s = child.getNodeValue(); - // displayWidth = calculateContentWidth(s); - int k = s.lastIndexOf("."); if (k > 0) { s = s.substring(k+1); 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 fefd0bdf7261..55a804cbe33f 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 @@ -41,7 +41,6 @@ import org.openoffice.xmerge.ConvertData; import org.openoffice.xmerge.ConvertException; import org.openoffice.xmerge.DocumentDeserializer; import org.openoffice.xmerge.converter.dom.DOMDocument; -//import org.openoffice.xmerge.converter.xml.sxw.SxwDocument; import org.openoffice.xmerge.converter.xml.xslt.GenericOfficeDocument; import org.openoffice.xmerge.util.Debug; import org.openoffice.xmerge.util.registry.ConverterInfo; @@ -50,7 +49,6 @@ import org.openoffice.xmerge.util.registry.ConverterInfo; import javax.xml.transform.TransformerFactory; import javax.xml.transform.Transformer; import javax.xml.transform.dom.DOMSource; -//import javax.xml.transform.dom.DOMResult; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.stream.StreamResult; @@ -58,12 +56,6 @@ import javax.xml.transform.stream.StreamSource; import javax.xml.transform.URIResolver; import javax.xml.transform.Source; - -// -//import org.apache.xalan.serialize.Serializer; -//import org.apache.xalan.serialize.SerializerFactory; -//import org.apache.xalan.templates.OutputProperties; - import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -150,14 +142,12 @@ public final class DocumentDeserializerImpl public Source resolve(String href,String base) throws TransformerException{ - //System.out.println("\nhref "+href+"\nbase "+base); if (href !=null){ if(href.equals("javax.xml.transform.dom.DOMSource")|| href.equals("")) return null; try{ ConverterInfo ci = pluginFactory.getConverterInfo(); String newhRef ="jar:"+ci.getJarName()+"!/"+href; - //System.out.println("\n Looking For "+ newhRef); StreamSource sheetFile= new StreamSource(newhRef); return sheetFile; } @@ -215,13 +205,6 @@ public final class DocumentDeserializerImpl tFactory.setURIResolver(this); Transformer transformer = tFactory.newTransformer(xslDomSource); transformer.transform(xmlDomSource,new StreamResult(baos)); - /* - // Serialize for output to standard out - Serializer serializer = SerializerFactory.getSerializer - (OutputProperties.getDefaultMethodProperties("xml")); - serializer.setOutputStream(System.out); - serializer.asDOMSerializer().serialize(xmlDomResult.getNode()); - */ log("\n** Transform Complete ***"); 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 4fb0a0e68813..3dc8434b2508 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 @@ -197,14 +197,12 @@ public final class DocumentSerializerImpl public Source resolve(String href,String base) throws TransformerException{ - //System.out.println("\nhref "+href+"\nbase "+base); if (href !=null){ if(href.equals("javax.xml.transform.dom.DOMSource")|| href.equals("")) return null; try{ ConverterInfo ci = pluginFactory.getConverterInfo(); String newhRef ="jar:"+ci.getJarName()+"!/"+href; - //System.out.println("\n Looking For "+ newhRef); StreamSource sheetFile= new StreamSource(newhRef); return sheetFile; } @@ -235,9 +233,7 @@ public final class DocumentSerializerImpl private ByteArrayOutputStream transform(org.w3c.dom.Document domDoc) throws TransformerException,TransformerConfigurationException , FileNotFoundException,IOException{ - //System.out.println("\nTransforming..."); ConverterInfo ci = pluginFactory.getConverterInfo(); - //DOMResult xmlDomResult = new DOMResult(); ByteArrayOutputStream baos= new ByteArrayOutputStream(); try{ @@ -256,7 +252,6 @@ public final class DocumentSerializerImpl } else{ - //System.out.println(ci.getJarName()+"!/"+ci.getXsltSerial()); xslDoc = dBuilder.parse( "jar:"+ci.getJarName()+"!/"+ci.getXsltSerial()); } @@ -270,21 +265,6 @@ public final class DocumentSerializerImpl Transformer transformer = tFactory.newTransformer(xslDomSource); transformer.transform(xmlDomSource, new StreamResult(baos)); - - /* - transformer.transform(xmlDomSource, xmlDomResult); //Removed this impl because the DocType was not being written out - - // Serialize for output to standard out - Serializer serializer = SerializerFactory.getSerializer - (OutputProperties.getDefaultMethodProperties("xml")); - //serializer.setOutputStream(System.out); - serializer.setOutputStream(baos); - serializer.asDOMSerializer().serialize(xmlDomResult.getNode()); - //serializer.asDOMSerializer().serialize(xmlDomSource.getNode()); - - - //System.out.println("\n** Transform Complete ***"); - */ } catch(Exception e){ System.out.println("An error occurred in the transformation : "+e); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java index 36872751e999..80ddaa1909dc 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java @@ -35,8 +35,6 @@ import org.openoffice.xmerge.DocumentDeserializer; import org.openoffice.xmerge.DocumentDeserializerFactory; import org.openoffice.xmerge.PluginFactory; import org.openoffice.xmerge.converter.dom.DOMDocument; -//import org.openoffice.xmerge.converter.xml.sxw.SxwDocument; -//import org.openoffice.xmerge.converter.xml.OfficeDocument; import org.openoffice.xmerge.converter.xml.xslt.GenericOfficeDocument; import org.openoffice.xmerge.util.registry.ConverterInfo; import org.openoffice.xmerge.DocumentMerger; 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 9026303ca3d3..f721fce62258 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 @@ -63,16 +63,10 @@ public class CharArrayLCSAlgorithm { // in those 2 sequences diffTable = createDiffTable(orgSeq, modSeq); - // debug purpose... - // printDiffTable(diffTable); - Vector diffResult = new Vector(); generateResult(diffTable, orgSeqlen, modSeqlen, diffResult); - // don't need anymore if Difference do not contain content information - /* fillInDiffContent(diffResult, orgSeq, modSeq); */ - Difference[] diffArray = new Difference[0]; // convert the vector to array, it has to do in here as diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java index 238fd59f9608..b254e6873edd 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java @@ -232,9 +232,6 @@ public class ConverterInfoReader { desc, version, vendor,classImpl, xsltSerial,xsltDeserial); } - /*ConverterInfo converterInfo = new ConverterInfo(jarfilename, - officeMime, deviceMime, name, desc, version, vendor, - classImpl);*/ converterInfoList.add(converterInfo); } |