Kaydet (Commit) c2a0a2bb authored tarafından Alexander Wilms's avatar Alexander Wilms Kaydeden (comit) Caolán McNamara

Remove visual noise from xmerge

Change-Id: I74b5e30d08ade403ec35298d5c783f02b22e886a
Reviewed-on: https://gerrit.libreoffice.org/8343Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2ef9df8a
......@@ -192,7 +192,7 @@ public class Convert implements Cloneable {
if (toOffice) {
// From device format to Office format
//
DocumentDeserializerFactory myDocDeserializerFactory =
ci.getDocDeserializerFactory();
DocumentDeserializer deser =
......@@ -206,7 +206,7 @@ public class Convert implements Cloneable {
} else {
// From Office format to device format
//
DocumentSerializerFactory myDocSerializerFactory =
ci.getDocSerializerFactory();
......@@ -244,7 +244,7 @@ public class Convert implements Cloneable {
if (toOffice) {
// From device format to Office format
//
DocumentDeserializerFactory myDocDeserializerFactory =
ci.getDocDeserializerFactory();
DocumentDeserializer deser =
......@@ -260,7 +260,7 @@ public class Convert implements Cloneable {
} else {
// From Office format to device format
//
DocumentSerializerFactory myDocSerializerFactory =
ci.getDocSerializerFactory();
......
......@@ -231,7 +231,7 @@ public class ParaStyle extends Style implements Cloneable {
// Look for children. Only ones we care about are "style:properties"
// nodes. If any are found, recursively traverse them, passing
// along the style element to add properties to.
//
if (node.hasChildNodes()) {
NodeList children = node.getChildNodes();
int len = children.getLength();
......
......@@ -133,12 +133,12 @@ public class DocumentMergerImpl implements DocumentMerger {
Node workSheet= workSheetList2.item(j);
// try to match the workSheet
//
Node matchingWorkSheet = matchWorkSheet(workSheet, workSheetList1);
// add the new WorkSheet to the original document iff match not
// found
//
if (matchingWorkSheet == null) {
Node cloneNode = XmlUtil.deepClone(officeBody, workSheet);
officeBody.appendChild(cloneNode);
......
......@@ -167,7 +167,7 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants,
// use any value for password here. If StarCalc XML supports
// passwords in the future, we should try to get the correct
// password value here.
//
decoder = createDecoder(workbookName, worksheetNames, "password");
Debug.log(Debug.TRACE, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
......@@ -438,7 +438,7 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants,
// The number of columns in the spreadsheet
int lastColumn = decoder.getNumberOfColumns();
//
Node autoStylesNode = null;
// Loop over all cells in the spreadsheet
......
......@@ -717,7 +717,7 @@ public abstract class SxcDocumentSerializer implements OfficeConstants,
} else {
// Text node, Date node, or Time node
//
Debug.log(Debug.INFO,
"TextNode, DateNode, TimeNode or BooleanNode\n");
// This handles the case where we have style information but no content
......
......@@ -54,7 +54,7 @@ public abstract class SxcPluginFactory
throws IOException {
// read zipped XML stream
//
SxcDocument doc = new SxcDocument(name);
doc.read(is);
return doc;
......@@ -64,7 +64,7 @@ public abstract class SxcPluginFactory
throws IOException {
// read zipped XML stream
//
SxcDocument doc = new SxcDocument(name);
doc.read(is,isZip);
return doc;
......
......@@ -153,7 +153,7 @@ public final class PluginFactoryImpl extends PluginFactory
} catch (Exception e) {
// It is okay for the property file to not exist.
//
}
return ext;
}
......
......@@ -143,7 +143,7 @@ public final class CharacterBaseParagraphMerge
String tmpString;
// Handle situation where getNodeValue returns null
//
if (orgNode.getNodeValue() != null)
tmpString = orgNode.getNodeValue();
else
......@@ -167,11 +167,11 @@ public final class CharacterBaseParagraphMerge
int lastDiffPosition = -1;
// starting to diff
//
for (int j = startDiffNum; j < endDiffNum; j++) {
// copy any contents before the diff
//
if (diffs[j].getOrgPosition() > orgTextPosition) {
// need to flush first
if (cacheLength > 0) {
......@@ -199,7 +199,7 @@ public final class CharacterBaseParagraphMerge
// for any deleted characters, just skip without copy
// but still need to take care the cached characters
//
if (diffs[j].getOperation() == Difference.DELETE) {
orgTextPosition++;
......
......@@ -68,7 +68,7 @@ public final class Driver {
public static void main(String args[]) {
// Register jarfiles
//
String propFile = "ConverterInfoList.properties";
ConverterInfoList cil = null;
try {
......
......@@ -44,7 +44,7 @@ public class ConverterInfo {
static {
// This needs to be updated to reflect all valid office types.
//
validOfficeTypes = new String[2];
validOfficeTypes[0] = SxwType;
validOfficeTypes[1] = SxcType;
......@@ -110,7 +110,7 @@ public class ConverterInfo {
piClassLoader = this.getClass().getClassLoader();
// Get instance of the PluginFactory.
//
try {
URL jarURL = new URL(jarName);
URLClassLoader loader = new URLClassLoader(new URL[] { jarURL },
......@@ -123,7 +123,7 @@ public class ConverterInfo {
piPluginFactory = ( PluginFactory ) construct.newInstance(arguments);
// See which interfaces the plug-in PluginFactory supports.
//
Class<?>[] cl = piPluginFactory.getClass().getInterfaces();
for (int i=0; i < cl.length; i++) {
......@@ -185,7 +185,7 @@ public class ConverterInfo {
piClassLoader = this.getClass().getClassLoader();
// Get instance of the PluginFactory.
//
try {
URL jarURL = new URL(jarName);
URLClassLoader loader = new URLClassLoader(new URL[] { jarURL },
......@@ -198,7 +198,7 @@ public class ConverterInfo {
piPluginFactory = ( PluginFactory ) construct.newInstance(arguments);
// See which interfaces the plug-in PluginFactory supports.
//
Class<?>[] cl = piPluginFactory.getClass().getInterfaces();
for (int i=0; i < cl.length; i++) {
......
......@@ -56,7 +56,7 @@ public final class ConverterInfoMgr {
ConverterInfo converterInfo;
// Validate
//
if (ci.getDisplayName() == null) {
RegistryException re = new RegistryException(
"Converter must have valid name.");
......@@ -80,7 +80,7 @@ public final class ConverterInfoMgr {
// Verify there is no converter with the same Display Name in
// the registry.
//
Iterator<ConverterInfo> ciEnum = converterInfoList.iterator();
while (ciEnum.hasNext()) {
converterInfo = ciEnum.next();
......@@ -93,7 +93,7 @@ public final class ConverterInfoMgr {
// Since this is a adding to a static Vector, make sure this
// add method call is synchronized.
//
synchronized (converterInfoList) {
converterInfoList.add(ci);
}
......@@ -216,7 +216,7 @@ public final class ConverterInfoMgr {
}
// Loop over elements comparing with deviceFromMime
//
Iterator<ConverterInfo> ciEnum = converterInfoList.iterator();
while (ciEnum.hasNext()) {
......@@ -225,7 +225,7 @@ public final class ConverterInfoMgr {
Iterator<String> fromEnum = converterInfo.getDeviceMime();
// Loop over the deviceMime types.
//
while (fromEnum.hasNext()) {
String fromDeviceInfo = fromEnum.next();
if (deviceMime.trim().equals(fromDeviceInfo) &&
......@@ -259,7 +259,7 @@ public final class ConverterInfoMgr {
ConverterInfo[] converterInfo = new ConverterInfo[2];
// Loop over elements comparing with deviceFromMime
//
Iterator<ConverterInfo> cifEnum = converterInfoList.iterator();
while (cifEnum.hasNext()) {
......@@ -269,7 +269,7 @@ public final class ConverterInfoMgr {
// Loop over the deviceMime types looking for a deviceFromMime
// match.
//
while (fromEnum.hasNext()) {
String fromDeviceInfo = fromEnum.next();
......@@ -277,7 +277,7 @@ public final class ConverterInfoMgr {
// Found a a match for deviceFrom. Now loop over the
// elements comparing with deviceToMime
//
Iterator<ConverterInfo> citEnum = converterInfoList.iterator();
while (citEnum.hasNext()) {
......@@ -287,14 +287,14 @@ public final class ConverterInfoMgr {
// Loop over deviceMime types looking for a
// deviceToMime match.
//
while (toEnum.hasNext()) {
String toDeviceInfo = toEnum.next();
if (deviceToMime.trim().equals(toDeviceInfo) &&
fromOfficeInfo.equals(toOfficeInfo)) {
// Found a match
//
return (converterInfo);
}
}
......@@ -343,12 +343,12 @@ public final class ConverterInfoMgr {
System.out.println("");
// Quit
//
if (c == 'Q') {
exitFlag = true;
// Load by Jarfile
//
} else if (c == 'L') {
System.out.println("Enter path to jarfile: ");
......@@ -374,7 +374,7 @@ public final class ConverterInfoMgr {
}
// Unload by Display Name or Jarfile
//
} else if (c == 'T') {
if (validate== true){
System.out.println("Validation switched off");
......@@ -414,7 +414,7 @@ public final class ConverterInfoMgr {
}
// Find Office Mime
//
} else if (c == 'F' || c == 'C') {
String findMimeOne = null;
......@@ -467,7 +467,7 @@ public final class ConverterInfoMgr {
}
// View
//
} else if (c == 'V') {
Iterator<ConverterInfo> ciEnum = ConverterInfoMgr.getConverterInfoEnumeration();
......
......@@ -89,19 +89,19 @@ public class ConverterInfoReader {
jarfilename = jar;
// Get Jar via URL
//
url = new URL("jar:" + jar + "!/META-INF/converter.xml");
jarConnection = (JarURLConnection)url.openConnection();
jarentry = jarConnection.getJarEntry();
jarfile = jarConnection.getJarFile();
// Build the InputSource
//
istream = jarfile.getInputStream(jarentry);
isource = new InputSource(istream);
// Get the DOM builder and build the document.
//
builderFactory = DocumentBuilderFactory.newInstance();
//DTD validation
......@@ -109,12 +109,12 @@ public class ConverterInfoReader {
System.out.println("Validating xml...");
builderFactory.setValidating(true);
}
//
builder = builderFactory.newDocumentBuilder();
document = builder.parse(isource);
// Parse the document.
//
parseDocument();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment