Remove dead codes
This commit is contained in:
parent
ef0534f844
commit
eb726f281d
19 changed files with 0 additions and 107 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -196,7 +196,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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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++;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 ***");
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue