Hi,
I have removed some dead code form */writerperfect* and */xmerge*.
Regards,
Balint Dozsa
From 60150a3a38b68188b9edeb17a5fb7a49bb0c514e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C3=A1lint=20D=C3=B3zsa?= <dozsabalint@gmail.com>
Date: Tue, 15 Feb 2011 11:35:24 +0100
Subject: [PATCH] Remove dead codes
---
writerperfect/source/filter/DocumentCollector.cxx | 1 -
writerperfect/source/filter/FontStyle.cxx | 1 -
writerperfect/source/filter/OdgExporter.cxx | 1 -
xmerge/source/activesync/XMergeFilter.cpp | 11 ----
xmerge/source/bridge/java/XMergeBridge.java | 54 +-------------------
.../xml/sxc/minicalc/MinicalcDecoder.java | 6 --
.../palmtests/qa/comparator/SimplePdbCompare.java | 2 -
.../source/palmtests/qa/comparator/XmlWrapper.java | 8 ---
.../xml/sxc/pexcel/records/BeginningOfFile.java | 3 -
.../converter/xml/sxc/pexcel/records/CodePage.java | 1 -
.../pexcel/records/formula/FormulaCompiler.java | 1 -
.../sxw/wordsmith/DocumentDeserializerImpl.java | 10 ----
.../converter/xml/sxw/wordsmith/WsePara.java | 19 +-------
.../xmerge/converter/dom/DOMDocument.java | 2 -
.../xmerge/converter/xml/OfficeDocument.java | 6 --
.../openoffice/xmerge/converter/xml/ParaStyle.java | 2 -
.../xmerge/converter/xml/StyleCatalog.java | 1 -
.../converter/xml/sxc/SxcDocumentSerializer.java | 7 ---
.../xml/xslt/DocumentDeserializerImpl.java | 17 ------
.../converter/xml/xslt/DocumentSerializerImpl.java | 22 +--------
.../converter/xml/xslt/PluginFactoryImpl.java | 2 -
.../xmerge/merger/diff/CharArrayLCSAlgorithm.java | 6 --
.../xmerge/util/registry/ConverterInfoReader.java | 3 -
23 files changed, 3 insertions(+), 183 deletions(-)
diff --git a/writerperfect/source/filter/DocumentCollector.cxx
b/writerperfect/source/filter/DocumentCollector.cxx
index b4066e2..94b48bc 100644
--- a/writerperfect/source/filter/DocumentCollector.cxx
+++ b/writerperfect/source/filter/DocumentCollector.cxx
@@ -1018,7 +1018,6 @@ void DocumentCollector::openTableCell(const WPXPropertyList &propList)
if (propList["table:number-rows-spanned"])
pTableCellOpenElement->addAttribute("table:number-rows-spanned",
propList["table:number-rows-spanned"]->getStr().cstr());
- // pTableCellOpenElement->addAttribute("table:value-type", "string");
mpCurrentContentElements->push_back(pTableCellOpenElement);
mWriterDocumentStates.top().mbTableCellOpened = true;
diff --git a/writerperfect/source/filter/FontStyle.cxx b/writerperfect/source/filter/FontStyle.cxx
index 07afe4b..c945407 100644
--- a/writerperfect/source/filter/FontStyle.cxx
+++ b/writerperfect/source/filter/FontStyle.cxx
@@ -44,7 +44,6 @@ void FontStyle::write(DocumentHandlerInterface *pHandler) const
TagOpenElement styleOpen("style:font-face");
styleOpen.addAttribute("style:name", getName());
styleOpen.addAttribute("svg:font-family", msFontFamily);
-// styleOpen.addAttribute("style:font-pitch", msFontPitch);
styleOpen.write(pHandler);
TagCloseElement styleClose("style:font-face");
styleClose.write(pHandler);
diff --git a/writerperfect/source/filter/OdgExporter.cxx
b/writerperfect/source/filter/OdgExporter.cxx
index 6baa2d6..1ee47cf 100644
--- a/writerperfect/source/filter/OdgExporter.cxx
+++ b/writerperfect/source/filter/OdgExporter.cxx
@@ -195,7 +195,6 @@ void OdgExporter::endGraphics()
tmpStyleStyleOpenElement.write(mpHandler);
TagOpenElement tmpStyleDrawingPagePropertiesOpenElement("style:drawing-page-properties");
- // tmpStyleDrawingPagePropertiesOpenElement.addAttribute("draw:background-size", "border");
tmpStyleDrawingPagePropertiesOpenElement.addAttribute("draw:fill", "none");
tmpStyleDrawingPagePropertiesOpenElement.write(mpHandler);
diff --git a/xmerge/source/activesync/XMergeFilter.cpp b/xmerge/source/activesync/XMergeFilter.cpp
index cd1ecf6..7a0edf7 100644
--- a/xmerge/source/activesync/XMergeFilter.cpp
+++ b/xmerge/source/activesync/XMergeFilter.cpp
@@ -360,17 +360,6 @@ TCHAR* CXMergeFilter::GetJavaBaseDir()
/* use current version */
lRet = ::RegQueryValueEx(hKey, _T("CurrentVersion"), 0, NULL, (LPBYTE)szCurrentJava, &dwSize);
- /*
- for (DWORD i = 0; lRet != ERROR_NO_MORE_ITEMS; i++)
- {
- lRet = ::RegEnumKeyEx(hKey, i, szKeyName, &dwKeyName, 0, szClassName, &dwClassName, NULL);
- if(!strncmp(szKeyName, "1.4", 3))
- break;
- dwKeyName = _MAX_PATH;
- }
- // Found a Java 1.4 installation. Can now read its home directory.
- */
-
lRet = ::RegOpenKeyEx(hKey, _T(szCurrentJava), 0, KEY_READ, &hDataKey);
if (lRet != ERROR_SUCCESS)
diff --git a/xmerge/source/bridge/java/XMergeBridge.java
b/xmerge/source/bridge/java/XMergeBridge.java
index 9302ebb..f467d5d 100644
--- a/xmerge/source/bridge/java/XMergeBridge.java
+++ b/xmerge/source/bridge/java/XMergeBridge.java
@@ -160,16 +160,7 @@ public class XMergeBridge {
public boolean importer(com.sun.star.beans.PropertyValue[] aSourceData,
com.sun.star.xml.sax.XDocumentHandler xDocHandler,
java.lang.String[] msUserData) throws com.sun.star.uno.RuntimeException {
- /*
- System.out.println("\nFound the Importer!\n");
-
- System.out.println("\n"+msUserData[0]);
- System.out.println("\n"+msUserData[1]);
- System.out.println("\n"+msUserData[2]);
- System.out.println("\n"+msUserData[3]);
- System.out.println("\n"+msUserData[4]);
- System.out.println("\n"+msUserData[5]);
- */
+
sFileName="";
sURL="";
String sDirectory = null;
@@ -185,10 +176,7 @@ public class XMergeBridge {
for (int i = 0 ; i < pValue.length; i++)
{
- //System.out.println("\n"+pValue[i].Name+" "+pValue[i].Value;
-
try{
- //System.out.println("\n"+pValue[i].Name+" "+pValue[i].Value);
if (pValue[i].Name.compareTo("InputStream")==0){
xis=(com.sun.star.io.XInputStream)AnyConverter.toObject(new
Type(com.sun.star.io.XInputStream.class), pValue[i].Value);
}
@@ -243,11 +231,9 @@ public class XMergeBridge {
}
catch (IOException e){
- //System.out.println("XMergeBridge IO Exception "+e.getMessage());
return false;
}
catch (Exception e){
- //System.out.println("XMergeBridge Exception "+e+" "+e.getMessage());
return false;
}
return true;
@@ -256,16 +242,6 @@ public class XMergeBridge {
public boolean exporter(com.sun.star.beans.PropertyValue[] aSourceData,
java.lang.String[] msUserData) throws com.sun.star.uno.RuntimeException{
- /*
- System.out.println("\nFound the Exporter!\n");
-
- System.out.println("\n"+msUserData[0]);
- System.out.println("\n"+msUserData[1]);
- System.out.println("\n"+msUserData[2]);
- System.out.println("\n"+msUserData[3]);
- System.out.println("\n"+msUserData[4]);
- System.out.println("\n"+msUserData[5]);
- */
sFileName=null;
sURL=null;
String sDirectory = null;
@@ -280,29 +256,21 @@ public class XMergeBridge {
com.sun.star.beans.PropertyValue[] pValue = aSourceData;
for (int i = 0 ; i < pValue.length; i++)
{
-
- //System.out.println("\n"+pValue[i].Name+" "+pValue[i].Value);
-
try{
- //System.out.println("\n"+pValue[i].Name+" "+pValue[i].Value);
if (pValue[i].Name.compareTo("OutputStream")==0){
xos=(com.sun.star.io.XOutputStream)AnyConverter.toObject(new
Type(com.sun.star.io.XOutputStream.class), pValue[i].Value);
- // System.out.println(pValue[i].Name+" "+xos);
}
if (pValue[i].Name.compareTo("FileName")==0){
sFileName=(String)AnyConverter.toObject(new Type(java.lang.String.class),
pValue[i].Value);
- //System.out.println(pValue[i].Name+" "+sFileName);
}
if (pValue[i].Name.compareTo("URL")==0){
sURL=(String)AnyConverter.toObject(new Type(java.lang.String.class), pValue[i].Value);
- // System.out.println("\nMediaDescriptor url "+pValue[i].Name+" "+sURL);
}
if (pValue[i].Name.compareTo("Title")==0){
title=(String)AnyConverter.toObject(new Type(java.lang.String.class), pValue[i].Value);
- //System.out.println(pValue[i].Name+" "+title);
}
}
catch(com.sun.star.lang.IllegalArgumentException AnyExec){
@@ -379,7 +347,6 @@ public class XMergeBridge {
public void startDocument () {
- //System.out.println("\nStart Document!");
}
public void endDocument()throws com.sun.star.uno.RuntimeException
@@ -391,12 +358,10 @@ public class XMergeBridge {
}
catch (IOException e){
- //System.out.println("Exception "+e);
throw new com.sun.star.uno.RuntimeException(e.getMessage());
}
catch (Exception e){
- //System.out.println("Exception "+e);
throw new com.sun.star.uno.RuntimeException("Xmerge Exception");
}
@@ -421,7 +386,6 @@ public class XMergeBridge {
}
}
str=str.concat(">");
- // System.out.println(str);
try{
xOutStream.writeBytes(str.getBytes("UTF-8"));
}
@@ -534,12 +498,9 @@ public class XMergeBridge {
int i=1;
while (docEnum.hasMoreElements() && sURL.startsWith("file:")) {
- //URI uri=new URI(sFileName);
URI uri=new URI(sURL);
String newFileName= getPath(uri);
-
- //System.out.println("\nURI: "+uri.getPath());
File newFile=null;
if (newFileName.lastIndexOf(".")!=-1){
newFile =new
File(newFileName.substring(0,newFileName.lastIndexOf("."))+String.valueOf(i)+newFileName.substring(newFileName.lastIndexOf(".")));
@@ -583,27 +544,14 @@ public class XMergeBridge {
}
else
{
- /*
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- byte[][] buf = new byte[1][4096];
- int n=0;
- while ((n=xml.readSomeBytes(buf, 4096))>0)
- bout.write(buf[0], 0, n);
- ByteArrayInputStream bin = new
ByteArrayInputStream(bout.toByteArray());
- cv.addInputStream(name, bin, false);
- */
cv.addInputStream(name,(InputStream)xis,false);
- //System.out.println("\nConverting");
ConvertData dataIn = cv.convert();
- //System.out.println("\nFinished Converting");
Enumeration docEnum = dataIn.getDocumentEnumeration();
while (docEnum.hasMoreElements()) {
OfficeDocument docIn = (OfficeDocument)docEnum.nextElement();
docIn.write(newxos,false);
}
- //newxos.write(-1); //EOF character
- //newxos.flush();
newxos.close();
}
ConverterInfoMgr.removeByJar(jarName);
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 d519758..e70327a 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/palmtests/qa/comparator/SimplePdbCompare.java
b/xmerge/source/palmtests/qa/comparator/SimplePdbCompare.java
index 19299ba..f80dbb1 100644
--- a/xmerge/source/palmtests/qa/comparator/SimplePdbCompare.java
+++ b/xmerge/source/palmtests/qa/comparator/SimplePdbCompare.java
@@ -80,13 +80,11 @@ public final class SimplePdbCompare {
if (pdb1.equals(pdb2))
{
- //writeToLog("PDB " + pdbname1 + " and PDB " + pdbname2 + " are equal");
System.out.println("PDB " + pdbname1 + " and PDB " + pdbname2 + " are equal");
return true;
}
else
{
- //writeToLog("PDB " + pdbname1 + " and PDB " + pdbname2 + " are not equal");
System.out.println("PDB " + pdbname1 + " and PDB " + pdbname2 + " are not equal");
return false;
}
diff --git a/xmerge/source/palmtests/qa/comparator/XmlWrapper.java
b/xmerge/source/palmtests/qa/comparator/XmlWrapper.java
index 3ac4856..393630c 100644
--- a/xmerge/source/palmtests/qa/comparator/XmlWrapper.java
+++ b/xmerge/source/palmtests/qa/comparator/XmlWrapper.java
@@ -36,7 +36,6 @@ public class XmlWrapper
System.out.println("args.length is " + args.length);
if (args.length < 2) {
System.out.println("Usage: java XmlWrapper [<zipfile1> <zipfile2>].");
- //return;
System.exit(-1);
}
@@ -47,7 +46,6 @@ public class XmlWrapper
currdirfp = new File(".");
} catch (Exception fx) {
System.out.println("Could not get File instance for current directory \n");
- //return;
System.exit(-1);
}
@@ -60,7 +58,6 @@ public class XmlWrapper
} catch (Exception tx) {
System.out.println("Could not create TempFile ");
System.out.println("Exception: " + tx.toString());
- //return;
System.exit(-1);
}
@@ -76,14 +73,12 @@ public class XmlWrapper
System.out.println("Exception: file is not a ZIP file: " + args[0]);
f1.delete();
f2.delete();
- //return;
System.exit(-1);
} catch (Exception e) {
System.out.println("Exception: Could not extract XML from " + args[0]);
System.out.println("Exception: " + e.toString());
f1.delete();
f2.delete();
- //return;
System.exit(-1);
}
@@ -96,7 +91,6 @@ public class XmlWrapper
System.out.println("Exception: file is not a ZIP file: " + args[0]);
f1.delete();
f2.delete();
- //return;
System.exit(-1);
} catch (Exception ex) {
System.out.println(ex.getMessage());
@@ -104,7 +98,6 @@ public class XmlWrapper
System.out.println("Exception: " + ex.toString());
f1.delete();
f2.delete();
- //return;
System.exit(-1);
}
@@ -126,7 +119,6 @@ public class XmlWrapper
System.out.println("Exception: " + ex.toString());
f1.delete();
f2.delete();
- //return;
System.exit(-1);
}
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 e5d74dc..19e68cf 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 6049b1d..e17bb12 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 61f5c8a..604ac73 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 0442a48..c48ec61 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 6d0e3cd..ed8036f 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
@@ -260,31 +260,14 @@ 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 fe417fd..9d3edc1 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 cda6dd0..77eaaf6 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 2006d75..e2f04b2 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 effbb55..2f3c27f 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 d32f82e..cccb028 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 1da5f0b..40332f4 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 07bb934..b98b18b 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{
@@ -255,8 +251,7 @@ public final class DocumentSerializerImpl
xslDoc= dBuilder.parse(ci.getXsltSerial());
}
- else{
- //System.out.println(ci.getJarName()+"!/"+ci.getXsltSerial());
+ else{
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 ec97743..1377d7b 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 0c50750..171d6ae 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 2bf02bb..6f4184d 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);
}
--
1.7.1
Context
- [Libreoffice] Patch · Bálint Dózsa
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.