summaryrefslogtreecommitdiff
path: root/qadevOOo/runner
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner')
-rw-r--r--qadevOOo/runner/base/java_fat.java53
-rw-r--r--qadevOOo/runner/base/java_fat_service.java7
-rw-r--r--qadevOOo/runner/complexlib/Assurance.java1
-rw-r--r--qadevOOo/runner/complexlib/ComplexTestCase.java7
-rw-r--r--qadevOOo/runner/convwatch/Basename.java52
-rw-r--r--qadevOOo/runner/convwatch/BorderRemover.java43
-rw-r--r--qadevOOo/runner/convwatch/BuildID.java24
-rw-r--r--qadevOOo/runner/convwatch/ConvWatch.java39
-rw-r--r--qadevOOo/runner/convwatch/ConvWatchStarter.java43
-rw-r--r--qadevOOo/runner/convwatch/DB.java141
-rw-r--r--qadevOOo/runner/convwatch/DBHelper.java12
-rw-r--r--qadevOOo/runner/convwatch/DateHelper.java1
-rw-r--r--qadevOOo/runner/convwatch/DocumentConverter.java6
-rw-r--r--qadevOOo/runner/convwatch/EnhancedComplexTestCase.java13
-rw-r--r--qadevOOo/runner/convwatch/FileHelper.java20
-rw-r--r--qadevOOo/runner/convwatch/FilenameHelper.java9
-rw-r--r--qadevOOo/runner/convwatch/GfxCompare.java8
-rw-r--r--qadevOOo/runner/convwatch/GlobalLogWriter.java5
-rw-r--r--qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java1
-rw-r--r--qadevOOo/runner/convwatch/GraphicalTestArguments.java18
-rw-r--r--qadevOOo/runner/convwatch/HTMLOutputter.java36
-rw-r--r--qadevOOo/runner/convwatch/INIOutputter.java4
-rw-r--r--qadevOOo/runner/convwatch/ImageHelper.java6
-rw-r--r--qadevOOo/runner/convwatch/IniFile.java85
-rw-r--r--qadevOOo/runner/convwatch/MSOfficePrint.java21
-rw-r--r--qadevOOo/runner/convwatch/OSHelper.java75
-rw-r--r--qadevOOo/runner/convwatch/OfficePrint.java155
-rw-r--r--qadevOOo/runner/convwatch/PRNCompare.java151
-rw-r--r--qadevOOo/runner/convwatch/PerformanceContainer.java14
-rw-r--r--qadevOOo/runner/convwatch/PixelCounter.java22
-rw-r--r--qadevOOo/runner/convwatch/ReferenceBuilder.java28
-rw-r--r--qadevOOo/runner/convwatch/ReportDesignerTest.java143
-rw-r--r--qadevOOo/runner/convwatch/StatusHelper.java11
-rw-r--r--qadevOOo/runner/graphical/BuildID.java43
-rw-r--r--qadevOOo/runner/graphical/DateHelper.java1
-rw-r--r--qadevOOo/runner/graphical/FileHelper.java122
-rw-r--r--qadevOOo/runner/graphical/GlobalLogWriter.java5
-rw-r--r--qadevOOo/runner/graphical/HTMLResult.java11
-rw-r--r--qadevOOo/runner/graphical/ImageHelper.java7
-rw-r--r--qadevOOo/runner/graphical/IniFile.java107
-rw-r--r--qadevOOo/runner/graphical/MSOfficePostscriptCreator.java40
-rw-r--r--qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java347
-rw-r--r--qadevOOo/runner/graphical/ParameterHelper.java50
-rw-r--r--qadevOOo/runner/graphical/PerformanceContainer.java22
-rw-r--r--qadevOOo/runner/graphical/PixelCounter.java51
-rw-r--r--qadevOOo/runner/helper/APIDescGetter.java9
-rw-r--r--qadevOOo/runner/helper/FileTools.java24
-rw-r--r--qadevOOo/runner/helper/ObjectInspectorModelImpl.java1
-rw-r--r--qadevOOo/runner/helper/OfficeProvider.java1
-rw-r--r--qadevOOo/runner/helper/OfficeWatcher.java7
-rw-r--r--qadevOOo/runner/helper/ProcessHandler.java11
-rw-r--r--qadevOOo/runner/helper/StreamSimulator.java14
-rw-r--r--qadevOOo/runner/helper/URLHelper.java1
-rw-r--r--qadevOOo/runner/lib/MultiMethodTest.java1
-rw-r--r--qadevOOo/runner/lib/MultiPropertyTest.java7
-rw-r--r--qadevOOo/runner/lib/TestParameters.java2
-rw-r--r--qadevOOo/runner/share/DescGetter.java3
-rw-r--r--qadevOOo/runner/stats/ComplexDataBaseOutProducer.java2
-rw-r--r--qadevOOo/runner/stats/SimpleLogWriter.java5
-rw-r--r--qadevOOo/runner/util/AccessibilityTools.java4
-rw-r--r--qadevOOo/runner/util/DesktopTools.java7
-rw-r--r--qadevOOo/runner/util/RegistryTools.java2
-rw-r--r--qadevOOo/runner/util/ValueChanger.java9
-rw-r--r--qadevOOo/runner/util/compare/PDFComparator.java13
-rw-r--r--qadevOOo/runner/util/compare/XMLComparator.java49
-rw-r--r--qadevOOo/runner/util/utils.java4
66 files changed, 2 insertions, 2234 deletions
diff --git a/qadevOOo/runner/base/java_fat.java b/qadevOOo/runner/base/java_fat.java
index 527f7285a161..9e5efaebe494 100644
--- a/qadevOOo/runner/base/java_fat.java
+++ b/qadevOOo/runner/base/java_fat.java
@@ -77,14 +77,10 @@ public class java_fat implements TestBase
{
exclusions = getExclusionList(ExclusionFile, m_isDebug);
}
- //get Job-Descriptions
- // System.out.println("Getting Descriptions for Job: " + job);
String sDescriptionPath = (String) m_aParams.get("DescriptionPath");
DescEntry[] entries = dg.getDescriptionFor(job, sDescriptionPath, m_isDebug);
- // System.out.println();
-
if (entries == null)
{
System.out.println("Couldn't get Description for Job: " + job);
@@ -92,15 +88,6 @@ public class java_fat implements TestBase
return false;
}
-// String officeProviderName = (String) m_aParams.get("OfficeProvider");
-// AppProvider office = (AppProvider) m_aDynamicClassLoader.getInstance(officeProviderName);
-
-// if (office == null) {
-// System.out.println("ERROR: Wrong parameter 'OfficeProvider', " +
-// " it cannot be instantiated.");
-// System.exit(-1);
-// }
-
m_aOffice = startOffice(m_aParams);
boolean firstRun = true;
@@ -149,10 +136,6 @@ public class java_fat implements TestBase
continue;
}
-// if (m_isDebug)
-// {
-// System.out.println("sleeping 2 seconds..");
-// }
util.utils.shortWait(2000);
System.out.println("Creating: " + entry.entryName);
@@ -182,7 +165,6 @@ public class java_fat implements TestBase
continue;
}
- // final String sEntryName = aSubEntry.entryName;
final String sLongEntryName = aSubEntry.longName;
if ((exclusions != null) && (exclusions.contains(sLongEntryName)))
@@ -191,7 +173,6 @@ public class java_fat implements TestBase
continue;
}
- // System.out.println("running: '" + sLongEntryName + "' testcode: [" + sEntryName + "]");
// this will shown in test itself
LogWriter ifclog = (LogWriter) m_aDynamicClassLoader.getInstance( (String) m_aParams.get("LogWriter"));
@@ -207,7 +188,6 @@ public class java_fat implements TestBase
tCase = tEnv.getTestCase();
}
- // MultiMethodTest ifc = null;
lib.TestResult res = null;
// run the interface test twice if it failed.
@@ -398,28 +378,6 @@ public class java_fat implements TestBase
private TestEnvironment getEnv(DescEntry entry, TestParameters param)
{
-// if (m_aDynamicClassLoader == null)
-// m_aDynamicClassLoader = new DynamicClassLoader();
-// String officeProviderName = (String) m_aParams.get("OfficeProvider");
-// AppProvider office = (AppProvider) m_aDynamicClassLoader.getInstance(officeProviderName);
-
-// if (office == null) {
-// System.out.println("ERROR: Wrong parameter 'OfficeProvider', " +
-// " it cannot be instantiated.");
-// System.exit(-1);
-// }
-
-// XMultiServiceFactory msf = (XMultiServiceFactory) office.getManager(
-// m_aParams);
-
-// if (msf == null) {
-// return null;
-// }
-
-// m_aParams.put("ServiceFactory", msf);
-
- // AppProvider office = startOffice(m_aParams);
-
TestCase tCase = null;
try
@@ -480,17 +438,6 @@ public class java_fat implements TestBase
}
-// private void shortWait(int millis)
-// {
-// try
-// {
-// Thread.sleep(millis);
-// }
-// catch (java.lang.InterruptedException ie)
-// {
-// }
-// }
-
private ArrayList<String> getExclusionList(String url, boolean debug)
{
ArrayList<String> entryList = new ArrayList<String>();
diff --git a/qadevOOo/runner/base/java_fat_service.java b/qadevOOo/runner/base/java_fat_service.java
index 2e507ff1e7f4..f9eefaa41dac 100644
--- a/qadevOOo/runner/base/java_fat_service.java
+++ b/qadevOOo/runner/base/java_fat_service.java
@@ -230,7 +230,6 @@ public class java_fat_service implements TestBase {
}
log.println("Creating: "+tCase.getObjectName());
- // LogWriter log = (LogWriter)dcl.getInstance( (String)param.get("LogWriter"));
log.initialize(entry,true);
entry.UserDefinedParams = param;
tCase.setLogWriter((PrintWriter) log);
@@ -247,10 +246,4 @@ public class java_fat_service implements TestBase {
return tEnv;
}
-// protected void shortWait(int millis) {
-// try {
-// Thread.sleep(millis);
-// } catch (java.lang.InterruptedException ie) {}
-// }
-
}
diff --git a/qadevOOo/runner/complexlib/Assurance.java b/qadevOOo/runner/complexlib/Assurance.java
index 41f7ae4ffc4c..6c5a41931d96 100644
--- a/qadevOOo/runner/complexlib/Assurance.java
+++ b/qadevOOo/runner/complexlib/Assurance.java
@@ -369,7 +369,6 @@ public class Assurance
state &= s;
if (!s) {
message += msg + "\r\n";
- // log.println(msg);
if (!cont) {
throw new AssureException(msg);
}
diff --git a/qadevOOo/runner/complexlib/ComplexTestCase.java b/qadevOOo/runner/complexlib/ComplexTestCase.java
index 56f320abff03..bca42faa0fbc 100644
--- a/qadevOOo/runner/complexlib/ComplexTestCase.java
+++ b/qadevOOo/runner/complexlib/ComplexTestCase.java
@@ -43,8 +43,6 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
* Can be set with parameter 'ThreadTimeOut'
**/
protected int m_nThreadTimeOut = 0;
- /** Continue a test even if it did fail **/
- // public static final boolean CONTINUE = true;
/** End a test if it did fail **/
public static final boolean BREAK = true;
@@ -61,7 +59,6 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
Method before = this.getClass().getMethod("before", new Class[] {} );
before.invoke(this, new Object[] {} );
- // beforeWorked = false;
m_bBeforeCalled = true;
}
catch (java.lang.NoSuchMethodException e)
@@ -90,7 +87,6 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
}
/** Description entry **/
- // protected DescEntry subEntry = null;
private void test_method(DescEntry _entry)
{
@@ -149,7 +145,7 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
// is a useful way to detect that a office respective a test
// is running and not death.
// But way ThreadTimeOut?
- // There exeitsts a complex test which uses no office. Therefore
+ // There exists a complex test which uses no office. Therefore
// a logging mechanisim to detect a stalled test.
int lastPing = -1;
int newPing = 0;
@@ -168,7 +164,6 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
{
lastPing = newPing;
newPing = ow.getPing();
- //System.out.println("lastPing: '" + lastPing + "' newPing '" + newPing + "'");
factor = 0;
}
}
diff --git a/qadevOOo/runner/convwatch/Basename.java b/qadevOOo/runner/convwatch/Basename.java
deleted file mode 100644
index 3d5d3850ded6..000000000000
--- a/qadevOOo/runner/convwatch/Basename.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package convwatch;
-
-
-// Helper stuff to
-// abstract class Name
-// {
-// abstract public String getName();
-// }
-// class PRN extends Name
-// {
-// public String getName() {return "-ref";}
-// }
-// class PS extends Name
-// {
-// public String getName() {return "-test";}
-// }
-
-// public class Basename /* extends *//* implements */ {
-// String fs;
-// Basename()
-// {
-// fs = System.getProperty("file.separator");
-// }
-// String getJPEGName(String _sOutputPath, String _sBasename, String _sGS_PageOutput, Name _aPostNameAdd)
-// {
-// String sBaseNameNoSuffix = FileHelper.getNameNoSuffix(_sBasename);
-// String sJPEGName = _sOutputPath + fs + sBaseNameNoSuffix + "-" + _sGS_PageOutput + _aPostNameAdd.getName() + ".jpg";
-// return sJPEGName;
-// }
-
-// public static void main( String[] argv ) {
-
-// }
-// }
diff --git a/qadevOOo/runner/convwatch/BorderRemover.java b/qadevOOo/runner/convwatch/BorderRemover.java
index 95d7e30c2852..c96b8f4853ec 100644
--- a/qadevOOo/runner/convwatch/BorderRemover.java
+++ b/qadevOOo/runner/convwatch/BorderRemover.java
@@ -53,15 +53,6 @@ class BorderRemover
// --------------------------------- test mode ---------------------------------
- // void pixelValue(int pixel)
- // {
- // int alpha = (pixel >> 24) & 0xff;
- // int red = (pixel >> 16) & 0xff;
- // int green = (pixel >> 8) & 0xff;
- // int blue = (pixel ) & 0xff;
- // int dummy = 0;
- // }
-
/*
* compares 2 colors with a given tolerance. So it's possible to check differences approximate.
* @param _nColor1
@@ -131,40 +122,26 @@ class BorderRemover
public boolean createNewImageWithoutBorder(String _sFilenameFrom, String _sFilenameTo)
throws java.io.IOException
{
- // System.out.println("load image: " + fileName);
m_aImage = ImageHelper.createImageHelper(_sFilenameFrom);
- // System.out.println("image width:" + String.valueOf(m_aImage.getWidth()));
- // System.out.println("image height:" + String.valueOf(m_aImage.getHeight()));
-
- // int nw = graphics_stuff.countNotWhitePixel(m_aImage);
- // System.out.println("not white pixels:" + String.valueOf(nw));
-
- // int nb = graphics_stuff.countNotBlackPixel(m_aImage);
- // System.out.println("not black pixels:" + String.valueOf(nb));
-
int nBorderColor = m_aImage.getPixel(0,0);
Rect aInnerRect = findBorder(m_aImage, nBorderColor);
RenderedImage aImage = createImage(m_aImage, aInnerRect);
File aWriteFile = new File(_sFilenameTo);
- // GlobalLogWriter.get().println("Hello World: File to: " + _sFilenameTo);
Exception ex = null;
try
{
Class<?> imageIOClass = Class.forName("javax.imageio.ImageIO");
- // GlobalLogWriter.get().println("Hello World: get Class");
Method getWriterMIMETypesMethod = imageIOClass.getDeclaredMethod("getWriterMIMETypes", new Class[]{ });
- // GlobalLogWriter.get().println("Hello World: get Methode");
getWriterMIMETypesMethod.invoke(imageIOClass, new Object[]{ });
Method writeMethod = imageIOClass.getDeclaredMethod("write", new Class[]{ java.awt.image.RenderedImage.class,
java.lang.String.class,
java.io.File.class});
- // GlobalLogWriter.get().println("Hello World: get Methode");
writeMethod.invoke(imageIOClass, new Object[]{aImage, "image/jpeg", aWriteFile});
}
catch(java.lang.ClassNotFoundException e) {
@@ -191,7 +168,6 @@ class BorderRemover
"Cannot construct object with current Java version " +
javaVersion + ": " + ex.getMessage());
}
-// ImageIO.write(aImage, "jpg", aWriteFile);
return true;
}
@@ -216,19 +192,12 @@ class BorderRemover
{
for (int x = 0; x < nXMin; x++)
{
- // handlesinglepixel(x+i, y+j, pixels[j * w + i]);
int nCurrentColor = _aImage.getPixel(x, y);
if (! compareColorWithTolerance(nCurrentColor, _nBorderColor, 10))
{
- // pixelValue(nCurrentColor);
- // System.out.print("*");
nXMin = java.lang.Math.min(nXMin, x);
nYMin = java.lang.Math.min(nYMin, y);
}
- // else
- // {
- // System.out.print(" ");
- // }
}
}
for (int y = 0; y < h; y++)
@@ -243,12 +212,7 @@ class BorderRemover
nYMax = java.lang.Math.max(nYMax, ny);
}
}
- // System.out.println();
}
- // System.out.println("xmin: " + String.valueOf(nXMin));
- // System.out.println("xmax: " + String.valueOf(nXMax));
- // System.out.println("ymin: " + String.valueOf(nYMin));
- // System.out.println("ymax: " + String.valueOf(nYMax));
Rect aRect;
if (nXMin < nXMax && nYMin < nYMax)
@@ -266,10 +230,6 @@ class BorderRemover
}
- // m_nXMin = nXMin;
- // m_nXMax = nXMax;
- // m_nYMin = nYMin;
- // m_nYMax = nYMax;
return aRect;
}
@@ -298,9 +258,6 @@ class BorderRemover
aBI.setRGB(x, y, _aImage.getPixel(x + nXOffset, y + nYOffset));
}
}
- // java.awt.image.MemoryImageSource aSource = new java.awt.image.MemoryImageSource(w, h, aPixels, 0, w);
-// return java.awt.Component.createImage(aSource);
- // return java.awt.Toolkit.getDefaultToolkit().createImage(aSource);
return aBI;
}
diff --git a/qadevOOo/runner/convwatch/BuildID.java b/qadevOOo/runner/convwatch/BuildID.java
index 8734ef8cdc5a..97bdf66abb5e 100644
--- a/qadevOOo/runner/convwatch/BuildID.java
+++ b/qadevOOo/runner/convwatch/BuildID.java
@@ -61,7 +61,6 @@ public class BuildID
{
int nIdx = sOfficePath.lastIndexOf(fs);
sOfficePath = sOfficePath.substring(0, nIdx);
- // ok. System.out.println("directory: " + sOfficePath);
sBuildID = getBuildIDFromBootstrap(sOfficePath);
if (sBuildID.length() == 0)
{
@@ -125,28 +124,5 @@ public class BuildID
}
return sBuildID;
}
-// public static void main(String[] args)
-// {
-// String sApp;
-// sApp = "/opt/staroffice8_m116/program/soffice --headless --accept=socket,host=localhost,port=8100;urp;";
-// String sBuildID;
-// sBuildID = getBuildID(sApp);
-// System.out.println("BuildID is: " + sBuildID);
-
-// Date aDate = new Date();
-// long nStart = aDate.getTime();
-// System.out.println("Time:" + nStart);
-// // LLA: Just some more tests for getBuildID
-// // sApp = "/opt/staroffice8_net/program/soffice";
-// // sBuildID = getBuildID(sApp);
-// // System.out.println("BuildID is: " + sBuildID);
-
-// // sApp = "\"/opt/staroffice8_net/program/soffice\" test blah";
-// // sBuildID = getBuildID(sApp);
-
-// // System.out.println("BuildID is: " + sBuildID);
-// System.exit(1);
-// }
-
}
diff --git a/qadevOOo/runner/convwatch/ConvWatch.java b/qadevOOo/runner/convwatch/ConvWatch.java
index 5e0d6625e825..2e089b14c2b7 100644
--- a/qadevOOo/runner/convwatch/ConvWatch.java
+++ b/qadevOOo/runner/convwatch/ConvWatch.java
@@ -124,12 +124,9 @@ public class ConvWatch
FileHelper.makeDirectories("", _sOutputPath);
- // runner.convwatch.compare();
-
String sAbsoluteInputFileURL = URLHelper.getFileURLFromSystemPath(_sAbsoluteInputFile);
String sInputFile = FileHelper.getBasename(_sAbsoluteInputFile);
- // System.out.println("InputFile: " + sInputFile);
FileHelper.getNameNoSuffix(sInputFile);
@@ -140,20 +137,13 @@ public class ConvWatch
String sReferenceFile = FileHelper.getBasename(_sAbsoluteReferenceFile);
String sReferenceFileNoSuffix = FileHelper.getNameNoSuffix(sReferenceFile);
String sPostScriptFile = sReferenceFileNoSuffix + ".ps";
- // System.out.println("PostscriptFile: " + sPostScriptFile);
String sAbsolutePrintFile = _sOutputPath + fs + sPostScriptFile;
String sAbsolutePrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFile);
- // System.out.println("AbsoluteInputFileURL: " + sAbsoluteInputFileURL);
- // System.out.println("AbsoluteOutputFileURL: " + sAbsoluteOutputFileURL);
- // System.out.println("AbsolutePrintFileURL: " + sAbsolutePrintFileURL);
-
// store and print the sAbsoluteInputFileURL file with StarOffice / OpenOffice.org
OfficePrint.printToFile(_aGTA, sAbsoluteInputFileURL, sAbsoluteOutputFileURL, sAbsolutePrintFileURL);
- // wait(2);
-
if (! FileHelper.exists(sAbsolutePrintFile))
{
throw new ConvWatchCancelException("createPostscriptStartCheck: Printed file " + sAbsolutePrintFile + " does not exist.");
@@ -175,16 +165,10 @@ public class ConvWatch
PRNCompare a = new PRNCompare();
String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
String sReferencePath = FileHelper.getPath(_sAbsoluteReferenceFile);
- // String sReferenceFile = FileHelper.getBasename(sAbsoluteReferenceFile);
-
- // System.out.println("InputPath: " + sInputPath);
- // System.out.println("sReferencePath: " + sReferencePath);
- // System.out.println("sReferenceFile: " + sReferenceFile);
a.setInputPath( sInputPath );
a.setReferencePath( sReferencePath );
a.setOutputPath( _sOutputPath );
- // a.setDocFile( "1_Gov.ppt");
a.setReferenceFile( sReferenceFile );
a.setPostScriptFile(sPostScriptFile );
if (_aGTA.printAllPages() == true)
@@ -221,9 +205,6 @@ public class ConvWatch
System.getProperty("file.separator");
String sBasename = FileHelper.getBasename(_sAbsoluteInputFile);
String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
-// String sHTMLFile = _sFilenamePrefix + sNameNoSuffix + ".html";
-// HTMLOutputter HTMLoutput = HTMLOutputter.create(_sOutputPath, sHTMLFile, "", "");
-// HTMLoutput.header(sNameNoSuffix);
// TODO: version info was fine
// HTMLoutput.checkSection(sBasename);
// Status end
@@ -274,12 +255,10 @@ public class ConvWatch
}
// Status
-// HTMLoutput.checkLine(aList[i], bCurrentResult);
INIoutput.checkLine(aList[i], bCurrentResult);
bResultIsOk &= bCurrentResult;
}
// Status
-// HTMLoutput.close();
INIoutput.close();
return bResultIsOk;
}
@@ -293,10 +272,6 @@ public class ConvWatch
String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini";
-// HTMLOutputter HTMLoutput = HTMLOutputter.create(_sOutputPath, sHTMLFile, _sFilenamePrefix, "");
-// HTMLoutput.header(sNameNoSuffix);
-// HTMLoutput.checkDiffDiffSection(sBasename);
-
INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, _sFilenamePrefix, "");
INIoutput.createHeader();
// LLA? what if the are no values in the list? true or false;
@@ -311,11 +286,9 @@ public class ConvWatch
INIoutput.writeSection("page" + String.valueOf(i + 1)); // list start at point 0, but this is page 1 and so on... current_page = (i + 1)
boolean bCurrentResult = (aDiffDiffList[i].nDiffStatus == StatusHelper.DIFF_NO_DIFFERENCES); // logic: nDiff==0 = true if there is no difference
-// HTMLoutput.checkDiffDiffLine(aDiffDiffList[i], bCurrentResult);
INIoutput.checkDiffDiffLine(aDiffDiffList[i], bCurrentResult);
}
// Status
-// HTMLoutput.close();
INIoutput.close();
}
@@ -376,7 +349,6 @@ public class ConvWatch
GlobalLogWriter.get().println("checkDiffDiff: Old diff file: '" + sNewDiffName + "' does not exist." );
continue;
}
- // String sNewDiffName = _sAbsoluteDiffPath + fs + sDiffBasename;
// make a simple difference between these both diff files.
String sSourcePath1 = FileHelper.getPath(sOrigDiffName);
@@ -405,15 +377,4 @@ public class ConvWatch
return bDiffIsOk;
}
- // public static void main( String[] argv )
- // {
- // PRNCompare a = new PRNCompare();
- // a.setInputPath( "/cws/so-cwsserv06/qadev18/SRC680/src.m47/convwatch.keep/input/msoffice/xp/PowerPoint");
- // a.setDocFile( "1_Gov.ppt");
- // a.setReferencePath( "/cws/so-cwsserv06/qadev18/SRC680/src.m47/convwatch.keep/input/msoffice/xp/PowerPoint");
- // a.setReferenceFile( "1_Gov.prn" );
-
- // a.setOutputPath( "/tmp/convwatch_java");
- // a.setPostScriptFile("1_Gov.ps" );
- // }
}
diff --git a/qadevOOo/runner/convwatch/ConvWatchStarter.java b/qadevOOo/runner/convwatch/ConvWatchStarter.java
index d0cc8197e3a0..2a76f6c53358 100644
--- a/qadevOOo/runner/convwatch/ConvWatchStarter.java
+++ b/qadevOOo/runner/convwatch/ConvWatchStarter.java
@@ -49,14 +49,6 @@ import convwatch.PerformanceContainer;
public class ConvWatchStarter extends EnhancedComplexTestCase
{
// The first of the mandatory functions:
- /**
- * Return the name of the test.
- * In this case it is the actual name of the service.
- * @return The tested service.
- */
- // public String getTestObjectName() {
- // return "ConvWatch runner";
- // }
// The second of the mandatory functions: return all test methods as an
// array. There is only one test function in this example.
@@ -94,7 +86,6 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
String sREF = (String)param.get( PropertyName.DOC_COMPARATOR_REFERENCE_PATH );
if (sREF == null || sREF.length() == 0)
{
- // log.println("Please set reference file (path to good documents) REFERENCEFILE=path.");
log.println("Assumtion, reference directory and input directory are the same.");
m_sReferencePath = m_sInputPath;
}
@@ -119,7 +110,6 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
if (bQuit == true)
{
- // log.println("must quit.");
assure("Must quit", false);
}
@@ -204,12 +194,6 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
String sBuildID = aGTA.getBuildID();
log.println("Current Office has buildid: " + sBuildID);
- // LLA: sample code, how to access all parameters
- // for (Enumeration e = param.keys() ; e.hasMoreElements() ;)
- // {
- // System.out.println(e.nextElement());
- // }
-
String fs = System.getProperty("file.separator");
String sHTMLName = "index.html";
@@ -256,17 +240,12 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
{
if (sNewReferencePath != null)
sNewReferencePath = sNewReferencePath + fs + sNewSubDir;
- // String sNameNoSuffix = FileHelper.getNameNoSuffix(FileHelper.getBasename(sEntry));
- // sNewReferenceFile = sNewReferencePath + fs + sNameNoSuffix + ".prn";
sNewOutputPath = sNewOutputPath + fs + sNewSubDir;
if (sNewDiffPath != null)
sNewDiffPath = sNewDiffPath + fs + sNewSubDir;
}
- // NameHelper aNameContainer = new NameHelper(m_sOutputPath, sNewSubDir, FileHelper.getBasename(sEntry));
- // aNameContainer.print();
-
if (aGTA.checkIfUsableDocumentType(sEntry))
{
runGDCWithStatus(HTMLoutput, LISToutput, sEntry, sNewOutputPath, sNewReferencePath, sNewDiffPath, sNewSubDir);
@@ -301,14 +280,8 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
GraphicalTestArguments aGTA = getGraphicalTestArguments();
OfficeProvider aProvider = null;
- // SimpleFileSemaphore aSemaphore = new SimpleFileSemaphore();
if (aGTA.shouldOfficeStart())
{
- // if (OSHelper.isWindows())
- // {
- // aSemaphore.P(aSemaphore.getSemaphoreFile());
- // }
-
aGTA.getPerformance().startTime(PerformanceContainer.OfficeStart);
aProvider = new OfficeProvider();
XMultiServiceFactory xMSF = (XMultiServiceFactory) aProvider.getManager(param);
@@ -369,13 +342,6 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
if (aProvider != null)
{
aProvider.closeExistingOffice(param, true);
- // if (OSHelper.isWindows())
- // {
- // aSemaphore.V(aSemaphore.getSemaphoreFile());
- // aSemaphore.sleep(2);
- // // wait some time maybe an other process will take the semaphore
- // // I know, this is absolutely dirty, but the whole convwatch is dirty and need a big cleanup.
- // }
}
// -------------------- Status --------------------
@@ -407,17 +373,8 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
GlobalLogWriter.get().println(" NewPath: " + _sNewSubDir);
GlobalLogWriter.get().println("----------------------------------------------------------------------");
-// if (_sNewSubDir.length() > 0)
-// {
-// sLink = sHTMLPrefix /* + "/cw.php?inifile=" */ + _sOutputPath + fs + _sNewSubDir + fs + sFilenameNoSuffix + ".ini";
-// sLinkDD = sHTMLPrefix /* + "/cw.php?inifile=" */ + _sOutputPath + fs + _sNewSubDir + fs + "DiffDiff_" + sFilenameNoSuffix + ".ini";
-// }
-// else
-// {
sLink = sHTMLPrefix /* + "/cw.php?inifile=" */ + _sOutputPath + fs + sFilenameNoSuffix + ".ini";
- // sLinkDD = sHTMLPrefix /* + "/cw.php?inifile=" */ + _sOutputPath + fs + _sNewSubDir + fs + "DiffDiff_" + sFilenameNoSuffix + ".ini";
sLinkDD = sHTMLPrefix /* + "/cw.php?inifile=" */ + _sOutputPath + fs + "DiffDiff_" + sFilenameNoSuffix + ".ini";
-// }
sLinkName = sFilenameNoSuffix;
sLinkDDName = sFilenameNoSuffix + " (DiffDiff)";
diff --git a/qadevOOo/runner/convwatch/DB.java b/qadevOOo/runner/convwatch/DB.java
index af596652c9b1..30ec9b36d7d7 100644
--- a/qadevOOo/runner/convwatch/DB.java
+++ b/qadevOOo/runner/convwatch/DB.java
@@ -23,8 +23,6 @@ import java.util.StringTokenizer;
import java.util.ArrayList;
import helper.OSHelper;
-// import convwatch.DBHelper;
-
public class DB extends DBHelper
{
private static DB m_aDB = null;
@@ -205,48 +203,6 @@ public class DB extends DBHelper
}
}
- // public static void insertinto_file(String _sFilename,
- // String _sBasename,
- // String _sFileFormat,
- // String _sBuildID,
- // String _sSourceType,
- // int _nResolution )
- // {
- // Connection aCon = new ShareConnection().getConnection();
-
- // String sFilename = _sFilename.replace('\\', '/');
-
- // String sDeleteOld = "DELETE FROM file WHERE filename = " + Quote(sFilename);
- // ExecSQL(aCon, sDeleteOld);
-
- // String sValueLine = "type, filename, basename, fileformat, buildid, resolution, date";
- // StringBuffer aDataLine = new StringBuffer();
- // aDataLine.append( Quote(_sSourceType) ) . append( sComma ) .
- // append( Quote( sFilename) ) . append( sComma ) .
- // append( Quote( _sBasename) ) . append( sComma ) .
- // append( Quote( _sFileFormat) ) . append( sComma ) .
- // append( Quote( _sBuildID) ) . append( sComma ) .
- // append( _nResolution) . append( sComma ) .
- // append( Quote( today() ) );
-
- // SQLinsertValues(aCon, "file", sValueLine, aDataLine.toString());
- // }
-
- // public static void updatestate_currentdocs(String _sFilename,
- // String _sState)
- // {
- // Connection aCon = new ShareConnection().getConnection();
-
- // String sFilename = _sFilename.replace('\\', '/');
-
- // // String sDeleteOld = "DELETE FROM file WHERE filename = " + Quote(sFilename);
- // // ExecSQL(aCon, sDeleteOld);
-
- // String sSet = "state=" + Quote(_sState);
- // String sWhere = getWhereClause() + sAND + "name=" + Quote(sFilename);
- // SQLupdateValue( aCon, "currentdocs", sSet, sWhere );
- // }
-
private void sql_test()
{
String sUUID = getDBDistinct();
@@ -265,11 +221,6 @@ public class DB extends DBHelper
java.sql.ResultSetMetaData aResultSetMetaData = aResultSet.getMetaData();
int nColumnCount = aResultSetMetaData.getColumnCount(); // java sql starts with '1'
- // String[] aColumnName = new String[nColumnCount];
- // for(int i=1;i<nColumnCount;i++)
- // {
- // String aColumnName[i - 1] = aResultSetMetaData.getColumnName(i);
- // }
while( aResultSet.next() )
{
@@ -299,12 +250,9 @@ public class DB extends DBHelper
sValue = "UNSUPPORTED TYPE";
}
aResult.append(sValue).append(", ");
- // String sName = aObj.getClass().getName();
- // System.out.println("sqlresult: Class name: " + sName);
}
String sResult = aResult.toString();
aResultList.add(sResult);
- // System.out.println(sResult);
}
catch (java.sql.SQLException e)
{
@@ -324,11 +272,6 @@ public class DB extends DBHelper
{
Connection aCon = new ShareConnection().getConnection();
- // String sInfo = _sInfo.replace('\\', '/');
-
- // String sDeleteOld = "DELETE FROM file WHERE filename = " + Quote(sFilename);
- // ExecSQL(aCon, sDeleteOld);
-
String sSet = "state=" + Quote(_sStatus);
String sWhere = getWhereClause();
if (sWhere.length() > 0)
@@ -340,11 +283,6 @@ public class DB extends DBHelper
{
Connection aCon = new ShareConnection().getConnection();
- // String sInfo = _sInfo.replace('\\', '/');
-
- // String sDeleteOld = "DELETE FROM file WHERE filename = " + Quote(sFilename);
- // ExecSQL(aCon, sDeleteOld);
-
String sSet = "info=" + Quote(_sInfo);
String sWhere = getWhereClause();
SQLupdateValue( aCon, "status", sSet, sWhere );
@@ -383,14 +321,6 @@ public class DB extends DBHelper
private String getWhereClause()
{
StringBuffer aWhereClause = new StringBuffer();
- // WHERE environment='' and referenceversion='' and currentversion='' and documentpool=''
- // aWhere.append( "environment" ). append(sEqual) . append(Quote(m_sEnvironment)) .
- // append(sAND) .
- // append( "referenceversion" ). append(sEqual) . append(Quote(m_sSourceVersion)) .
- // append(sAND) .
- // append( "currentversion" ). append(sEqual) . append(Quote(m_sDestinationVersion)) .
- // append(sAND) .
- // append( "documentpool" ). append(sEqual) . append(Quote(m_sDocumentPool));
boolean bAND = false;
if (m_sDocID != null)
{
@@ -423,22 +353,12 @@ public class DB extends DBHelper
while (aTokenizer.hasMoreTokens())
{
String sToken = aTokenizer.nextToken();
- // System.out.println("PART: " + sToken);
int nIndex = sToken.indexOf("uuid()=");
- // System.out.println("Index " + nIndex);
int nIndexTuettel = sToken.indexOf("'", nIndex);
- // System.out.println("IndexTuettel " + nIndexTuettel);
int nIndexTuettel2 = sToken.lastIndexOf("'");
- // System.out.println("IndexTuettel2 " + nIndexTuettel2);
String sUuid = sToken.substring(nIndexTuettel + 1, nIndexTuettel2);
- // if (sPart.startsWith("p:"))
- // {
- // m_sSourceVersion = sPart.substring(2);
- // GlobalLogWriter.get().println("DB: source version: " + m_sSourceVersion);
- // }
return sUuid;
}
- // System.out.println(sResult);
}
return "0";
@@ -490,65 +410,4 @@ public class DB extends DBHelper
SQLinsertValues(aCon, "documentcompare", sValueLine, aDataLine.toString());
}
- // public static void filesRemove(String _sDBInfoString)
- // {
- // if (_sDBInfoString == null) return;
- // fillVariables(_sDBInfoString);
-
- // Connection aCon = new ShareConnection().getConnection();
-
- // String sDeleteSQL = "DELETE FROM currentdocs WHERE " + getWhereClause();
-
- // ExecSQL(aCon, sDeleteSQL);
- // }
-
- // public static void fileInsert(String _sDBInfoString,
- // String _sFilename,
- // String _sRemovePath)
- // {
- // if (_sDBInfoString == null) return;
- // fillVariables(_sDBInfoString);
-
- // String sFilename = _sFilename.replace('\\', '/');
-
- // Connection aCon = new ShareConnection().getConnection();
-
- // String sValueLine = "environment, referenceversion, currentversion, documentpool, name, state";
- // StringBuffer aDataLine = new StringBuffer();
- // aDataLine.append( Quote(m_sEnvironment) ) . append( sComma ) .
- // append( Quote( m_sSourceVersion) ) . append( sComma ) .
- // append( Quote( m_sDestinationVersion) ) . append( sComma ) .
- // append( Quote( m_sDocumentPool) ) . append( sComma ) .
- // append( Quote( sFilename) ) . append( sComma ) .
- // append( Quote( "undone"));
-
- // SQLinsertValues(aCon, "currentdocs", sValueLine, aDataLine.toString());
- // }
-
-
- // public static void insertinto_file(String _sFilename, String _sFileFormat, String _sBuildID)
- // {
- // Connection aCon = new ShareConnection().getConnection();
-
- // String sValueLine = "type, filename, fileformat, buildid, date";
- // StringBuffer aDataLine = new StringBuffer();
- // aDataLine.append( "1" ) . append( sComma ) .
- // append( Quote( _sFilename) ) . append( sComma ) .
- // append( Quote( _sFileFormat) ) . append( sComma ) .
- // append( Quote( _sBuildID) ) . append( sComma ) .
- // append( Quote( today() ) );
-
- // SQLinsertValues(aCon, "file", sValueLine, aDataLine.toString());
- // }
-
- // public static void main( String[] args )
- // {
-
- // String _sFilename = "";
- // String _sFileFormat = "";
- // String _sBuildID = "";
-
- // // insertinto_file("c:\temp\test.txt", "test", "txt", "nix", "", 0);
- // fillVariables("p:m128,c:m134,d:demo");
- // }
}
diff --git a/qadevOOo/runner/convwatch/DBHelper.java b/qadevOOo/runner/convwatch/DBHelper.java
index 27b95e29ea6c..420e9d03a9ad 100644
--- a/qadevOOo/runner/convwatch/DBHelper.java
+++ b/qadevOOo/runner/convwatch/DBHelper.java
@@ -70,10 +70,8 @@ class ShareConnection
return;
}
- // Connection oCon = null;
try
{
- // oCon = getMySQLConnection();
oStmt = m_aCon.createStatement();
GlobalLogWriter.get().println("DB: " + m_sSQL);
@@ -104,10 +102,6 @@ public class DBHelper
return;
}
- // String aInsertStr = "";
-
- // aInsertStr = "INSERT INTO " + _sTableName + " (" + value_names + " ) VALUES (" + values + ")";
- // ExecSQL(_aCon, aInsertStr);
StringBuffer aInsertStr = new StringBuffer();
aInsertStr.append( "INSERT INTO " ) . append( _sTableName );
@@ -124,10 +118,6 @@ public class DBHelper
return;
}
- // String aUpdateStr = "";
-
- // aUpdateStr = "UPDATE " + _sTableName + " SET " + _sSet + " WHERE " + _sWhere;
- // ExecSQL( _aCon, aUpdateStr );
StringBuffer aUpdateStr = new StringBuffer();
aUpdateStr.append( "UPDATE " ).append( _sTableName )
@@ -204,7 +194,6 @@ public class DBHelper
int nValue = 0;
try
{
- // oCon = getMySQLConnection();
oStmt = _aCon.createStatement();
ResultSet oResult = oStmt.executeQuery(_sSQL);
@@ -221,7 +210,6 @@ public class DBHelper
{
nValue = oResult.getInt(_sColumnName);
}
- // System.out.println("value: " + String.valueOf(nValue));
}
catch (SQLException e)
{
diff --git a/qadevOOo/runner/convwatch/DateHelper.java b/qadevOOo/runner/convwatch/DateHelper.java
index 2412f12df553..bef0a09e7a1c 100644
--- a/qadevOOo/runner/convwatch/DateHelper.java
+++ b/qadevOOo/runner/convwatch/DateHelper.java
@@ -43,7 +43,6 @@ public class DateHelper
Locale aLocale = new Locale("en","US");
SimpleDateFormat aFormat = new SimpleDateFormat(_sFormat, aLocale);
aBuf = aFormat.format(aCalendar.getTime(), aBuf, new FieldPosition(0) );
- // DebugHelper.writeInfo("Date: " + aBuf.toString());
return aBuf.toString();
}
}
diff --git a/qadevOOo/runner/convwatch/DocumentConverter.java b/qadevOOo/runner/convwatch/DocumentConverter.java
index 9c68edbdb5ad..17877459edb2 100644
--- a/qadevOOo/runner/convwatch/DocumentConverter.java
+++ b/qadevOOo/runner/convwatch/DocumentConverter.java
@@ -69,12 +69,10 @@ public class DocumentConverter extends EnhancedComplexTestCase
public void before()
{
- // System.out.println("before()");
}
public void after()
{
- // System.out.println("after()");
}
// The test method itself.
@@ -112,7 +110,6 @@ public class DocumentConverter extends EnhancedComplexTestCase
if (bQuit == true)
{
- // log.println("must quit.");
assure("Must quit, Parameter problems.", false);
}
@@ -194,8 +191,6 @@ public class DocumentConverter extends EnhancedComplexTestCase
// first do a check if the reference not already exist, this is a big speedup, due to the fact,
// we don't need to start a new office.
GraphicalTestArguments aGTA_local = getGraphicalTestArguments();
- // if (GraphicalDifferenceCheck.isReferenceExists(_sInputFile, _sReferencePath, aGTA_local) == false)
- // {
// start a fresh Office
OfficeProvider aProvider = null;
if (aGTA_local.restartOffice())
@@ -254,7 +249,6 @@ public class DocumentConverter extends EnhancedComplexTestCase
// Office shutdown
aProvider.closeExistingOffice(param, true);
}
- // }
}
}
diff --git a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
index a96dc7abdaf6..a53a48b38e8e 100644
--- a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
@@ -28,16 +28,6 @@ import convwatch.GraphicalTestArguments;
public abstract class EnhancedComplexTestCase extends ComplexTestCase
{
- // public void before()
- // {
- // // System.out.println("before()");
- // }
-
- // public void after()
- // {
- // // System.out.println("after()");
- // }
-
void checkExistance(String _sScriptFile, String _sName)
{
// Process testshl = Runtime.getRuntime().exec(scriptFile);
@@ -53,12 +43,9 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase
{
String sError = "Must quit. " + _sName + " may be not accessible.";
assure(sError, false);
- // System.exit(1);
}
else
{
- // System.out.println("Output from script:");
- // System.out.println(sText);
}
}
diff --git a/qadevOOo/runner/convwatch/FileHelper.java b/qadevOOo/runner/convwatch/FileHelper.java
index 0e2fa55a3b25..5ae392128204 100644
--- a/qadevOOo/runner/convwatch/FileHelper.java
+++ b/qadevOOo/runner/convwatch/FileHelper.java
@@ -29,9 +29,6 @@ public class FileHelper
{
public FileHelper()
{
- // fs = System.getProperty("file.separator");
-
-
String sOSName = System.getProperty("os.name");
String sOSArch = System.getProperty("os.arch");
String sOSVersion = System.getProperty("os.version");
@@ -58,22 +55,6 @@ public class FileHelper
{
return true;
}
- // This is just nice for DEBUG behaviour
- // due to the fact this is absolutely context dependency no one should use it.
- // else
- // {
- // System.out.println("FileHelper:exists() tell this path doesn't exists. Check it. path is:" );
- // System.out.println( _sFile );
- // System.out.println( aFile.getAbsolutePath() );
- // MessageBox("Der JavaProzess wartet auf eine interaktion ihrerseits.");
-
- // File aFile2 = new File(_sFile);
- // if (aFile2.exists())
- // {
- // System.out.println("Thanks, file exists." );
- // return true;
- // }
- // }
return false;
}
@@ -206,7 +187,6 @@ public class FileHelper
String part = path_tokenizer.nextToken();
File new_dir = new File(already_done + File.separatorChar + part);
already_done = new_dir.toString();
- // System.out.println(already_done);
//create the directory
new_dir.mkdirs();
if (OSHelper.isUnix() &&
diff --git a/qadevOOo/runner/convwatch/FilenameHelper.java b/qadevOOo/runner/convwatch/FilenameHelper.java
index 35c4f188179d..85b02993c132 100644
--- a/qadevOOo/runner/convwatch/FilenameHelper.java
+++ b/qadevOOo/runner/convwatch/FilenameHelper.java
@@ -149,9 +149,6 @@ abstract class FilenameHelper_impl implements Filenamer
* @return a created name
*/
abstract public String buildName();
- // {
- // return getName();
- // }
/**
* @return the complete filename with it's suffix
@@ -378,11 +375,5 @@ public class FilenameHelper
new OriginalReferenceFilename("/dir1/dir2","/name",".ext");
new OriginalReferenceFilename("/dir1/dir2","name","ext");
-
- // OriginalReferenceFilename b = new OriginalReferenceFilename("c:/dir1/dir2/name.ext");
- // OriginalReferenceFilename c = new OriginalReferenceFilename("file:///dir1/dir2/name.ext");
- // OriginalReferenceFilename e = new OriginalReferenceFilename("c:\\dir1\\dir2\\name");
- // OriginalReferenceFilename f = new OriginalReferenceFilename("c:\\dir1\\dir2");
- // OriginalReferenceFilename g = new OriginalReferenceFilename("c:\\dir1\\dir2\\");
}
}
diff --git a/qadevOOo/runner/convwatch/GfxCompare.java b/qadevOOo/runner/convwatch/GfxCompare.java
index a61505e40984..69af898846ba 100644
--- a/qadevOOo/runner/convwatch/GfxCompare.java
+++ b/qadevOOo/runner/convwatch/GfxCompare.java
@@ -29,14 +29,6 @@ import java.io.File;
public class GfxCompare extends EnhancedComplexTestCase
{
// The first of the mandatory functions:
- /**
- * Return the name of the test.
- * In this case it is the actual name of the service.
- * @return The tested service.
- */
- // public String getTestObjectName() {
- // return "ConvWatch runner";
- // }
// The second of the mandatory functions: return all test methods as an
// array. There is only one test function in this example.
diff --git a/qadevOOo/runner/convwatch/GlobalLogWriter.java b/qadevOOo/runner/convwatch/GlobalLogWriter.java
index 5215a96efed0..aedaf265c940 100644
--- a/qadevOOo/runner/convwatch/GlobalLogWriter.java
+++ b/qadevOOo/runner/convwatch/GlobalLogWriter.java
@@ -34,11 +34,6 @@ public class GlobalLogWriter
return m_aGlobalLogWriter;
}
-// public static synchronized void initialize()
-// {
-// get().initialize(null, true);
-// }
-
public static synchronized void set(LogWriter _aLog)
{
m_aGlobalLogWriter = _aLog;
diff --git a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
index 5d371e48b731..0f8182b998c7 100644
--- a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
+++ b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
@@ -78,7 +78,6 @@ public class GraphicalDifferenceCheck
}
else
{
- // System.out.println("No directory.");
createOneReferenceFile(_sInputPath, _sReferencePath, _aGTA);
}
}
diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
index a45d46a7dc95..338524324120 100644
--- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java
+++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
@@ -112,7 +112,6 @@ public class GraphicalTestArguments
}
else
{
- // log.println("found REFERENCE_TYPE " + sReferenceType );
setReferenceType(sReferenceType);
}
@@ -123,7 +122,6 @@ public class GraphicalTestArguments
}
else
{
- // log.println("found PRINTER_NAME " + sPrinterName );
setPrinterName(sPrinterName);
}
// DEFAULT_XML_FORMAT_APP ------
@@ -166,7 +164,6 @@ public class GraphicalTestArguments
String sImportFilterName = (String)param.get(PropertyName.DOC_CONVERTER_IMPORT_FILTER_NAME);
if (sImportFilterName != null && sImportFilterName.length() > 0)
{
- // System.out.println("found " + PropertyName.DOC_CONVERTER_IMPORT_FILTER_NAME + " " + sImportFilterName );
m_sImportFilterName = sImportFilterName;
if (sImportFilterName.toLowerCase().equals("help"))
@@ -179,7 +176,6 @@ public class GraphicalTestArguments
String sExportFilterName = (String)param.get(PropertyName.DOC_CONVERTER_EXPORT_FILTER_NAME);
if (sExportFilterName != null && sExportFilterName.length() > 0)
{
- // System.out.println("found " + PropertyName.DOC_CONVERTER_EXPORT_FILTER_NAME + " " + sExportFilterName );
m_sExportFilterName = sExportFilterName;
if (sExportFilterName.toLowerCase().equals("help"))
{
@@ -318,7 +314,6 @@ public class GraphicalTestArguments
{
if (_sFilterName.length() == 0)
{
- // System.out.println("No FilterName set.");
return;
}
@@ -327,7 +322,6 @@ public class GraphicalTestArguments
GlobalLogWriter.get().println("MultiServiceFactory not set.");
return;
}
- // XFilterFactory aFilterFactory = null;
Object aObj = null;
try
{
@@ -357,14 +351,6 @@ public class GraphicalTestArguments
}
}
- /*
- public GraphicalTestArguments(TestParameters param, Log xxx)
- {
- // collect interesting information from the ComplexTestCase
-
- }
- */
-
// set methods
public void setReferenceType(String _sType)
{
@@ -622,10 +608,6 @@ public class GraphicalTestArguments
}
TriState m_tWithBorderMove = TriState.UNSET;
- // public TriState isBorderMove()
- // {
- // return m_tWithBorderMove;
- // }
public TriState getBorderMove()
{
return m_tWithBorderMove;
diff --git a/qadevOOo/runner/convwatch/HTMLOutputter.java b/qadevOOo/runner/convwatch/HTMLOutputter.java
index b9e8f06d1b9c..7d99bda6f0ab 100644
--- a/qadevOOo/runner/convwatch/HTMLOutputter.java
+++ b/qadevOOo/runner/convwatch/HTMLOutputter.java
@@ -108,7 +108,6 @@ public class HTMLOutputter
StringBuffer a = new StringBuffer();
if (! OSHelper.isWindows())
{
- // System.out.println("Tu'nix system.");
a.append("<A HREF=\"");
a.append(_sHREF);
a.append("\">");
@@ -117,42 +116,13 @@ public class HTMLOutputter
}
else
{
- // System.out.println("Windows system.");
//! this should be replaced by a better method
//! name(WIN|UNIX)
a.append("<A HREF=\"");
a.append(_sHREF);
a.append("\">");
a.append(_sPathInfo);
- // a.append("(first)");
a.append("</A>");
- // if (_sHREF.charAt(1) == ':' && (_sHREF.charAt(0) == 'x' || _sHREF.charAt(0) == 'X'))
- // int index = 0;
- // index = _sHREF.indexOf("X:");
- // if (index == -1)
- // {
- // index = _sHREF.indexOf("x:");
- // }
- // if (index >= 0)
- // {
- // // int index = 0;
- // // remove "X:" and insert "/tausch"
- // StringBuffer sbUNIXPath = new StringBuffer( _sHREF.substring(0, index) );
- // sbUNIXPath.append("/tausch");
- // sbUNIXPath.append(_sHREF.substring(index + 2));
- // String sUNIXPath = sbUNIXPath.toString();
- // sUNIXPath = utils.replaceAll13(sUNIXPath, "\\", "/");
-
- // a.append("<A HREF=\"");
- // a.append(sUNIXPath);
- // a.append("\">");
- // a.append("(second)");
- // a.append("</A>");
- // }
- // else
- // {
- // System.out.println("Path is '" + _sHREF + "'");
- // }
}
return a.toString();
@@ -366,8 +336,6 @@ public class HTMLOutputter
{
m_aOut.write( "<TR>" + ls);
// the link to the old difference can't offer here
- // String sLink = getHREF(FileHelper.getBasename(_aStatus.m_sOldGfx), FileHelper.getBasename(_aStatus.m_sOldGfx));
- // m_aOut.write( tableDataCell(sLink) );
String sBasename = FileHelper.getBasename(m_sFilename);
String sNew = sBasename.substring(m_sNamePrefix.length());
@@ -383,10 +351,6 @@ public class HTMLOutputter
m_aOut.write( tableDataCell(sLink) );
String sPercent = String.valueOf(_aStatus.nPercent) + "%";
- // if (_aStatus.nPercent > 0 && _aStatus.nPercent < 5)
- // {
- // sPercent += " (less 5% is ok)";
- // }
m_aOut.write(tableDataCell( sPercent ) );
// is the check positiv, in a defined range
diff --git a/qadevOOo/runner/convwatch/INIOutputter.java b/qadevOOo/runner/convwatch/INIOutputter.java
index 0e6c6f99c3b2..3169e42cb3bf 100644
--- a/qadevOOo/runner/convwatch/INIOutputter.java
+++ b/qadevOOo/runner/convwatch/INIOutputter.java
@@ -180,10 +180,6 @@ public class INIOutputter
m_aOut.write( "diffgfx=" + _aStatus.m_sDiffGfx + ls);
String sPercent = String.valueOf(_aStatus.nPercent) + "%";
- // if (_aStatus.nPercent > 0 && _aStatus.nPercent < 5)
- // {
- // sPercent += " (less 5% is ok)";
- // }
m_aOut.write("percent=" + sPercent + ls);
// is the check positiv, in a defined range
diff --git a/qadevOOo/runner/convwatch/ImageHelper.java b/qadevOOo/runner/convwatch/ImageHelper.java
index 1114a8d6aea8..6389971b7136 100644
--- a/qadevOOo/runner/convwatch/ImageHelper.java
+++ b/qadevOOo/runner/convwatch/ImageHelper.java
@@ -22,7 +22,6 @@ import java.awt.Image;
import java.awt.image.PixelGrabber;
import java.awt.image.ImageObserver;
import java.io.File;
-//import javax.imageio.ImageIO;
import java.lang.reflect.Method;
class ImageHelper
@@ -64,11 +63,6 @@ class ImageHelper
return m_aPixels[y * m_w + x];
}
- // Write down the current image to a file.
- // public void storeImage(String _sFilename)
- // {
- // }
-
public static ImageHelper createImageHelper(String _sFilename)
throws java.io.IOException
{
diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java
index 649341ecf45e..b02ddf3ebaf8 100644
--- a/qadevOOo/runner/convwatch/IniFile.java
+++ b/qadevOOo/runner/convwatch/IniFile.java
@@ -54,8 +54,6 @@ class IniFile
if (! aFile.exists())
{
GlobalLogWriter.get().println("couldn't find file " + m_sFilename);
- // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
- // m_bListContainUnsavedChanges = false;
return aLines;
}
RandomAccessFile aReader = null;
@@ -76,13 +74,11 @@ class IniFile
{
GlobalLogWriter.get().println("couldn't open file " + m_sFilename);
GlobalLogWriter.get().println("Message: " + fne.getMessage());
- // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
}
catch (java.io.IOException ie)
{
GlobalLogWriter.get().println("Exception occurs while reading from file " + m_sFilename);
GlobalLogWriter.get().println("Message: " + ie.getMessage());
- // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage());
}
try
{
@@ -92,7 +88,6 @@ class IniFile
{
GlobalLogWriter.get().println("Couldn't close file " + m_sFilename);
GlobalLogWriter.get().println("Message: " + ie.getMessage());
- // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage());
}
return aLines;
}
@@ -287,20 +282,13 @@ class IniFile
File aFile = new File(m_sFilename);
if (aFile.exists())
{
- // System.out.println("couldn't find file " + m_sFilename);
aFile.delete();
if (aFile.exists())
{
GlobalLogWriter.get().println("Couldn't delete the file " + m_sFilename);
return;
- // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, "Couldn't delete the file " + m_sFilename);
}
}
- // if (! aFile.canWrite())
- // {
- // System.out.println("Couldn't write to file " + m_sFilename);
- // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, "");
- // }
try
{
RandomAccessFile aWriter = new RandomAccessFile(aFile, "rw");
@@ -317,13 +305,11 @@ class IniFile
{
GlobalLogWriter.get().println("couldn't open file for writing " + m_sFilename);
GlobalLogWriter.get().println("Message: " + fne.getMessage());
- // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
}
catch(java.io.IOException ie)
{
GlobalLogWriter.get().println("Exception occurs while writing to file " + m_sFilename);
GlobalLogWriter.get().println("Message: " + ie.getMessage());
- // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage());
}
}
@@ -369,75 +355,4 @@ class IniFile
}
}
- // String replaceEvaluatedValue(String _sSection, String _sValue)
- // {
- // String sValue = _sValue;
- // int nIndex = 0;
- // while (( nIndex = sValue.indexOf("$(", nIndex)) >= 0)
- // {
- // int nNextIndex = sValue.indexOf(")", nIndex);
- // if (nNextIndex >= 0)
- // {
- // String sKey = sValue.substring(nIndex + 2, nNextIndex);
- // String sNewValue = getValue(_sSection, sKey);
- // if (sNewValue != null && sNewValue.length() > 0)
- // {
- // String sRegexpKey = "\\$\\(" + sKey + "\\)";
- // sValue = sValue.replaceAll(sRegexpKey, sNewValue);
- // }
- // nIndex = nNextIndex;
- // }
- // else
- // {
- // nIndex += 2;
- // }
- // }
- // return sValue;
- // }
-
-
- // public String getLocalEvaluatedValue(String _sSection, String _sKey)
- // {
- // String sValue = getValue(_sSection, _sKey);
- // sValue = replaceEvaluatedValue(_sSection, sValue);
- // return sValue;
- // }
-
-
-
- // this is a special behaviour.
- // public String getGlobalLocalEvaluatedValue(String _sSection, String _sKey)
- // {
- // String sGlobalValue = getKey("global", _sKey);
- // String sLocalValue = getKey(_sSection, _sKey);
- // if (sLocalValue.length() == 0)
- // {
- // sGlobalValue = replaceEvaluatedKey(_sSection, sGlobalValue);
- // sGlobalValue = replaceEvaluatedKey("global", sGlobalValue);
- // return sGlobalValue;
- // }
- // sLocalValue = replaceEvaluatedKey(_sSection, sLocalValue);
- // sLocalValue = replaceEvaluatedKey("global", sLocalValue);
-
- // return sLocalValue;
- // }
-
-
- /**
- * some tests for this class
- */
-// public static void main(String[] args)
-// {
-// IniFile aIniFile = new IniFile("/tmp/inifile");
-// String sValue = aIniFile.getValue("Section","Key");
-// // insert a new value to a already exist section
-// aIniFile.insertValue("Section","Key2","a new value in a existing section");
-// // replace a value
-// aIniFile.insertValue("Section","Key","replaced value");
-// // create a new value
-// aIniFile.insertValue("New Section", "Key", "a new key value pair");
-
-// String sValue2 = aIniFile.getValue("Section2","Key");
-// aIniFile.store();
-// }
}
diff --git a/qadevOOo/runner/convwatch/MSOfficePrint.java b/qadevOOo/runner/convwatch/MSOfficePrint.java
index be907be3c589..4df3a2f23b10 100644
--- a/qadevOOo/runner/convwatch/MSOfficePrint.java
+++ b/qadevOOo/runner/convwatch/MSOfficePrint.java
@@ -124,9 +124,6 @@ public class MSOfficePrint
{
aStartCommand = createExcelStoreHelper();
}
- // else
- // {
- // }
}
else
{
@@ -142,11 +139,6 @@ public class MSOfficePrint
sFilterName = ""; // xlXMLSpreadsheet";
}
- // String sCommand = sStartCommand + " " +
- // _sInputFile + " " +
- // StringHelper.doubleQuote(sFilterName) + " " +
- // _sOutputFile;
-
aStartCommand.add(_sInputFile);
aStartCommand.add(sFilterName);
aStartCommand.add(_sOutputFile);
@@ -214,10 +206,6 @@ public class MSOfficePrint
sPrinterName = "";
}
- // String sCommand = sStartCommand + " " +
- // _sInputFile + " " +
- // StringHelper.doubleQuote(m_sPrinterName) + " " +
- // _sPrintFilename;
aStartCommand.add(_sInputFile);
aStartCommand.add(m_sPrinterName);
aStartCommand.add(_sPrintFilename);
@@ -406,8 +394,6 @@ public class MSOfficePrint
}
String sName = aPerlScript.getAbsolutePath();
- // String sCommand = "perl " + sName;
- // System.out.println(sCommand);
aList.add("perl");
aList.add(sName);
return aList;
@@ -422,7 +408,6 @@ public class MSOfficePrint
String ls = System.getProperty("line.separator");
String fs = System.getProperty("file.separator");
- // ArrayList aList = new ArrayList();
String sSaveViaWord = "saveViaWord.pl";
ArrayList<String> aList = searchLocalFile(sSaveViaWord);
@@ -584,9 +569,6 @@ public class MSOfficePrint
out.write( "{" + ls);
out.write( " print FILE \"name=$ARGV[0]\\n\";" + ls);
out.write( " print FILE \"ExcelVersion=$sVersion\\n\";" + ls);
-// out.write( " print FILE \"WordStartTime=$stopWordTime\\n\";" + ls);
-// out.write( " print FILE \"WordLoadTime=$stopLoadWordTime\\n\";" + ls);
-// out.write( " print FILE \"WordPrintTime=$stopPrintWordTime\\n\";" + ls);
out.write( " close(FILE);" + ls);
out.write( "}" + ls);
out.close();
@@ -776,9 +758,6 @@ public class MSOfficePrint
out.write( "{" + ls);
out.write( " print FILE \"name=$ARGV[0]\\n\";" + ls);
out.write( " print FILE \"PowerPointVersion=$sVersion\\n\";" + ls);
-// out.write( " print FILE \"WordStartTime=$stopWordTime\\n\";" + ls);
-// out.write( " print FILE \"WordLoadTime=$stopLoadWordTime\\n\";" + ls);
-// out.write( " print FILE \"WordPrintTime=$stopPrintWordTime\\n\";" + ls);
out.write( " close(FILE);" + ls);
out.write( "}" + ls);
out.close();
diff --git a/qadevOOo/runner/convwatch/OSHelper.java b/qadevOOo/runner/convwatch/OSHelper.java
deleted file mode 100644
index 5bb40b6519eb..000000000000
--- a/qadevOOo/runner/convwatch/OSHelper.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package convwatch;
-
-// class OSHelper
-// {
-// public static boolean isWindows()
-// {
-// String sOSName = System.getProperty("os.name");
-// if (sOSName.toLowerCase().startsWith("windows"))
-// {
-// return true;
-// }
-// return false;
-// }
-// // not need
-// // public static boolean isUnix()
-// public static boolean isSolarisIntel()
-// {
-// if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") ||
-// System.getProperty("os.name").toLowerCase().startsWith("sunos") ) &&
-// System.getProperty("os.arch").equals("x86"))
-// {
-// return true;
-// }
-// return false;
-// }
-// public static boolean isSolarisSparc()
-// {
-// if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") ||
-// System.getProperty("os.name").toLowerCase().startsWith("sunos") ) &&
-// System.getProperty("os.arch").equals("sparc"))
-// {
-// return true;
-// }
-// return false;
-// }
-// public static boolean isLinuxIntel()
-// {
-// if (System.getProperty("os.name").toLowerCase().startsWith("linux") &&
-// System.getProperty("os.arch").equals("i386"))
-// {
-// return true;
-// }
-// return false;
-// }
-
-// public static boolean isUnix()
-// {
-// if (isLinuxIntel() ||
-// isSolarisIntel() ||
-// isSolarisSparc())
-// {
-// return true;
-// }
-// return false;
-// }
-
-// }
diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java
index 080b68534933..801987849d9c 100644
--- a/qadevOOo/runner/convwatch/OfficePrint.java
+++ b/qadevOOo/runner/convwatch/OfficePrint.java
@@ -40,12 +40,6 @@ import com.sun.star.uno.AnyConverter;
import helper.URLHelper;
import helper.PropertyHelper;
import helper.OSHelper;
-// import convwatch.FileHelper;
-// import convwatch.MSOfficePrint;
-// import convwatch.GraphicalTestArguments;
-// import convwatch.ConvWatchCancelException;
-
-// import helper.Parameter;
/**
* This Object is to print a given document with OpenOffice.org / StarOffice
@@ -55,39 +49,6 @@ import helper.OSHelper;
public class OfficePrint {
-// static long m_nStartTime;
-// // static Date m_aDateCache = null;
-
-// /*
-// simple helper functions to start/stop a timer, to know how long a process need in milliseconds
-// */
-// public static void startTimer()
-// {
-// // if (m_aDateCache == null)
-// // {
-// // m_aDateCache = new Date();
-// // }
-// // m_nStartTime = m_aDateCache.getTime();
-// m_nStartTime = System.currentTimeMillis();
-// }
-// public static long stopTimer()
-// {
-// // if (m_aDateCache == null)
-// // {
-// // System.out.println("Forgotten to initialise start timer.");
-// // return 0;
-// // }
-// // long m_nStopTime = m_aDateCache.getTime();
-// if (m_nStartTime == 0)
-// {
-// System.out.println("Forgotten to initialise start timer.");
-// return 0;
-// }
-// long m_nStopTime = System.currentTimeMillis();
-// return m_nStopTime - m_nStartTime;
-// }
-
-
private static void showProperty(PropertyValue _aValue)
{
String sName = _aValue.Name;
@@ -114,8 +75,6 @@ public class OfficePrint {
for (int i=0;i<aArgs.length;i++)
{
PropertyValue aValue = aArgs[i];
- // System.out.print("Property: '" + aValue.Name);
- // System.out.println("' := '" + aValue.Value + "'");
if (aValue.Name.equals("FilterName") ||
aValue.Name.equals("MediaType"))
{
@@ -157,10 +116,6 @@ public class OfficePrint {
if (aDesktop != null)
{
GlobalLogWriter.get().println("com.sun.star.frame.Desktop created.");
- // String sInputURL = aCurrentParameter.sInputURL;
- // String sOutputURL = aCurrentParameter.sOutputURL;
- // String sPrintFileURL = aCurrentParameter.sPrintToFileURL;
- // System.out.println(_sInputURL);
// set here the loadComponentFromURL() properties
@@ -168,20 +123,6 @@ public class OfficePrint {
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>();
- // check which properties should set and count it.
- // if (_aGTA.isHidden())
- // {
- // nPropertyCount ++;
- // }
- // if (_aGTA.getImportFilterName() != null && _aGTA.getImportFilterName().length() > 0)
- // {
- // nPropertyCount ++;
- // }
-
- // initialize the propertyvalue
- // int nPropertyIndex = 0;
- // aProps = new PropertyValue[ nPropertyCount ];
-
// set all property values
if (_aGTA.isHidden())
{
@@ -201,12 +142,9 @@ public class OfficePrint {
}
GlobalLogWriter.get().println(DateHelper.getDateTimeForHumanreadableLog() + " Load document");
- // GlobalLogWriter.get().flush();
XComponentLoader aCompLoader = UnoRuntime.queryInterface( XComponentLoader.class, aDesktop);
- // XComponent aDoc = null;
-
_aGTA.getPerformance().startTime(PerformanceContainer.Load);
aDoc = aCompLoader.loadComponentFromURL(_sInputURL, "_blank", 0, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList) );
_aGTA.getPerformance().stopTime(PerformanceContainer.Load);
@@ -451,10 +389,6 @@ public class OfficePrint {
sBuildID = _aGTA.getBuildID();
out.write("buildid=" + sBuildID + ls);
}
- // if (_sSpecial != null && _sSpecial.length() > 0)
- // {
- // out.write("special=" + _sSpecial + ls);
- // }
out.write(ls);
out.write("# resolution given in DPI" + ls);
out.write("resolution=" + _aGTA.getResolutionInDPI() + ls);
@@ -463,12 +397,6 @@ public class OfficePrint {
{
out.write("buildid=" + _sSpecial + ls);
}
- // long nTime = stopTimer();
- // if (nTime != 0)
- // {
- // out.write("# time is given in milli seconds" + ls);
- // out.write("time=" + nTime + ls);
- // }
out.write(ls);
out.write("# Values out of System.getProperty(...)" + ls);
@@ -565,27 +493,12 @@ public class OfficePrint {
try
{
- // System.out.println("Document loaded.");
// Change Pagesettings to DIN A4
GlobalLogWriter.get().println(DateHelper.getDateTimeForHumanreadableLog() + " Print document.");
XPrintable aPrintable = UnoRuntime.queryInterface( XPrintable.class, _aDoc);
if (aPrintable != null)
{
- // System.out.println(" Set PaperFormat to DIN A4");
- // {
- // PropertyValue[] aPrinterProps = aPrintable.getPrinter();
- // System.out.println("PrinterProps size: " + String.valueOf(aPrinterProps.length));
- // int nPropIndex = 0;
- // while (!"PaperFormat".equals(aPrinterProps[nPropIndex].Name))
- // {
- // // System.out.println(aPrinterProps[nPropIndex].Name);
- // nPropIndex++;
- // }
- // aPrinterProps[nPropIndex].Value = com.sun.star.view.PaperFormat.A4;
- // aPrintable.setPrinter(aPrinterProps);
- // }
-
// configure Office to allow to execute macos
// TODO: We need a possibility to set the printer name also for StarOffice/OpenOffice
@@ -594,13 +507,11 @@ public class OfficePrint {
if (_aGTA.getPrinterName() != null)
{
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>();
- // PropertyValue [] aPrintProps = new PropertyValue[1];
PropertyValue Arg = new PropertyValue();
Arg.Name = "Name";
Arg.Value = _aGTA.getPrinterName();
aPropertyList.add(Arg);
showProperty(Arg);
- // GlobalLogWriter.get().println("Printername is not null, so set to " + _aGTA.getPrinterName());
aPrintable.setPrinter(PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList));
}
}
@@ -608,14 +519,6 @@ public class OfficePrint {
// set property values for XPrintable.print()
// more can be found at "http://api.libreoffice.org/docs/common/ref/com/sun/star/view/PrintOptions.html"
- // int nProperties = 1; // default for 'FileName' property
- // if (_aGTA.printAllPages() == false)
- // {
- // // we don't want to print all pages, build Pages string by ourself
- // nProperties ++;
- // }
- // int nPropsCount = 0;
-
// If we are a SpreadSheet (calc), we need to set PrintAllSheets property to 'true'
XServiceInfo xServiceInfo = UnoRuntime.queryInterface( XServiceInfo.class, _aDoc );
if ( xServiceInfo.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
@@ -631,13 +534,10 @@ public class OfficePrint {
}
ArrayList<PropertyValue> aPrintProps = new ArrayList<PropertyValue>();
- // GlobalLogWriter.get().println("Property FileName:=" + _sPrintFileURL);
- // PropertyValue [] aPrintProps = new PropertyValue[nProperties];
PropertyValue Arg = new PropertyValue();
Arg.Name = "FileName";
Arg.Value = _sPrintFileURL;
- // aPrintProps[nPropsCount ++] = Arg;
aPrintProps.add(Arg);
showProperty(Arg);
@@ -664,8 +564,6 @@ public class OfficePrint {
showProperty(Arg);
}
- // GlobalLogWriter.get().println("Start printing.");
-
_aGTA.getPerformance().startTime(PerformanceContainer.Print);
aPrintable.print(PropertyHelper.createPropertyValueArrayFormArrayList(aPrintProps));
TimeHelper.waitInSeconds(1, "Start waiting for print ready.");
@@ -679,7 +577,6 @@ public class OfficePrint {
int nPropIndex = 0;
while (!"IsBusy".equals(aPrinterProps[nPropIndex].Name))
{
- // System.out.println(aPrinterProps[nPropIndex].Name);
nPropIndex++;
}
isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE);
@@ -740,32 +637,24 @@ public class OfficePrint {
{
if (! FileHelper.exists(_sAbsoluteInputFile))
{
- // throw new ConvWatchCancelException("Input file: " + _sAbsoluteInputFile + " does not exist.");
return false;
}
String fs = System.getProperty("file.separator");
- // String sInputFileURL = URLHelper.getFileURLFromSystemPath(_sAbsoluteInputFile);
-
String sInputFileBasename = FileHelper.getBasename(_sAbsoluteInputFile);
- // String sOutputFileURL = null;
String sOutputPath;
if (_sAbsoluteOutputPath != null)
{
sOutputPath = _sAbsoluteOutputPath;
- // FileHelper.makeDirectories("", sOutputPath);
}
else
{
String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
sOutputPath = sInputPath;
}
- // sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename);
- // sOutputFileURL = null;
String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
- // String sPrintFileURL;
String sAbsolutePrintFilename = sOutputPath + fs + sPrintFilename + ".prn";
if (FileHelper.exists(sAbsolutePrintFilename) && _aGTA.getOverwrite() == false)
@@ -817,7 +706,6 @@ public class OfficePrint {
String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
sOutputPath = sInputPath;
}
- // sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename);
sOutputFileURL = null;
String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
@@ -868,9 +756,6 @@ public class OfficePrint {
}
- // remember the current timer, to know how long a print process need.
- // startTimer();
-
if (_aGTA.getReferenceType().toLowerCase().equals("ooo"))
{
bBack = printToFileWithOOo(_aGTA, _sInputFileURL, _sOutputFileURL, _sPrintFileURL);
@@ -912,7 +797,6 @@ public class OfficePrint {
}
else
{
- // System.out.println("");
throw new ConvWatchCancelException("OfficePrint.printToFile(): Unknown print type.");
}
return bBack;
@@ -957,7 +841,6 @@ public class OfficePrint {
{
if (_sFilterName.length() == 0)
{
- // System.out.println("No FilterName set.");
return null;
}
@@ -966,7 +849,6 @@ public class OfficePrint {
GlobalLogWriter.get().println("MultiServiceFactory not set.");
return null;
}
- // XFilterFactory aFilterFactory = null;
Object aObj = null;
try
{
@@ -983,18 +865,6 @@ public class OfficePrint {
if (aNameAccess != null)
{
- // if (_sFilterName.toLowerCase().equals("help"))
- // {
- // System.out.println("Show all possible ElementNames from current version." );
- // String[] aElementNames = aNameAccess.getElementNames();
- // for (int i = 0; i<aElementNames.length; i++)
- // {
- // System.out.println(aElementNames[i]);
- // }
- // System.out.println("Must quit.");
- // System.out.exit(1);
- // }
-
if (! aNameAccess.hasByName(_sFilterName))
{
GlobalLogWriter.get().println("FilterFactory.hasByName() says there exist no '" + _sFilterName + "'" );
@@ -1008,15 +878,12 @@ public class OfficePrint {
if (aElements != null)
{
String sInternalFilterName = null;
- // System.out.println("getByName().length: " + String.valueOf(aElements.length));
for (int i=0;i<aElements.length; i++)
{
PropertyValue aPropertyValue = (PropertyValue)aElements[i];
- // System.out.println("PropertyValue.Name: " + aPropertyValue.Name);
if (aPropertyValue.Name.equals("Type"))
{
String sValue = (String)aPropertyValue.Value;
- // System.out.println("Type: " + sValue);
sInternalFilterName = sValue;
}
}
@@ -1047,7 +914,6 @@ public class OfficePrint {
{
if (_sFilterName.length() == 0)
{
- // System.out.println("No FilterName set.");
return null;
}
@@ -1085,14 +951,12 @@ public class OfficePrint {
if (aElements != null)
{
String sServiceName = null;
- // System.out.println("getByName().length: " + String.valueOf(aElements.length));
for (int i=0;i<aElements.length; i++)
{
PropertyValue aPropertyValue = (PropertyValue)aElements[i];
if (aPropertyValue.Name.equals("DocumentService"))
{
String sValue = (String)aPropertyValue.Value;
- // System.out.println("DocumentService: " + sValue);
sServiceName = sValue;
break;
}
@@ -1123,7 +987,6 @@ public class OfficePrint {
{
if (_sInternalFilterName.length() == 0)
{
- // System.out.println("No FilterName set.");
return null;
}
@@ -1149,13 +1012,6 @@ public class OfficePrint {
if (aNameAccess != null)
{
- // System.out.println("Show ElementNames" );
- // String[] aElementNames = aNameAccess.getElementNames();
- // for (int i = 0; i<aElementNames.length; i++)
- // {
- // System.out.println(aElementNames[i]);
- // }
-
if (! aNameAccess.hasByName(_sInternalFilterName))
{
GlobalLogWriter.get().println("TypeDetection.hasByName() says there exist no '" + _sInternalFilterName + "'" );
@@ -1170,11 +1026,9 @@ public class OfficePrint {
if (aElements != null)
{
String sExtension = null;
- // System.out.println("getByName().length: " + String.valueOf(aElements.length));
for (int i=0;i<aElements.length; i++)
{
PropertyValue aPropertyValue = (PropertyValue)aElements[i];
- // System.out.println("PropertyValue.Name: " + aPropertyValue.Name);
if (aPropertyValue.Name.equals("Extensions"))
{
aExtensions = (String[])aPropertyValue.Value;
@@ -1222,7 +1076,6 @@ public class OfficePrint {
}
String sInputURL = URLHelper.getFileURLFromSystemPath(_sInputFile);
- // showType(sInputURL, xMSF);
XComponent aDoc = loadFromURL( _aGTA, sInputURL);
if (aDoc == null)
{
@@ -1245,8 +1098,6 @@ public class OfficePrint {
TimeHelper.waitInSeconds(1, "wait after loadFromURL.");
XServiceInfo xServiceInfo = UnoRuntime.queryInterface( XServiceInfo.class, aDoc );
- // String sFilter = getFilterName_forExcel(xServiceInfo);
- // System.out.println("Filter is " + sFilter);
// store the document in an other directory
XStorable xStorable = UnoRuntime.queryInterface( XStorable.class, aDoc);
@@ -1258,9 +1109,6 @@ public class OfficePrint {
String sFilterName = _aGTA.getExportFilterName();
- // initialize PropertyArray
- // PropertyValue [] aStoreProps = new PropertyValue[ nPropertyCount ];
- // int nPropertyIndex = 0;
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>();
String sExtension = "";
@@ -1303,7 +1151,6 @@ public class OfficePrint {
PropertyValue Arg = new PropertyValue();
Arg.Name = "FilterName";
Arg.Value = sFilterName;
- // aStoreProps[nPropertyIndex ++] = Arg;
aPropertyList.add(Arg);
showProperty(Arg);
GlobalLogWriter.get().println("FilterName is set to: " + sFilterName);
@@ -1314,9 +1161,7 @@ public class OfficePrint {
{
// create the new filename with the extension, which is ok to the file format
String sInputFileBasename = FileHelper.getBasename(_sInputFile);
- // System.out.println("InputFileBasename " + sInputFileBasename);
String sInputFileNameNoSuffix = FileHelper.getNameNoSuffix(sInputFileBasename);
- // System.out.println("InputFilename no suffix " + sInputFileNameNoSuffix);
String fs = System.getProperty("file.separator");
String sOutputFile = _sOutputPath;
if (! sOutputFile.endsWith(fs))
diff --git a/qadevOOo/runner/convwatch/PRNCompare.java b/qadevOOo/runner/convwatch/PRNCompare.java
index 2310afe143a5..81c426928c47 100644
--- a/qadevOOo/runner/convwatch/PRNCompare.java
+++ b/qadevOOo/runner/convwatch/PRNCompare.java
@@ -30,35 +30,17 @@ import java.util.ArrayList;
// --------------------------------- PRNCompare ---------------------------------
-// class DifferenceType
-// {
-// final static int NO_DIFFERENCE = 1;
-// final static int DIFFERENCE = 2;
-
-// public int nValue = NO_DIFFERENCE;
-// public boolean equals(int _n)
-// {
-// if ( _n == nValue ) return true;
-// return false;
-// }
-// }
-
-
public class PRNCompare
{
- // OSHelper m_aHelper;
String fs;
public PRNCompare()
{
- // m_aHelper = new OSHelper();
fs = System.getProperty("file.separator");
}
String executeSynchronously(String _sCommand)
{
- // System.out.println(_sCommand);
-
ProcessHandler aHandler = new ProcessHandler(_sCommand);
aHandler.executeSynchronously();
@@ -74,15 +56,6 @@ public class PRNCompare
// TODO: check if directory exist should be done earlier
File aDirectory = new File(_sDirectory);
File[] aDirList = aDirectory.listFiles(
- /*
- new FileFilter() {
- boolean accept(File filename)
- {
- if (filename.getName().endsWith("jpg"))
- return true;
- return false;
- }
- } */
);
int nMaxNumber = 0;
@@ -95,7 +68,6 @@ public class PRNCompare
if (sDirEntry.startsWith(_sBasename))
{
- // System.out.println(sDirEntry);
int nJpgIdx = sDirEntry.lastIndexOf(".jpg");
String sValue = sDirEntry.substring(_sBasename.length(), nJpgIdx);
int nValue = 0;
@@ -107,7 +79,6 @@ public class PRNCompare
{
}
- // System.out.println(nValue);
nNum = nValue;
}
@@ -126,7 +97,6 @@ public class PRNCompare
String m_sDocFile;
String m_sReferenceFile;
String m_sPostScriptFile;
- // String m_sOldDiff;
int m_nMaxPages = 0;
int m_nResolutionInDPI = 0;
TriState m_tUseBorderMove;
@@ -146,10 +116,6 @@ public class PRNCompare
public void setBorderMove(TriState _b) {m_tUseBorderMove = _b;}
public TriState getBorderMove() {return m_tUseBorderMove;}
- // public void setOldDiffPath(String _sOldDiff)
- // {
- // m_sOldDiff = _sOldDiff;
- // }
public void setMaxPages(int _n) {m_nMaxPages = _n;}
int getMaxPages() {return m_nMaxPages;}
@@ -210,10 +176,6 @@ public class PRNCompare
public static String[] createJPEGFromPostscript(String _sOutputPath, String _sSourcePath, String _sSourceFile, int _nResolutionInDPI)
{
String sGS_PageOutput = "%04d";
- // if ( OSHelper.isWindows() )
- // {
- // sGS_PageOutput = "%%d";
- // }
FileHelper.makeDirectories("", _sOutputPath);
@@ -239,14 +201,6 @@ public class PRNCompare
"-sOutputFile=" + sJPGFilename,
sOriginalFile
};
- // System.out.println("Start Command array");
- // try
- // {
- // Runtime.getRuntime().exec(sCommandArray);
- // } catch (Exception e) {
- // System.out.println("FAILED");
- // }
- // System.out.println("done");
ProcessHandler aHandler = new ProcessHandler(sCommandArray);
aHandler.executeSynchronously();
@@ -294,9 +248,6 @@ public class PRNCompare
int nS1_Files = getMaxNumOfFileEntry(_sSourcePath1, sS1Basename);
int nS2_Files = getMaxNumOfFileEntry(_sSourcePath2, sS2Basename);
- // System.out.println("count of s1 files " + String.valueOf(nS1_Files));
- // System.out.println("count of s2 files " + String.valueOf(nS2_Files));
-
// take the min of both
int nMin = Math.min(nS1_Files, nS2_Files);
nMin = Math.min(nMin, _nMaxDiffs);
@@ -304,7 +255,6 @@ public class PRNCompare
StatusHelper[] aList = new StatusHelper[nMin];
// TODO: if both document do not have same page count, produce an error
- // System.out.println("min of both: " + String.valueOf(nMin));
int nStatusIndex = 0;
for (int i=1;i<=nMin;i++)
@@ -317,7 +267,6 @@ public class PRNCompare
String sDiffGfx = compareJPEGs(sOldGfx, sNewGfx, sDiffGfx_);
StatusHelper aStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx);
- // if (FileHelper.exists(sDiffGfx))
if (sDiffGfx.length() > 0)
{
int nResult = identify(sDiffGfx);
@@ -333,10 +282,6 @@ public class PRNCompare
aStatus.nDiffStatus = StatusHelper.DIFF_DIFFERENCES_FOUND;
aStatus.nPercent = nPercent;
- // GlobalLogWriter.get().println("Hello World: Percent:= " + nPercent);
- // GlobalLogWriter.get().println("Hello World: TriState:= " + _tUseBorderMove.intValue());
- // GlobalLogWriter.get().println("Hello World: DocType:= " + m_sDocumentType);
-
// TODO: insert here the new BorderRemover if the percentage value is creater than 75%
if (nPercent > 75 &&
((_tUseBorderMove == TriState.TRUE ) ||
@@ -357,7 +302,6 @@ public class PRNCompare
String sDiff_BM_Gfx = compareJPEGs( sOld_BM_Gfx, sNew_BM_Gfx, sDiff_BM_Gfx_);
- // if (FileHelper.exists(sDiff_BM_Gfx))
if (sDiff_BM_Gfx.length() > 0)
{
nResult = identify(sDiff_BM_Gfx);
@@ -391,11 +335,6 @@ public class PRNCompare
}
}
- // checkDiff(sOldGfx, sNewGfx, sDiffGfx);
- // if (i >= _nMaxDiffs)
- // {
- // break;
- // }
}
aList[nStatusIndex ++] = aStatus;
}
@@ -420,20 +359,17 @@ public class PRNCompare
StatusHelper[] aList = new StatusHelper[nMin];
// TODO: if both document do not have same page count, produce an error
- // System.out.println("min of both: " + String.valueOf(nMin));
int nStatusIndex = 0;
for (int i=1;i<=nMin;i++)
{
String sOldGfx = _aRefList[i];
String sNewGfx = _aPSList[i];
- // String sDiffGfx_ = getJPEGName(_sOutputPath, sS1Basename + ".diff", StringHelper.createValueString(i, 4));
String sDiffGfx = compareJPEGs(sOldGfx, sNewGfx );
StatusHelper aStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx);
- // if (FileHelper.exists(sDiffGfx))
if (sDiffGfx.length() > 0)
{
int nResult = identify(sDiffGfx);
@@ -446,9 +382,6 @@ public class PRNCompare
try
{
int nPercent = estimateGfx(sOldGfx, sNewGfx, sDiffGfx);
- // GlobalLogWriter.get().println("Hello World: Percent:= " + nPercent);
- // GlobalLogWriter.get().println("Hello World: TriState:= " + _tUseBorderMove.intValue());
- // GlobalLogWriter.get().println("Hello World: DocType:= " + m_sDocumentType);
aStatus.nDiffStatus = StatusHelper.DIFF_DIFFERENCES_FOUND;
aStatus.nPercent = nPercent;
@@ -481,7 +414,6 @@ public class PRNCompare
aStatus.setFilesForBorderMove(sOld_BM_Gfx, sNew_BM_Gfx, sDiff_BM_Gfx);
- // if (FileHelper.exists(sDiff_BM_Gfx))
if (sDiff_BM_Gfx.length() > 0)
{
nResult = identify(sDiff_BM_Gfx);
@@ -513,11 +445,6 @@ public class PRNCompare
}
}
- // checkDiff(sOldGfx, sNewGfx, sDiffGfx);
- // if (i >= _nMaxDiffs)
- // {
- // break;
- // }
}
aList[nStatusIndex ++] = aStatus;
}
@@ -547,11 +474,6 @@ public class PRNCompare
sComposite = "composite.exe";
}
- // String sCommand = sComposite + " -compose difference " +
- // StringHelper.doubleQuoteIfNeed(_sOldGfx) + " " +
- // StringHelper.doubleQuoteIfNeed(_sNewGfx) + " " +
- // StringHelper.doubleQuoteIfNeed(_sDiffGfx);
-
String[] sCommandArray =
{
sComposite,
@@ -568,7 +490,6 @@ public class PRNCompare
String sBack = aHandler.getOutputText();
GlobalLogWriter.get().println("'" + sBack + "'");
- // return aHandler.getExitCode();
if (FileHelper.exists(_sDiffGfx))
{
return _sDiffGfx;
@@ -586,10 +507,6 @@ public class PRNCompare
int nResult = 0;
// would like to know what the meaning of %k is for ImageMagick's 'identify'
String sIM_Format = "%k";
- // if (OSHelper.isWindows())
- // {
- // sIM_Format = "%%k";
- // }
String sIdentify = "identify";
if (OSHelper.isWindows())
@@ -597,8 +514,6 @@ public class PRNCompare
sIdentify = "identify.exe";
}
- // String sCommand = sIdentify + " " + sIM_Format + " " + StringHelper.doubleQuoteIfNeed(_sDiffGfx);
-
String[] sCommandArray =
{
sIdentify,
@@ -647,23 +562,6 @@ public class PRNCompare
StatusHelper aCurrentStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx);
- // String sComposite = "composite";
- // if (OSHelper.isWindows())
- // {
- // sComposite = "composite.exe";
- // }
-
- // String sCommand = sComposite +" -compose difference " +
- // StringHelper.doubleQuoteIfNeed(sOldGfx) + " " +
- // StringHelper.doubleQuoteIfNeed(sNewGfx) + " " +
- // StringHelper.doubleQuoteIfNeed(sDiffGfx);
-
-
- // // System.out.println(sCommand);
- // // executeSynchronously(sCommand);
- // ProcessHandler aHandler = new ProcessHandler(sCommand);
- // boolean bBackValue = aHandler.executeSynchronously();
-
compareJPEGs(sOldGfx, sNewGfx, sDiffGfx);
if (FileHelper.exists(sDiffGfx))
@@ -686,9 +584,6 @@ public class PRNCompare
aCurrentStatus.nPercent = -1;
}
}
- // LLA: should diffdiff file delete?
- // File aFile = new File(sDiffGfx);
- // aFile.delete();
}
else
{
@@ -744,50 +639,4 @@ public class PRNCompare
return nPercent;
}
-
-
-/*
- * Some selftest functionallity
- */
-// public static void main(String[] args)
-// {
- // System.out.println(FileHelper.getNameNoSuffix("doc.sxw"));
- // System.out.println(FileHelper.getSuffix("doc.sxw"));
- // System.out.println(FileHelper.getBasename("doc.sxw"));
- // System.out.println(FileHelper.getBasename("/tmp/doc.sxw"));
-
-// PRNCompare a = new PRNCompare();
-// a.setInputPath( "/cws/so-cwsserv06/qadev18/SRC680/src.m47/convwatch.keep/input/msoffice/xp/PowerPoint");
-// a.setReferencePath( "/cws/so-cwsserv06/qadev18/SRC680/src.m47/convwatch.keep/input/msoffice/xp/PowerPoint");
-// a.setOutputPath( "/tmp/convwatch_java");
-// a.setDocFile( "1_Gov.ppt");
-// a.setReferenceFile( "1_Gov.prn" );
-// a.setPostScriptFile("1_Gov.ps" );
- // a.compare();
-
-
-// LLA: 20040804 sample how to build jpegs from reference files
-// a.createJPEGFromPostscript("/tmp/convwatch_java",
-// "/home/apitest/WorkFromHome/20040804/reference", "worddoc.prn" );
-
-// a.createJPEGFromPostscript("/tmp/convwatch_java",
-// "/home/apitest/WorkFromHome/20040804/reference", "worddoc.ps" );
-
-// Status[] aList = a.createDiffs("/tmp/convwatch_java",
-// "/tmp/convwatch_java", "worddoc.prn",
-// "/tmp/convwatch_java", "worddoc.ps",
-// 2);
-
-// LLA: 20040805 sample how to check 2 gfx files
-// this function return DifferenceType.NO_DIFFERENCE if the pictures contain no graphically difference
-// DifferenceType aReturnValue = a.checkDiffDiff("/tmp/convwatch_java",
-// "/tmp/convwatch_java", "worddoc.prn.diff1.jpg",
-// "/tmp/convwatch_java/old", "worddoc.prn.diff1.jpg");
-// if (aReturnValue.equals( DifferenceType.NO_DIFFERENCE ))
-// {
-// System.out.println("There is no difference between both diff files.");
-// }
-
- // a.setOldDiff( "/olddiffs");
-// }
}
diff --git a/qadevOOo/runner/convwatch/PerformanceContainer.java b/qadevOOo/runner/convwatch/PerformanceContainer.java
index 0d90fec8a15f..87612dc00531 100644
--- a/qadevOOo/runner/convwatch/PerformanceContainer.java
+++ b/qadevOOo/runner/convwatch/PerformanceContainer.java
@@ -220,18 +220,4 @@ public class PerformanceContainer /* extends *//* implements */ {
}
}
-// public static void main(String[] args) {
-
-// BorderRemover a = new BorderRemover();
-// try
-// {
-// a.createNewImageWithoutBorder(args[0], args[1]);
-// }
-// catch(java.io.IOException e)
-// {
-// System.out.println("Exception caught.");
-// }
-// */
-// }
-
}
diff --git a/qadevOOo/runner/convwatch/PixelCounter.java b/qadevOOo/runner/convwatch/PixelCounter.java
index ccce8c93a815..ef0223a7c1e5 100644
--- a/qadevOOo/runner/convwatch/PixelCounter.java
+++ b/qadevOOo/runner/convwatch/PixelCounter.java
@@ -18,7 +18,6 @@
package convwatch;
-// import java.awt.Image;
import convwatch.ImageHelper;
@@ -34,7 +33,6 @@ class CountNotWhite extends CountPixel
{
public CountNotWhite()
{
- // System.out.println("CountWhite()");
}
public void count(int pixel)
@@ -43,7 +41,6 @@ class CountNotWhite extends CountPixel
int green = (pixel >> 8) & 0xff;
int blue = (pixel ) & 0xff;
- // System.out.println(String.valueOf(red) + ":" + String.valueOf(green) + ":" + String.valueOf(blue));
if (red == 0xff && green == 0xff && blue == 0xff)
{
return;
@@ -57,7 +54,6 @@ class CountNotBlack extends CountPixel
{
public CountNotBlack()
{
- // System.out.println("CountBlack()");
}
public void count(int pixel)
@@ -132,7 +128,6 @@ class graphics_stuff
public class PixelCounter {
- // private Image m_aImage;
ImageHelper m_aImage;
@@ -168,23 +163,6 @@ public class PixelCounter {
-// public static void main(String[] args) {
-
-// String a = helper.StringHelper.createValueString(10, 4);
-// int dummy = 1;
-//
-// BorderRemover a = new BorderRemover();
-// try
-// {
-// a.createNewImageWithoutBorder(args[0], args[1]);
-// }
-// catch(java.io.IOException e)
-// {
-// System.out.println("Exception caught.");
-// }
-// */
-// }
-
}
diff --git a/qadevOOo/runner/convwatch/ReferenceBuilder.java b/qadevOOo/runner/convwatch/ReferenceBuilder.java
index a371abcafe5f..41a496eab9f0 100644
--- a/qadevOOo/runner/convwatch/ReferenceBuilder.java
+++ b/qadevOOo/runner/convwatch/ReferenceBuilder.java
@@ -68,12 +68,10 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
public void before()
{
- // System.out.println("before()");
}
public void after()
{
- // System.out.println("after()");
}
// The test method itself.
@@ -111,7 +109,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
if (bQuit == true)
{
- // log.println("must quit.");
assure("Must quit, Parameter problems.", false);
}
@@ -140,9 +137,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
// check if all need software is installed and accessible
checkEnvironment(mustInstalledSoftware());
- // test_removeFirstDirectorysAndBasenameFrom();
- // Get the MultiServiceFactory.
- // XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
GraphicalTestArguments aGTA = getGraphicalTestArguments();
if (aGTA == null)
{
@@ -165,13 +159,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
FileFilter aFileFilter = FileHelper.getFileFilter();
Object[] aList = DirectoryHelper.traverse(m_sInputPath, aFileFilter, aGTA.includeSubDirectories());
- // fill into DB
- // DB.filesRemove(aGTA.getDBInfoString());
- // for (int j=0;j<aList.length;j++)
- // {
- // String sEntry = (String)aList[j];
- // DB.fileInsert(aGTA.getDBInfoString(), sEntry, sRemovePath);
- // }
// normal run.
for (int i=0;i<aList.length;i++)
@@ -195,9 +182,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
}
else
{
- // String sRemovePath = aInputPath.getAbsolutePath();
- // DB.fileInsert(aGTA.getDBInfoString(), m_sInputPath, sRemovePath);
- // DB.updatestate_status(aGTA.getDBInfoString(), "started: " + m_sInputPath);
if (aGTA.checkIfUsableDocumentType(m_sInputPath))
{
runGDC(m_sInputPath, m_sReferencePath);
@@ -217,10 +201,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
// SimpleFileSemaphore aSemaphore = new SimpleFileSemaphore();
if (aGTA.shouldOfficeStart())
{
- // if (OSHelper.isWindows())
- // {
- // aSemaphore.P(aSemaphore.getSemaphoreFile());
- // }
aGTA.getPerformance().startTime(PerformanceContainer.OfficeStart);
aProvider = new OfficeProvider();
XMultiServiceFactory xMSF = (XMultiServiceFactory) aProvider.getManager(param);
@@ -238,7 +218,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
GlobalLogWriter.get().println("Set office watcher");
Object aWatcher = param.get("Watcher");
GlobalLogWriter.get().setWatcher(aWatcher);
- // initializeWatcher(param);
try
{
@@ -269,13 +248,6 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
boolean bClosed = aProvider.closeExistingOffice(param, true);
// Hope I can check that the close of the office fails
assure("Office closed", bClosed, true);
- // if (OSHelper.isWindows())
- // {
- // aSemaphore.V(aSemaphore.getSemaphoreFile());
- // aSemaphore.sleep(2);
- // // wait some time maybe an other process will take the semaphore
- // // I know, this is absolutely dirty, but the whole convwatch is dirty and need a big cleanup.
- // }
}
}
else
diff --git a/qadevOOo/runner/convwatch/ReportDesignerTest.java b/qadevOOo/runner/convwatch/ReportDesignerTest.java
index 40af4452bba4..8a4be7382ba5 100644
--- a/qadevOOo/runner/convwatch/ReportDesignerTest.java
+++ b/qadevOOo/runner/convwatch/ReportDesignerTest.java
@@ -39,37 +39,11 @@ import com.sun.star.uno.XInterface;
import com.sun.star.util.XCloseable;
import com.sun.star.lang.XServiceInfo;
-// import util.BasicMacroTools;
-// import util.DesktopTools;
-// import util.dbg;
import complexlib.ComplexTestCase;
import helper.OfficeProvider;
import helper.URLHelper;
import helper.OfficeWatcher;
-// import convwatch.DB;
-
-// import java.util.Date;
-// import java.text.SimpleDateFormat;
-// import java.text.ParsePosition;
-// import java.sql.Time;
-
-// import java.io.BufferedReader;
-// import java.io.File;
-// import java.io.FileReader;
-// import java.io.IOException;
-// import java.io.FilenameFilter;
-
-// import java.util.Vector;
-
-// import helper.AppProvider;
-// import java.text.DecimalFormat;
-// import util.DynamicClassLoader;
-// import java.util.StringTokenizer;
-
-
-
-
class PropertySetHelper
{
XPropertySet m_xPropertySet;
@@ -173,11 +147,6 @@ public class ReportDesignerTest extends ComplexTestCase {
}
}
- // if (sOfficePath.startsWith("\"") ||
- // sOfficePath.startsWith("'"))
- // {
- // sOfficePath = sOfficePath.substring(1);
- // }
sOfficePath = helper.StringHelper.removeQuoteIfExists(sOfficePath);
log.println(sOfficePath);
@@ -231,12 +200,10 @@ public class ReportDesignerTest extends ComplexTestCase {
private static XMultiServiceFactory m_xXMultiServiceFactory = null;
private void startOffice()
{
- // int tempTime = param.getInt("SingleTimeOut");
param.put("TimeOut", new Integer(300000));
System.out.println("TimeOut: " + param.getInt("TimeOut"));
System.out.println("ThreadTimeOut: " + param.getInt("ThreadTimeOut"));
- // OfficeProvider aProvider = null;
m_aProvider = new OfficeProvider();
m_xXMultiServiceFactory = (XMultiServiceFactory) m_aProvider.getManager(param);
param.put("ServiceFactory", m_xXMultiServiceFactory);
@@ -255,9 +222,6 @@ public class ReportDesignerTest extends ComplexTestCase {
private String m_sMailAddress = null;
private String m_sParentDistinct = null;
- // private String m_sUPDMinor;
- // private String m_sCWS_WORK_STAMP;
-
private static String m_sSourceVersion;
private static String m_sDestinationVersion;
private static String m_sSourceName;
@@ -285,9 +249,6 @@ public class ReportDesignerTest extends ComplexTestCase {
String sUser = System.getProperty("user.name");
log.println("user.name='" + sUser + "'");
- // String sVCSID = System.getProperty("VCSID");
- // log.println("VCSID='" + sVCSID + "'");
- // m_sMailAddress = sVCSID + "@openoffice.org";
m_sMailAddress = System.getProperty("MailAddress");
log.println("Assumed mail address: " + m_sMailAddress);
@@ -297,9 +258,6 @@ public class ReportDesignerTest extends ComplexTestCase {
m_sSourceName = System.getProperty("SourceName");
m_sDestinationVersion = System.getProperty("DestinationVersion");
m_sDestinationName = System.getProperty("DestinationName");
- // createDBEntry();
- // log.println("Current CWS: " + m_sCWS_WORK_STAMP);
- // log.println("Current MWS: " + m_sUPDMinor);
if (m_sSourceVersion == null)
{
@@ -311,36 +269,19 @@ public class ReportDesignerTest extends ComplexTestCase {
log.println("sAppExecutionCommand='" + sAppExecutionCommand + "'");
// an other way to replace strings
- // sAppExecutionCommand = utils.replaceAll13(sAppExecutionCommand, "${USERNAME}", sUser);
checkIfOfficeExists(sAppExecutionCommand);
param.put("AppExecutionCommand", sAppExecutionCommand);
- // System.exit(1);
-
// --------------------------- Start the given Office ---------------------------
startOffice();
// ------------------------------ Start a test run ------------------------------
- // String sCurrentDirectory = System.getProperty("user.dir");
- // log.println("Current Dir: " + sCurrentDirectory);
String sDocument = (String) param.get(convwatch.PropertyName.DOC_COMPARATOR_INPUT_PATH);
sDocument = helper.StringHelper.removeQuoteIfExists( sDocument );
startTestForFile(sDocument);
- // if (sDocument.toLowerCase().indexOf("writer") >= 0)
- // {
- // startTestForFile(sDocument, WRITER);
- // }
- // else if (sDocument.toLowerCase().indexOf("calc") >= 0)
- // {
- // startTestForFile(sDocument, CALC);
- // }
- // else
- // {
- // assure("Can't identify the document no 'writer' nor 'calc' in its name given.", false);
- // }
}
catch (AssureException e)
{
@@ -363,15 +304,6 @@ public class ReportDesignerTest extends ComplexTestCase {
XComponent xDocComponent = loadComponent(sFileURL, getXDesktop(), null);
log.println("Load done");
-// context = createUnoService("com.sun.star.sdb.DatabaseContext")
-// oDataBase = context.getByName("hh")
-// oDBDoc = oDataBase.DatabaseDocument
-
-// dim args(1) as new com.sun.star.beans.PropertyValue
-// args(0).Name = "ActiveConnection"
-// args(0).Value = oDBDoc.getCurrentController().getPropertyValue("ActiveConnection")
-// reportContainer = oDBDoc.getReportDocuments()
-// report = reportContainer.loadComponentFromURL("Report40","",0,args)
try
{
@@ -382,45 +314,25 @@ public class ReportDesignerTest extends ComplexTestCase {
XNameAccess xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, x);
showElements(xNameAccess);
Object aObj = xNameAccess.getByName(sFileURL);
-// log.println("1");
- // PropertySetHelper aHelper = new PropertySetHelper(aObj);
XDocumentDataSource xDataSource = UnoRuntime.queryInterface(XDocumentDataSource.class, aObj);
-// Object aDatabaseDocmuent = aHelper.getPropertyValueAsObject("DatabaseDocument");
XOfficeDatabaseDocument xOfficeDBDoc = xDataSource.getDatabaseDocument();
- // XOfficeDatabaseDocument xOfficeDBDoc = (XOfficeDatabaseDocument)UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, aDatabaseDocument);
assure("can't access DatabaseDocument", xOfficeDBDoc != null);
-// log.println("2");
XModel xDBSource = UnoRuntime.queryInterface(XModel.class, xOfficeDBDoc);
Object aController = xDBSource.getCurrentController();
assure("Controller of xOfficeDatabaseDocument is empty!", aController != null);
-// log.println("3");
XDatabaseDocumentUI aDBDocUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class, aController);
aDBDocUI.connect();
-// if (aDBDocUI.isConnected())
-// {
-// System.out.println("true");
-// }
-// else
-// {
-// System.out.println("false");
-// }
-// log.println("4");
-
- // aHelper = new PropertySetHelper(aController);
-
- // Object aActiveConnectionObj = aHelper.getPropertyValueAsObject("ActiveConnection");
+
Object aActiveConnectionObj = aDBDocUI.getActiveConnection();
assure("ActiveConnection is empty", aActiveConnectionObj != null);
-// log.println("5");
XReportDocumentsSupplier xSupplier = UnoRuntime.queryInterface(XReportDocumentsSupplier.class, xOfficeDBDoc);
xNameAccess = xSupplier.getReportDocuments();
assure("xOfficeDatabaseDocument returns no Report Document", xNameAccess != null);
-// log.println("5");
showElements(xNameAccess);
@@ -440,11 +352,6 @@ public class ReportDesignerTest extends ComplexTestCase {
log.println("Message: " + e.getMessage());
}
- // String mTestDocumentPath = (String) param.get("TestDocumentPath");
- // System.out.println("mTestDocumentPath: '" + mTestDocumentPath + "'");
- // // workaround for issue using deprecated "DOCPTH" prop
- // System.setProperty("DOCPTH", mTestDocumentPath);
-
// Close the document
closeComponent(xDocComponent);
}
@@ -452,7 +359,6 @@ public class ReportDesignerTest extends ComplexTestCase {
private String getDocumentPoolName(/*int _nType*/)
{
return "AutogenReportDesignTest";
- // return getFileFormat(_nType);
}
@@ -464,14 +370,8 @@ public class ReportDesignerTest extends ComplexTestCase {
DB.init(sDBConnection);
String sSourceVersion = m_sSourceVersion;
- // String sSourceVersion = sFixRefSubDirectory;
String sSourceName = m_sSourceName;
- // String sSourceCreatorType = "fixref";
String sSourceCreatorType = "";
- // if (sDestinationVersion.length() == 0)
- // {
- // sDestinationVersion = m_sUPDMinor;
- // }
String sDestinationName = m_sDestinationName;
String sDestinationCreatorType = "";
String sDocumentPoolDir = getOutputPath(/*_nType*/);
@@ -483,8 +383,6 @@ public class ReportDesignerTest extends ComplexTestCase {
sDocumentPoolDir, sDocumentPoolName, m_sMailAddress,
sSpecial, m_sParentDistinct);
TimeHelper.waitInSeconds(1, "wait for DB.");
- // DB.test();
- // System.exit(1);
}
private void loadAndStoreReports(XNameAccess _xNameAccess, ArrayList<PropertyValue> _aPropertyList /*, int _nType*/ )
@@ -524,36 +422,6 @@ public class ReportDesignerTest extends ComplexTestCase {
return sExtension;
}
- // switch(_nType)
- // {
- // case WRITER:
- // sExtension = ".odt";
- // break;
- // case CALC:
- // sExtension = ".ods";
- // break;
- // default:
- // sExtension = ".UNKNOWN";
- // }
- // return sExtension;
- // }
- // private String getFileFormat(int _nType)
- // {
- // String sFileType;
- // switch(_nType)
- // {
- // case WRITER:
- // sFileType = "writer8";
- // break;
- // case CALC:
- // sFileType = "calc8";
- // break;
- // default:
- // sFileType = "UNKNOWN";
- // }
- // return sFileType;
- // }
-
private String m_sOutputPath = null;
private String getOutputPath(/*int _nType*/)
@@ -568,13 +436,9 @@ public class ReportDesignerTest extends ComplexTestCase {
{
sOutputPath += System.getProperty("file.separator");
}
- // sOutputPath += "tmp_123";
sOutputPath += DateHelper.getDateTimeForFilename();
sOutputPath += System.getProperty("file.separator");
- // sOutputPath += getFileFormat(_nType);
- // sOutputPath += System.getProperty("file.separator");
-
File aOutputFile = new File(sOutputPath); // create the directory of the given output path
aOutputFile.mkdirs();
m_sOutputPath = sOutputPath;
@@ -603,11 +467,6 @@ public class ReportDesignerTest extends ComplexTestCase {
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>(); // set some properties for storeAsURL
- // PropertyValue aFileFormat = new PropertyValue();
- // aFileFormat.Name = "FilterName";
- // aFileFormat.Value = getFileFormat(_nType);
- // aPropertyList.add(aFileFormat);
-
PropertyValue aOverwrite = new PropertyValue(); // always overwrite already exist files
aOverwrite.Name = "Overwrite";
aOverwrite.Value = Boolean.TRUE;
diff --git a/qadevOOo/runner/convwatch/StatusHelper.java b/qadevOOo/runner/convwatch/StatusHelper.java
index e4484e55fdd2..46a8ff38f1cf 100644
--- a/qadevOOo/runner/convwatch/StatusHelper.java
+++ b/qadevOOo/runner/convwatch/StatusHelper.java
@@ -26,7 +26,6 @@ public class StatusHelper
final static public int DIFF_AFTER_MOVE_DONE_NO_PROBLEMS = 4;
final static public int DIFF_AFTER_MOVE_DONE_DIFFERENCES_FOUND = 5;
- // public String m_sOutputPath;
public String m_sMainName;
public String m_sOldGfx;
@@ -86,14 +85,4 @@ public class StatusHelper
}
}
-
-
-
-
-// TODO: stream output
-// public stream& statusline(stream)
-// {
-// stream << name << "PASS" << nDiff==0?"PASS":"FAIL" << endl;
-// return stream;
-// }
}
diff --git a/qadevOOo/runner/graphical/BuildID.java b/qadevOOo/runner/graphical/BuildID.java
index 04a18b91909f..2a83aa9ce2c3 100644
--- a/qadevOOo/runner/graphical/BuildID.java
+++ b/qadevOOo/runner/graphical/BuildID.java
@@ -117,7 +117,6 @@ public class BuildID
private static String getBuildIDFromVersion(String _sOfficePath, String _sIniSection)
{
- // String fs = System.getProperty("file.separator");
String sBuildID = "";
String sOfficePath;
if (OSHelper.isWindows())
@@ -140,29 +139,6 @@ public class BuildID
return sBuildID;
}
-// public static void main(String[] args)
-// {
-// String sApp;
-// sApp = "/opt/staroffice8_m116/program/soffice --headless --accept=socket,host=localhost,port=8100;urp;";
-// String sBuildID;
-// sBuildID = getBuildID(sApp);
-// System.out.println("BuildID is: " + sBuildID);
-
-// Date aDate = new Date();
-// long nStart = aDate.getTime();
-// System.out.println("Time:" + nStart);
-// // LLA: Just some more tests for getBuildID
-// // sApp = "/opt/staroffice8_net/program/soffice";
-// // sBuildID = getBuildID(sApp);
-// // System.out.println("BuildID is: " + sBuildID);
-
-// // sApp = "\"/opt/staroffice8_net/program/soffice\" test blah";
-// // sBuildID = getBuildID(sApp);
-
-// // System.out.println("BuildID is: " + sBuildID);
-// System.exit(1);
-// }
-
public static String getMinor(String _sOfficePath)
{
final String sOfficePath = getOfficePath(_sOfficePath);
@@ -184,23 +160,4 @@ public class BuildID
return sCWSName;
}
-// public static void main(String[] args)
-// {
-// String sApp;
-// sApp = "D:/staroffice9_m63/Sun/StarOffice 9/program/soffice.exe";
-// String sBuildID;
-// sBuildID = getBuildID(sApp);
-// System.out.println("BuildID is: " + sBuildID);
-
-// String sMinor;
-// sMinor = getMinor(sApp);
-// System.out.println("Minor is: " + sMinor);
-
-// String sCWSName;
-// sCWSName = getCWSName(sApp);
-// System.out.println("CWSName is: " + sCWSName);
-
-// System.exit(1);
-// }
-
}
diff --git a/qadevOOo/runner/graphical/DateHelper.java b/qadevOOo/runner/graphical/DateHelper.java
index 4bbd6668ff0c..1e12d16834a8 100644
--- a/qadevOOo/runner/graphical/DateHelper.java
+++ b/qadevOOo/runner/graphical/DateHelper.java
@@ -43,7 +43,6 @@ public class DateHelper
Locale aLocale = new Locale("en","US");
SimpleDateFormat aFormat = new SimpleDateFormat(_sFormat, aLocale);
aBuf = aFormat.format(aCalendar.getTime(), aBuf, new FieldPosition(0) );
- // DebugHelper.writeInfo("Date: " + aBuf.toString());
return aBuf.toString();
}
}
diff --git a/qadevOOo/runner/graphical/FileHelper.java b/qadevOOo/runner/graphical/FileHelper.java
index 9ae716f92cef..aa565f98efa5 100644
--- a/qadevOOo/runner/graphical/FileHelper.java
+++ b/qadevOOo/runner/graphical/FileHelper.java
@@ -34,9 +34,6 @@ public class FileHelper
{
public FileHelper()
{
- // fs = System.getProperty("file.separator");
-
-
String sOSName = System.getProperty("os.name");
String sOSArch = System.getProperty("os.arch");
String sOSVersion = System.getProperty("os.version");
@@ -66,22 +63,6 @@ public class FileHelper
{
return true;
}
- // This is just nice for DEBUG behaviour
- // due to the fact this is absolutely context dependency no one should use it.
- // else
- // {
- // System.out.println("FileHelper:exists() tell this path doesn't exists. Check it. path is:" );
- // System.out.println( _sFile );
- // System.out.println( aFile.getAbsolutePath() );
- // MessageBox("Der JavaProzess wartet auf eine interaktion ihrerseits.");
-
- // File aFile2 = new File(_sFile);
- // if (aFile2.exists())
- // {
- // System.out.println("Thanks, file exists." );
- // return true;
- // }
- // }
return false;
}
@@ -113,7 +94,6 @@ public class FileHelper
{
return "";
}
- // String fs = System.getProperty("file.separator");
int nIdx = _sFilename.lastIndexOf("\\");
if (nIdx == -1)
@@ -161,7 +141,6 @@ public class FileHelper
{
return "";
}
- // String fs = System.getProperty("file.separator");
int nIdx = _sFilename.lastIndexOf("\\");
if (nIdx == -1)
@@ -175,40 +154,6 @@ public class FileHelper
return "";
}
-/*
- static ArrayList files = new ArrayList();
- public static Object[] traverse( String afileDirectory )
- {
-
- File fileDirectory = new File(afileDirectory);
- // Testing, if the file is a directory, and if so, it throws an exception
- if ( !fileDirectory.isDirectory() )
- {
- throw new IllegalArgumentException( "not a directory: " + fileDirectory.getName() );
- }
-
- // Getting all files and directories in the current directory
- File[] entries = fileDirectory.listFiles();
-
- // Iterating for each file and directory
- for ( int i = 0; i < entries.length; ++i )
- {
- // adding file to List
- try
- {
- // Composing the URL by replacing all backslashs
- String stringUrl = "file:///"
- + entries[ i ].getAbsolutePath().replace( '\\', '/' );
- files.add(stringUrl);
- }
- catch( Exception exception )
- {
- exception.printStackTrace();
- }
- }
- return files.toArray();
- }
-*/
// makeDirectories("", "/tmp/a/b");
// creates all directories /tmp/a/b
@@ -237,7 +182,6 @@ public class FileHelper
String part = path_tokenizer.nextToken();
File new_dir = new File(already_done + File.separatorChar + part);
already_done = new_dir.toString();
- // System.out.println(already_done);
//create the directory
new_dir.mkdirs();
if (OSHelper.isUnix() &&
@@ -409,28 +353,6 @@ public class FileHelper
}
}
-// try
-// {
-// File inputFile = new File(_sSource);
-// File outputFile = new File(_sDestination);
-
-// java.io.FileReader in = new java.io.FileReader(inputFile);
-// java.io.FileWriter out = new java.io.FileWriter(outputFile);
-// int c;
-
-// while ((c = in.read()) != -1)
-// {
-// out.write(c);
-// }
-
-// in.close();
-// out.close();
-// }
-// catch (java.io.IOException e)
-// {
-// GlobalLogWriter.get().println("Exception caught. FileHelper.copy('" + _sSource + ", " + _sDestination + "')");
-// GlobalLogWriter.get().println("Message: " + e.getMessage());
-// }
}
@@ -633,10 +555,6 @@ public class FileHelper
}
aIniFile.insertValue("global", "buildid", sBuildID);
- // if (_sSpecial != null && _sSpecial.length() > 0)
- // {
- // out.write("special=" + _sSpecial + ls);
- // }
out.println();
out.println("# resolution given in DPI");
out.println("resolution=" + _aGTA.getResolutionInDPI());
@@ -648,13 +566,6 @@ public class FileHelper
aIniFile.insertValue("global", "buildid", _sSpecial);
}
- // long nTime = stopTimer();
- // if (nTime != 0)
- // {
- // out.write("# time is given in milli seconds" + ls);
- // out.write("time=" + nTime + ls);
- // }
-
out.println();
out.println("# Values out of System.getProperty(...)");
out.println("os.name=" + System.getProperty("os.name"));
@@ -684,24 +595,10 @@ public class FileHelper
}
aIniFile.close();
-// String sExtension = FileHelper.getSuffix(_aGTA.getInputFile());
-// if (sExtension.startsWith("."))
-// {
-// sExtension = sExtension.substring(1);
-// }
-
-// DB.writeToDB(_aGTA.getInputFile(),
-// sNameNoSuffix,
-// sExtension,
-// sBuildID,
-// _aGTA.getReferenceType(),
-// _aGTA.getResolutionInDPI()
-// );
}
public static void addBasenameToFile(String _sIndexFilename, String _sBasename, String _sCreator, String _sType, String _sSource)
{
- // String sOutputDir = FileHelper.getPath(_sOutputFilename);
String sPath;
if (_sIndexFilename.startsWith("file:"))
{
@@ -717,36 +614,17 @@ public class FileHelper
aIniFile.insertValue(_sBasename, "type", _sType);
aIniFile.insertValue(_sBasename, "source", _sSource);
aIniFile.close();
-// File aFile = new File(sIndexFilename);
-// try
-// {
-// RandomAccessFile aRandomAccess = new RandomAccessFile(aFile, "rw");
-// // String sBasename = FileHelper.getBasename(_sOutputFilename);
-// aRandomAccess.seek(aRandomAccess.length()); // jump to the end.
-//// TODO: seems to be wrong, there exist no writeLine() with 'return' ending?
-// aRandomAccess.writeUTF(_sBasename);
-// aRandomAccess.close();
-// }
-// catch (java.io.FileNotFoundException e)
-// {
-// }
-// catch (java.io.IOException e)
-// {
-// }
}
public static void addBasenameToPostscript(String _sOutputFilename)
{
String sIndexFilename = FileHelper.appendPath(_sOutputFilename, "postscript.ini");
- // String sPath = FileHelper.getPath(sIndexFilename);
String sBasename = FileHelper.getBasename(_sOutputFilename);
addBasenameToFile(sIndexFilename, sBasename, "", "", "");
}
public static void addBasenameToIndex(String _sOutputFilename, String _sBasename, String _sCreator, String _sType, String _sSource)
{
String sIndexFilename = FileHelper.appendPath(_sOutputFilename, "index.ini");
- // String sPath = FileHelper.getPath(sIndexFilename);
- // String sBasename = FileHelper.getBasename(_sOutputFilename);
addBasenameToFile(sIndexFilename, _sBasename, _sCreator, _sType, _sSource);
}
diff --git a/qadevOOo/runner/graphical/GlobalLogWriter.java b/qadevOOo/runner/graphical/GlobalLogWriter.java
index 8a6e799e3cec..027e8c07d897 100644
--- a/qadevOOo/runner/graphical/GlobalLogWriter.java
+++ b/qadevOOo/runner/graphical/GlobalLogWriter.java
@@ -45,11 +45,6 @@ public class GlobalLogWriter
return m_aGlobalLogWriter;
}
-// public static synchronized void initialize()
-// {
-// get().initialize(null, true);
-// }
-
protected static synchronized void set(LogWriter _aLog)
{
m_aGlobalLogWriter = _aLog;
diff --git a/qadevOOo/runner/graphical/HTMLResult.java b/qadevOOo/runner/graphical/HTMLResult.java
index d81e677ea85e..3482dc45de10 100644
--- a/qadevOOo/runner/graphical/HTMLResult.java
+++ b/qadevOOo/runner/graphical/HTMLResult.java
@@ -20,14 +20,10 @@ package graphical;
import java.io.File;
import java.io.FileWriter;
-// import util.utils;
-// import helper.OSHelper;
public class HTMLResult
{
private FileWriter m_aOut;
- // private String m_sFilename;
- // private String m_sNamePrefix; // the HTML files used a suffix to build it's right name
/**
* ls is the current line separator (carridge return)
@@ -37,7 +33,6 @@ public class HTMLResult
public HTMLResult( String _sOutputPath, String _sHTMLFilename )
{
FileHelper.makeDirectories("", _sOutputPath);
- // HTMLResult a = new HTMLResult();
String sFilename = FileHelper.appendPath(_sOutputPath, _sHTMLFilename);
try
@@ -50,15 +45,9 @@ public class HTMLResult
{
e.printStackTrace();
GlobalLogWriter.println("ERROR: Can't create HTML Outputter");
- // return null;
}
- // m_sFilename = sFilename;
- // a.m_sNamePrefix = _sNamePrefix;
- // return a;
}
- // public String getFilename() {return m_sFilename;}
-
private void writeln(String _sStr)
{
try
diff --git a/qadevOOo/runner/graphical/ImageHelper.java b/qadevOOo/runner/graphical/ImageHelper.java
index beea44fe056d..e06a6880f27b 100644
--- a/qadevOOo/runner/graphical/ImageHelper.java
+++ b/qadevOOo/runner/graphical/ImageHelper.java
@@ -22,7 +22,6 @@ import java.awt.Image;
import java.awt.image.PixelGrabber;
import java.awt.image.ImageObserver;
import java.io.File;
-//import javax.imageio.ImageIO;
import java.lang.reflect.Method;
class ImageHelper
@@ -68,11 +67,6 @@ class ImageHelper
return m_aPixels[y * m_w + x];
}
- // Write down the current image to a file.
- // public void storeImage(String _sFilename)
- // {
- // }
-
public static ImageHelper createImageHelper(String _sFilename)
throws java.io.IOException
{
@@ -105,7 +99,6 @@ class ImageHelper
"Cannot construct object with current Java version " +
javaVersion + ": " + ex.getMessage());
}
-// aImage = ImageIO.read(aFile);
return new ImageHelper(aImage);
}
}
diff --git a/qadevOOo/runner/graphical/IniFile.java b/qadevOOo/runner/graphical/IniFile.java
index 23a4290548ae..7c3e31e588cf 100644
--- a/qadevOOo/runner/graphical/IniFile.java
+++ b/qadevOOo/runner/graphical/IniFile.java
@@ -17,7 +17,6 @@
*/
package graphical;
-// import java.io.BufferedReader;
import java.io.File;
import java.io.RandomAccessFile;
import java.util.ArrayList;
@@ -49,10 +48,6 @@ public class IniFile implements Enumeration<String>
m_sFilename = _sFilename;
m_aList = loadLines();
m_aEnumerationPos = findNextSection(0);
-// if (_sFilename.endsWith(".odb.ps.ini"))
-// {
-// int dummy = 0;
-// }
}
public void insertFirstComment(String[] _aList)
@@ -73,13 +68,9 @@ public class IniFile implements Enumeration<String>
ArrayList<String> aLines = new ArrayList<String>();
if (!aFile.exists())
{
- // GlobalLogWriter.println("couldn't find file '" + m_sFilename + "', will be created.");
- // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
- // m_bListContainUnsavedChanges = false;
return aLines;
}
RandomAccessFile aReader = null;
- // BufferedReader aReader;
try
{
aReader = new RandomAccessFile(aFile, "r");
@@ -97,13 +88,11 @@ public class IniFile implements Enumeration<String>
{
GlobalLogWriter.println("couldn't open file " + m_sFilename);
GlobalLogWriter.println("Message: " + fne.getMessage());
- // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
}
catch (java.io.IOException ie)
{
GlobalLogWriter.println("Exception occurs while reading from file " + m_sFilename);
GlobalLogWriter.println("Message: " + ie.getMessage());
- // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage());
}
try
{
@@ -113,7 +102,6 @@ public class IniFile implements Enumeration<String>
{
GlobalLogWriter.println("Couldn't close file " + m_sFilename);
GlobalLogWriter.println("Message: " + ie.getMessage());
- // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage());
}
return aLines;
}
@@ -323,8 +311,6 @@ public class IniFile implements Enumeration<String>
@param _sKey string
@return the value found in the inifile which is given by the section and key parameter
*/
- // private int m_nCurrentPosition;
- // private String m_sOldKey;
public String getValue(String _sSection, String _sKey)
{
String sValue = "";
@@ -341,16 +327,6 @@ public class IniFile implements Enumeration<String>
return sValue;
}
-// private String getNextValue()
-// {
-// if (m_nCurrentPosition >= 0)
-// {
-// ++m_nCurrentPosition;
-// String sValue = getValue(m_nCurrentPosition);
-// return sValue;
-// }
-// return "";
-// }
/**
* Returns the value at Section, Key converted to an integer
* Check with hasValue(Section, Key) to check before you get into trouble.
@@ -399,21 +375,14 @@ public class IniFile implements Enumeration<String>
File aFile = new File(m_sFilename);
if (aFile.exists())
{
- // System.out.println("couldn't find file " + m_sFilename);
// TODO: little bit unsafe here, first rename, after write is complete, delete the old.
aFile.delete();
if (aFile.exists())
{
GlobalLogWriter.println("Couldn't delete the file " + m_sFilename);
return;
- // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, "Couldn't delete the file " + m_sFilename);
}
}
- // if (! aFile.canWrite())
- // {
- // System.out.println("Couldn't write to file " + m_sFilename);
- // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, "");
- // }
try
{
RandomAccessFile aWriter = new RandomAccessFile(aFile, "rw");
@@ -434,13 +403,11 @@ public class IniFile implements Enumeration<String>
{
GlobalLogWriter.println("couldn't open file for writing " + m_sFilename);
GlobalLogWriter.println("Message: " + fne.getMessage());
- // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
}
catch (java.io.IOException ie)
{
GlobalLogWriter.println("Exception occurs while writing to file " + m_sFilename);
GlobalLogWriter.println("Message: " + ie.getMessage());
- // DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage());
}
}
@@ -504,58 +471,6 @@ public class IniFile implements Enumeration<String>
}
}
- // String replaceEvaluatedValue(String _sSection, String _sValue)
- // {
- // String sValue = _sValue;
- // int nIndex = 0;
- // while (( nIndex = sValue.indexOf("$(", nIndex)) >= 0)
- // {
- // int nNextIndex = sValue.indexOf(")", nIndex);
- // if (nNextIndex >= 0)
- // {
- // String sKey = sValue.substring(nIndex + 2, nNextIndex);
- // String sNewValue = getValue(_sSection, sKey);
- // if (sNewValue != null && sNewValue.length() > 0)
- // {
- // String sRegexpKey = "\\$\\(" + sKey + "\\)";
- // sValue = sValue.replaceAll(sRegexpKey, sNewValue);
- // }
- // nIndex = nNextIndex;
- // }
- // else
- // {
- // nIndex += 2;
- // }
- // }
- // return sValue;
- // }
-
-
- // public String getLocalEvaluatedValue(String _sSection, String _sKey)
- // {
- // String sValue = getValue(_sSection, _sKey);
- // sValue = replaceEvaluatedValue(_sSection, sValue);
- // return sValue;
- // }
-
-
-
- // this is a special behaviour.
- // public String getGlobalLocalEvaluatedValue(String _sSection, String _sKey)
- // {
- // String sGlobalValue = getKey("global", _sKey);
- // String sLocalValue = getKey(_sSection, _sKey);
- // if (sLocalValue.length() == 0)
- // {
- // sGlobalValue = replaceEvaluatedKey(_sSection, sGlobalValue);
- // sGlobalValue = replaceEvaluatedKey("global", sGlobalValue);
- // return sGlobalValue;
- // }
- // sLocalValue = replaceEvaluatedKey(_sSection, sLocalValue);
- // sLocalValue = replaceEvaluatedKey("global", sLocalValue);
-
- // return sLocalValue;
- // }
public void removeSection(String _sSectionToRemove)
{
// first, search for the name
@@ -584,30 +499,8 @@ public class IniFile implements Enumeration<String>
/**
* some tests for this class
*/
-// public static void main(String[] args)
-// {
-// String sTempFile = System.getProperty("java.io.tmpdir");
-// sTempFile += "inifile";
-// IniFile aIniFile = new IniFile(sTempFile);
-// String sValue = aIniFile.getValue("Section", "Key");
-// // insert a new value to a already exist section
-// aIniFile.insertValue("Section", "Key2", "a new value in a existing section");
-// // replace a value
-// aIniFile.insertValue("Section", "Key", "replaced value");
-// // create a new value
-// aIniFile.insertValue("New Section", "Key", "a new key value pair");
-// aIniFile.insertValue("New Section", "Key2", "a new second key value pair");
-
-// String sValue2 = aIniFile.getValue("Section2", "Key");
-
-// aIniFile.removeSection("Section");
-// aIniFile.removeSection("New Section");
-
-// aIniFile.close();
-// }
-
/**
* Enumeration Interface
* @return true, if there are more Key values
diff --git a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
index e7bb68cfcde6..42a777ade477 100644
--- a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
@@ -60,15 +60,6 @@ public class MSOfficePostscriptCreator implements IOffice
{
m_aParameterHelper = _aParam;
m_sResult = _sResult;
-// String sKillCommand = (String)_aParam.getTestParameters().get(util.PropertyName.APP_KILL_COMMAND);
-// if (sKillCommand == null)
-// {
-// sKillCommand = "";
-// }
-// if (sKillCommand.length() > 0)
-// {
-// sKillCommand += ";";
-// }
String sKillCommand = "C:/bin/kill.exe -9 winword;C:/bin/kill.exe -9 excel";
_aParam.getTestParameters().put(util.PropertyName.APP_KILL_COMMAND, sKillCommand);
}
@@ -144,11 +135,6 @@ public class MSOfficePostscriptCreator implements IOffice
{
return true;
}
- /* temporal insertion by SUS
- if (_sSuffix.endsWith(".xml"))
- {
- return true;
- }*/
return false;
}
@@ -198,7 +184,6 @@ public class MSOfficePostscriptCreator implements IOffice
{
// special case, if xml we prefer word, but with DEFAULT_XML_FORMAT_APP=excel it's changeable.
String sDocFormat = getXMLDocumentFormat(_sInputFile);
- // if (_aGTA.getDefaultXMLFormatApp().toLowerCase().equals("excel"))
if (sDocFormat.equals("excel"))
{
aStartCommand = createExcelStoreHelper();
@@ -207,9 +192,6 @@ public class MSOfficePostscriptCreator implements IOffice
{
aStartCommand = createWordStoreHelper();
}
- // else
- // {
- // }
}
else
{
@@ -225,11 +207,6 @@ public class MSOfficePostscriptCreator implements IOffice
sFilterName = ""; // xlXMLSpreadsheet";
}
- // String sCommand = sStartCommand + " " +
- // _sInputFile + " " +
- // StringHelper.doubleQuote(sFilterName) + " " +
- // _sOutputFile;
-
aStartCommand.add(_sInputFile);
aStartCommand.add(sFilterName);
aStartCommand.add(_sOutputFile);
@@ -273,7 +250,6 @@ public class MSOfficePostscriptCreator implements IOffice
String sOfficeType = getOfficeType(_sInputFile);
// special case, if xml we prefer word, but with DEFAULT_XML_FORMAT_APP=excel it's changeable.
- // if (_aGTA.getDefaultXMLFormatApp().toLowerCase().equals("excel"))
if (sOfficeType.equals("excel"))
{
aStartCommand = createExcelPrintHelper();
@@ -302,10 +278,6 @@ public class MSOfficePostscriptCreator implements IOffice
sPrinterName = "";
}
- // String sCommand = sStartCommand + " " +
- // _sInputFile + " " +
- // StringHelper.doubleQuote(m_sPrinterName) + " " +
- // _sPrintFilename;
aStartCommand.add(_sInputFile);
aStartCommand.add(m_sPrinterName);
aStartCommand.add(_sPrintFilename);
@@ -359,8 +331,6 @@ public class MSOfficePostscriptCreator implements IOffice
{
throw new WrongEnvironmentException("Given list is too short.");
}
-
- // return aHandler.getExitCode();
}
@@ -494,8 +464,6 @@ public class MSOfficePostscriptCreator implements IOffice
}
String sName = aPerlScript.getAbsolutePath();
- // String sCommand = "perl " + sName;
- // System.out.println(sCommand);
aList.add("perl");
aList.add(sName);
return aList;
@@ -955,16 +923,12 @@ public class MSOfficePostscriptCreator implements IOffice
{
// ---- Parse XML file ----
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- // factory.setNamespaceAware( true );
- // factory.setValidating( true );
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse( new File (_sInputFile) );
Node rootNode = document.getDocumentElement();
// ---- Get list of nodes to given tag ----
// document.
- // NodeList ndList = document.getElementsByTagName( sToSearch /* argv[2] */ );
- // System.out.println( "\nNode list at the beginning:" );
String sRootNodeName = rootNode.getNodeName();
if (sRootNodeName.equals("w:wordDocument"))
{
@@ -988,8 +952,4 @@ public class MSOfficePostscriptCreator implements IOffice
return sType;
}
-// public static void main(String [] _args)
-// {
-// String sTest = getXMLDocumentFormat("c:/cws/temp/input/Blah Fasel.xml");
-// }
}
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index 4c04e2249eaa..37cba43a2dc2 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
@@ -43,7 +43,6 @@ import helper.URLHelper;
import helper.PropertyHelper;
import helper.OSHelper;
-// import helper.Parameter;
import java.io.File;
/**
@@ -158,8 +157,6 @@ public class OpenOfficePostscriptCreator implements IOffice
for (int i=0;i<aArgs.length;i++)
{
PropertyValue aValue = aArgs[i];
- // System.out.print("Property: '" + aValue.Name);
- // System.out.println("' := '" + aValue.Value + "'");
if (aValue.Name.equals("FilterName") ||
aValue.Name.equals("MediaType"))
{
@@ -198,31 +195,11 @@ public class OpenOfficePostscriptCreator implements IOffice
if (aDesktop != null)
{
GlobalLogWriter.println("com.sun.star.frame.Desktop created.");
- // String sInputURL = aCurrentParameter.sInputURL;
- // String sOutputURL = aCurrentParameter.sOutputURL;
- // String sPrintFileURL = aCurrentParameter.sPrintToFileURL;
- // System.out.println(_sInputURL);
-
-
// set here the loadComponentFromURL() properties
// at the moment only 'Hidden' is set, so no window is opened at work
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>();
- // check which properties should set and count it.
- // if (_aGTA.isHidden())
- // {
- // nPropertyCount ++;
- // }
- // if (_aGTA.getImportFilterName() != null && _aGTA.getImportFilterName().length() > 0)
- // {
- // nPropertyCount ++;
- // }
-
- // initialize the propertyvalue
- // int nPropertyIndex = 0;
- // aProps = new PropertyValue[ nPropertyCount ];
-
// set all property values
if (_aGTA.isHidden())
{
@@ -369,31 +346,10 @@ public class OpenOfficePostscriptCreator implements IOffice
-// public boolean storeAsPDF(ParameterHelper _aGTA,
-// String _sInputURL,
-// String _sOutputURL)
-// {
-// boolean bBack = false;
-// XComponent aDoc = loadFromURL(_aGTA, _sInputURL);
-
-// if (aDoc == null)
-// {
-// GlobalLogWriter.println("Can't load document.");
-// return bBack;
-// }
-// bBack = storeAsPDF(_aGTA, aDoc, _sOutputURL);
-// FileHelper.createInfoFile(_sOutputURL, _aGTA, "as pdf");
-
-// GlobalLogWriter.println("Close document.");
-// aDoc.dispose();
-// return bBack;
-// }
-
public boolean storeAsPDF(ParameterHelper _aGTA,
XComponent _aDoc,
String _sOutputURL) throws OfficeException
{
- // try {
boolean bBack = true;
_aGTA.getPerformance().startTime(PerformanceContainer.StoreAsPDF);
bBack = exportToPDF(_aDoc, _sOutputURL);
@@ -402,7 +358,6 @@ public class OpenOfficePostscriptCreator implements IOffice
if (!bBack)
{
GlobalLogWriter.println("Can't store document as PDF.");
-// bBack = false;
throw new OfficeException("Can't store document as PDF");
}
else
@@ -413,50 +368,6 @@ public class OpenOfficePostscriptCreator implements IOffice
}
-
- /**
- * print the document found in file (_sInputURL) to as postscript to file (_sPrintFileURL)
- * Due to the fact we use a printer to convert the file to postscript, the default printer
- * to create such postscript format must be installed, this is not tested here.
- *
- * @return true, if print has been done.
- * Be careful, true means only print returns with no errors, to be sure print is really done
- * check existence of _sPrintFileURL
- */
-
-// public boolean printToFileWithOOo(ParameterHelper _aGTA,
-// String _sInputURL,
-// String _sOutputURL,
-// String _sPrintFileURL)
-// {
-// // waitInSeconds(1);
-// boolean bBack = false;
-
-// XComponent aDoc = loadFromURL(_aGTA, _sInputURL);
-// if (aDoc != null)
-// {
-// if ( _sInputURL.equals(_sOutputURL) )
-// {
-// // don't store document
-// // input and output are equal OR
-// GlobalLogWriter.println("Warning: Inputpath and Outputpath are equal. Document will not stored again.");
-// disallowStore();
-// }
-// bBack = impl_printToFileWithOOo(_aGTA, aDoc, _sOutputURL, _sPrintFileURL);
-
-// GlobalLogWriter.println("Close document.");
-// aDoc.dispose();
-// }
-// else
-// {
-// GlobalLogWriter.println("loadDocumentFromURL() failed with document: " + _sInputURL);
-// }
-// return bBack;
-// }
-
-
-
-
private boolean impl_printToFileWithOOo(ParameterHelper _aGTA,
XComponent _aDoc,
String _sOutputURL,
@@ -488,7 +399,6 @@ public class OpenOfficePostscriptCreator implements IOffice
_aGTA.getPerformance().stopTime(PerformanceContainer.Store);
GlobalLogWriter.println(DateHelper.getDateTimeForHumanreadableLog() + " Store document done.");
- // TimeHelper.waitInSeconds(1, "After store as URL to:" + _sOutputURL);
GlobalLogWriter.println("Reload stored file test.");
XComponent aDoc = loadFromURL(_aGTA, _sOutputURL);
if (aDoc == null)
@@ -506,7 +416,6 @@ public class OpenOfficePostscriptCreator implements IOffice
{
aDoc.dispose();
}
- // TimeHelper.waitInSeconds(1, "after close temp document");
}
}
}
@@ -533,27 +442,12 @@ public class OpenOfficePostscriptCreator implements IOffice
try
{
- // System.out.println("Document loaded.");
// Change Pagesettings to DIN A4
GlobalLogWriter.println(DateHelper.getDateTimeForHumanreadableLog() + " Print document.");
XPrintable aPrintable = UnoRuntime.queryInterface( XPrintable.class, _aDoc);
if (aPrintable != null)
{
- // System.out.println(" Set PaperFormat to DIN A4");
- // {
- // PropertyValue[] aPrinterProps = aPrintable.getPrinter();
- // System.out.println("PrinterProps size: " + String.valueOf(aPrinterProps.length));
- // int nPropIndex = 0;
- // while (!"PaperFormat".equals(aPrinterProps[nPropIndex].Name))
- // {
- // // System.out.println(aPrinterProps[nPropIndex].Name);
- // nPropIndex++;
- // }
- // aPrinterProps[nPropIndex].Value = com.sun.star.view.PaperFormat.A4;
- // aPrintable.setPrinter(aPrinterProps);
- // }
-
// configure Office to allow to execute macos
// TODO: We need a possibility to set the printer name also for StarOffice/OpenOffice
@@ -576,14 +470,6 @@ public class OpenOfficePostscriptCreator implements IOffice
// set property values for XPrintable.print()
// more can be found at "http://api.libreoffice.org/docs/common/ref/com/sun/star/view/PrintOptions.html"
- // int nProperties = 1; // default for 'FileName' property
- // if (_aGTA.printAllPages() == false)
- // {
- // // we don't want to print all pages, build Pages string by ourself
- // nProperties ++;
- // }
- // int nPropsCount = 0;
-
// If we are a SpreadSheet (calc), we need to set PrintAllSheets property to 'true'
XServiceInfo xServiceInfo = UnoRuntime.queryInterface( XServiceInfo.class, _aDoc );
if ( xServiceInfo.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
@@ -599,13 +485,10 @@ public class OpenOfficePostscriptCreator implements IOffice
}
ArrayList<PropertyValue> aPrintProps = new ArrayList<PropertyValue>();
- // GlobalLogWriter.println("Property FileName:=" + _sPrintFileURL);
- // PropertyValue [] aPrintProps = new PropertyValue[nProperties];
PropertyValue Arg = new PropertyValue();
Arg.Name = "FileName";
Arg.Value = _sPrintFileURL;
- // aPrintProps[nPropsCount ++] = Arg;
aPrintProps.add(Arg);
showProperty(Arg);
@@ -634,8 +517,6 @@ public class OpenOfficePostscriptCreator implements IOffice
showProperty(Arg);
}
- // GlobalLogWriter.println("Start printing.");
-
_aGTA.getPerformance().startTime(PerformanceContainer.Print);
aPrintable.print(PropertyHelper.createPropertyValueArrayFormArrayList(aPrintProps));
TimeHelper.waitInSeconds(1, "Start waiting for print ready.");
@@ -649,7 +530,6 @@ public class OpenOfficePostscriptCreator implements IOffice
int nPropIndex = 0;
while (!"IsBusy".equals(aPrinterProps[nPropIndex].Name))
{
- // System.out.println(aPrinterProps[nPropIndex].Name);
nPropIndex++;
}
isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE);
@@ -662,9 +542,6 @@ public class OpenOfficePostscriptCreator implements IOffice
throw new com.sun.star.uno.Exception("Convwatch exception, wait too long for printing.");
}
}
-// TODO:
-// TimeHelper.waitInSeconds(40, "Start waiting after print ready.");
-
_aGTA.getPerformance().stopTime(PerformanceContainer.Print);
GlobalLogWriter.println(DateHelper.getDateTimeForHumanreadableLog() + " Print document done.");
@@ -713,32 +590,22 @@ public class OpenOfficePostscriptCreator implements IOffice
{
if (! FileHelper.exists(_sAbsoluteInputFile))
{
- // throw new ConvWatchCancelException("Input file: " + _sAbsoluteInputFile + " does not exist.");
return false;
}
- // String fs = System.getProperty("file.separator");
-
- // String sInputFileURL = URLHelper.getFileURLFromSystemPath(_sAbsoluteInputFile);
-
String sInputFileBasename = FileHelper.getBasename(_sAbsoluteInputFile);
- // String sOutputFileURL = null;
String sOutputPath;
if (_sAbsoluteOutputPath != null)
{
sOutputPath = _sAbsoluteOutputPath;
- // FileHelper.makeDirectories("", sOutputPath);
}
else
{
String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
sOutputPath = sInputPath;
}
- // sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename);
- // sOutputFileURL = null;
String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
- // String sPrintFileURL;
String sAbsolutePrintFilename = FileHelper.appendPath(sOutputPath, sPrintFilename + ".prn");
if (FileHelper.exists(sAbsolutePrintFilename) && _aGTA.getOverwrite() == false)
@@ -750,142 +617,6 @@ public class OpenOfficePostscriptCreator implements IOffice
}
- /**
- * create a reference file
- * _sAbsoluteInputPath contains the source file, if not exists, return with failure.
- * _sAbsoluteOutputPath contains the destination, where the file will store after load with StarOffice/OpenOffice.org
- * if is null, print only near the Input file path
- * _sPrintType ".prn" Print input file with StarOffice/OpenOffice.org and the default printer as PostScript
- *
- * @param _aGTA
- * @return
- */
-// public static boolean buildReference(ParameterHelper _aGTA,
-// String _sAbsoluteOutputPath,
-// String _sAbsoluteInputFile)
-// throws OfficeException
-// {
-// if (! FileHelper.exists(_sAbsoluteInputFile))
-// {
-// throw new OfficeException("buildReference(): Input file: " + _sAbsoluteInputFile + " does not exist.");
-// }
-
-// String fs = System.getProperty("file.separator");
-
-// String sInputFileURL = URLHelper.getFileURLFromSystemPath(_sAbsoluteInputFile);
-
-// String sInputFileBasename = FileHelper.getBasename(_sAbsoluteInputFile);
-// String sOutputFileURL = null;
-// String sOutputPath;
-// if (_sAbsoluteOutputPath != null)
-// {
-// sOutputPath = _sAbsoluteOutputPath;
-// FileHelper.makeDirectories("", sOutputPath);
-// }
-// else
-// {
-// String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
-// sOutputPath = sInputPath;
-// }
-// // sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename);
-// sOutputFileURL = null;
-
-// String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
-// String sPrintFileURL;
-
-// String sAbsolutePrintFilename = sOutputPath + fs + sPrintFilename + ".prn";
-// if (FileHelper.exists(sAbsolutePrintFilename) && _aGTA.getOverwrite() == false)
-// {
-// GlobalLogWriter.println("Reference already exist, don't overwrite. Set " + PropertyName.DOC_COMPARATOR_OVERWRITE_REFERENCE + "=true to force overwrite.");
-// return true;
-// }
-
-// if (_aGTA.getReferenceType().toLowerCase().equals("msoffice"))
-// {
-// sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename);
-// }
-// else if (_aGTA.getReferenceType().toLowerCase().equals("pdf"))
-// {
-//// TODO: If we rename the stored file to *.pdf, we have to be sure that we use *.pdf also as a available reference
-// sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename );
-// }
-// else if (_aGTA.getReferenceType().toLowerCase().equals("ooo"))
-// {
-// sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename );
-// }
-// else
-// {
-// GlobalLogWriter.println("OfficePrint.buildreference(): Unknown print type.");
-// return false;
-// }
-// return printToFile(_aGTA, sInputFileURL, sOutputFileURL, sPrintFileURL);
-// }
-
-
-
- // TODO: Das Teil muss hier raus!
-
-
-// public static boolean printToFile(ParameterHelper _aGTA,
-// String _sInputFileURL,
-// String _sOutputFileURL,
-// String _sPrintFileURL) throws OfficeException
-// {
-// boolean bBack = false;
-// String sPrintFileURL = null;
-
-
-// // remember the current timer, to know how long a print process need.
-// // startTimer();
-
-// if (_aGTA.getReferenceType().toLowerCase().equals("ooo"))
-// {
-// bBack = printToFileWithOOo(_aGTA, _sInputFileURL, _sOutputFileURL, _sPrintFileURL);
-// }
-// else if (_aGTA.getReferenceType().toLowerCase().equals("pdf"))
-// {
-// GlobalLogWriter.println("USE PDF AS EXPORT FORMAT.");
-// bBack = storeAsPDF(_aGTA, _sInputFileURL, _sPrintFileURL);
-// }
-// else if (_aGTA.getReferenceType().toLowerCase().equals("msoffice"))
-// {
-// if (MSOfficePostscriptCreator.isMSOfficeDocumentFormat(_sInputFileURL))
-// {
-// GlobalLogWriter.println("USE MSOFFICE AS EXPORT FORMAT.");
-// MSOfficePostscriptCreator a = new MSOfficePostscriptCreator();
-// try
-// {
-// a.printToFileWithMSOffice(_aGTA, FileHelper.getSystemPathFromFileURL(_sInputFileURL),
-// FileHelper.getSystemPathFromFileURL(_sPrintFileURL));
-// }
-// catch(OfficeException e)
-// {
-// e.printStackTrace();
-// GlobalLogWriter.println(e.getMessage());
-// throw new OfficeException("Exception caught. Problem with MSOffice printer methods.");
-// }
-// catch(java.io.IOException e)
-// {
-// GlobalLogWriter.println(e.getMessage());
-// throw new OfficeException("IOException caught. Problem with MSOffice printer methods.");
-// }
-// bBack = true;
-// }
-// else
-// {
-// GlobalLogWriter.println("This document type is not recognized as MSOffice format, as default fallback StarOffice/OpenOffice.org instead is used.");
-// bBack = printToFileWithOOo(_aGTA, _sInputFileURL, _sOutputFileURL, _sPrintFileURL);
-// }
-// }
-// else
-// {
-// // System.out.println("");
-// throw new OfficeException("OfficePrint.printToFile(): Unknown print type.");
-// }
-// return bBack;
-// }
-
-
// TODO: move this away!
void showType(String _sInputURL, XMultiServiceFactory _xMSF)
@@ -924,7 +655,6 @@ public class OpenOfficePostscriptCreator implements IOffice
{
if (_sFilterName.length() == 0)
{
- // System.out.println("No FilterName set.");
return null;
}
@@ -933,7 +663,6 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("MultiServiceFactory not set.");
return null;
}
- // XFilterFactory aFilterFactory = null;
Object aObj = null;
try
{
@@ -950,18 +679,6 @@ public class OpenOfficePostscriptCreator implements IOffice
if (aNameAccess != null)
{
- // if (_sFilterName.toLowerCase().equals("help"))
- // {
- // System.out.println("Show all possible ElementNames from current version." );
- // String[] aElementNames = aNameAccess.getElementNames();
- // for (int i = 0; i<aElementNames.length; i++)
- // {
- // System.out.println(aElementNames[i]);
- // }
- // System.out.println("Must quit.");
- // System.out.exit(1);
- // }
-
if (! aNameAccess.hasByName(_sFilterName))
{
GlobalLogWriter.println("FilterFactory.hasByName() says there exist no '" + _sFilterName + "'" );
@@ -975,15 +692,12 @@ public class OpenOfficePostscriptCreator implements IOffice
if (aElements != null)
{
String sInternalFilterName = null;
- // System.out.println("getByName().length: " + String.valueOf(aElements.length));
for (int i=0;i<aElements.length; i++)
{
PropertyValue aPropertyValue = (PropertyValue)aElements[i];
- // System.out.println("PropertyValue.Name: " + aPropertyValue.Name);
if (aPropertyValue.Name.equals("Type"))
{
String sValue = (String)aPropertyValue.Value;
- // System.out.println("Type: " + sValue);
sInternalFilterName = sValue;
}
}
@@ -1014,7 +728,6 @@ public class OpenOfficePostscriptCreator implements IOffice
{
if (_sFilterName.length() == 0)
{
- // System.out.println("No FilterName set.");
return null;
}
@@ -1023,7 +736,6 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("MultiServiceFactory not set.");
return null;
}
- // XFilterFactory aFilterFactory = null;
Object aObj = null;
try
{
@@ -1052,14 +764,12 @@ public class OpenOfficePostscriptCreator implements IOffice
if (aElements != null)
{
String sServiceName = null;
- // System.out.println("getByName().length: " + String.valueOf(aElements.length));
for (int i=0;i<aElements.length; i++)
{
PropertyValue aPropertyValue = (PropertyValue)aElements[i];
if (aPropertyValue.Name.equals("DocumentService"))
{
String sValue = (String)aPropertyValue.Value;
- // System.out.println("DocumentService: " + sValue);
sServiceName = sValue;
break;
}
@@ -1090,7 +800,6 @@ public class OpenOfficePostscriptCreator implements IOffice
{
if (_sInternalFilterName.length() == 0)
{
- // System.out.println("No FilterName set.");
return null;
}
@@ -1116,13 +825,6 @@ public class OpenOfficePostscriptCreator implements IOffice
if (aNameAccess != null)
{
- // System.out.println("Show ElementNames" );
- // String[] aElementNames = aNameAccess.getElementNames();
- // for (int i = 0; i<aElementNames.length; i++)
- // {
- // System.out.println(aElementNames[i]);
- // }
-
if (! aNameAccess.hasByName(_sInternalFilterName))
{
GlobalLogWriter.println("TypeDetection.hasByName() says there exist no '" + _sInternalFilterName + "'" );
@@ -1137,11 +839,9 @@ public class OpenOfficePostscriptCreator implements IOffice
if (aElements != null)
{
String sExtension = null;
- // System.out.println("getByName().length: " + String.valueOf(aElements.length));
for (int i=0;i<aElements.length; i++)
{
PropertyValue aPropertyValue = (PropertyValue)aElements[i];
- // System.out.println("PropertyValue.Name: " + aPropertyValue.Name);
if (aPropertyValue.Name.equals("Extensions"))
{
aExtensions = (String[])aPropertyValue.Value;
@@ -1189,7 +889,6 @@ public class OpenOfficePostscriptCreator implements IOffice
}
String sInputURL = URLHelper.getFileURLFromSystemPath(_sInputFile);
- // showType(sInputURL, xMSF);
XComponent aDoc = loadFromURL( _aGTA, sInputURL);
if (aDoc == null)
{
@@ -1208,12 +907,8 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("It's not allowed to store, check Input/Output path.");
return;
}
-// TODO: Do we need to wait?
-// TimeHelper.waitInSeconds(1, "wait after loadFromURL.");
XServiceInfo xServiceInfo = UnoRuntime.queryInterface( XServiceInfo.class, aDoc );
- // String sFilter = getFilterName_forExcel(xServiceInfo);
- // System.out.println("Filter is " + sFilter);
// store the document in an other directory
XStorable xStorable = UnoRuntime.queryInterface( XStorable.class, aDoc);
@@ -1225,9 +920,6 @@ public class OpenOfficePostscriptCreator implements IOffice
String sFilterName = _aGTA.getExportFilterName();
- // initialize PropertyArray
- // PropertyValue [] aStoreProps = new PropertyValue[ nPropertyCount ];
- // int nPropertyIndex = 0;
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>();
String sExtension = "";
@@ -1270,7 +962,6 @@ public class OpenOfficePostscriptCreator implements IOffice
PropertyValue Arg = new PropertyValue();
Arg.Name = "FilterName";
Arg.Value = sFilterName;
- // aStoreProps[nPropertyIndex ++] = Arg;
aPropertyList.add(Arg);
showProperty(Arg);
GlobalLogWriter.println("FilterName is set to: " + sFilterName);
@@ -1281,9 +972,7 @@ public class OpenOfficePostscriptCreator implements IOffice
{
// create the new filename with the extension, which is ok to the file format
String sInputFileBasename = FileHelper.getBasename(_sInputFile);
- // System.out.println("InputFileBasename " + sInputFileBasename);
String sInputFileNameNoSuffix = FileHelper.getNameNoSuffix(sInputFileBasename);
- // System.out.println("InputFilename no suffix " + sInputFileNameNoSuffix);
String fs = System.getProperty("file.separator");
String sOutputFile = _sOutputPath;
if (! sOutputFile.endsWith(fs))
@@ -1315,38 +1004,12 @@ public class OpenOfficePostscriptCreator implements IOffice
{
GlobalLogWriter.println("Can't store document '" + sOutputURL + "'. Message is :'" + e.getMessage() + "'");
}
-// TODO: Do we need to wait?
-// TimeHelper.waitInSeconds(1, "unknown in OfficePrint.convertDocument()");
}
- /**
- *
- * @return false, if 'NoOffice=yes' is given
- */
-// private boolean shouldOfficeStart()
-// {
-// String sNoOffice = (String)m_aParameterHelper.getTestParameters().get( "NoOffice" );
-// if (sNoOffice != null)
-// {
-// if (sNoOffice.toLowerCase().startsWith("t") || sNoOffice.toLowerCase().startsWith("y"))
-// {
-// return false;
-// }
-// }
-// return true;
-// }
-
OfficeProvider m_aProvider = null;
private void startOffice()
{
- // SimpleFileSemaphore aSemaphore = new SimpleFileSemaphore();
-// if (shouldOfficeStart())
-// {
- // if (OSHelper.isWindows())
- // {
- // aSemaphore.P(aSemaphore.getSemaphoreFile());
- // }
m_aParameterHelper.getTestParameters().put(util.PropertyName.DONT_BACKUP_USERLAYER, Boolean.TRUE);
m_aParameterHelper.getPerformance().startTime(PerformanceContainer.OfficeStart);
@@ -1356,9 +1019,7 @@ public class OpenOfficePostscriptCreator implements IOffice
m_aParameterHelper.getPerformance().stopTime(PerformanceContainer.OfficeStart);
long nStartTime = m_aParameterHelper.getPerformance().getTime(PerformanceContainer.OfficeStart);
- // aGTA = getParameterHelper(); // get new TestArguments
m_aParameterHelper.getPerformance().setTime(PerformanceContainer.OfficeStart, nStartTime);
-// }
// Watcher Object is need in log object to give a simple way to say if a running office is alive.
// As long as a log comes, it pings the Watcher and says the office is alive, if not an
@@ -1381,13 +1042,6 @@ public class OpenOfficePostscriptCreator implements IOffice
{
m_aProvider.closeExistingOffice(m_aParameterHelper.getTestParameters(), true);
}
- // if (OSHelper.isWindows())
- // {
- // aSemaphore.V(aSemaphore.getSemaphoreFile());
- // aSemaphore.sleep(2);
- // // wait some time maybe an other process will take the semaphore
- // // I know, this is absolutely dirty, but the whole convwatch is dirty and need a big cleanup.
- // }
}
}
@@ -1400,7 +1054,6 @@ public class OpenOfficePostscriptCreator implements IOffice
public boolean isStoreAllowed()
{
return false;
- // return m_bStoreFile;
}
}
diff --git a/qadevOOo/runner/graphical/ParameterHelper.java b/qadevOOo/runner/graphical/ParameterHelper.java
index ac8c6eeffec0..3ca201ff276e 100644
--- a/qadevOOo/runner/graphical/ParameterHelper.java
+++ b/qadevOOo/runner/graphical/ParameterHelper.java
@@ -65,8 +65,6 @@ public class ParameterHelper
*/
private String m_sReferenceType = null;
- // private String m_sTargetFrameName = "_blank";
-
private String m_sPrinterName = null;
private int m_nResolutionInDPI = 180;
@@ -75,18 +73,12 @@ public class ParameterHelper
private String m_sInputPath = null;
private String m_sOutputPath = null;
-// private String m_sReferencePath = null;
private TestParameters m_aCurrentParams;
- // private GlobalLogWriter m_aLog;
-
public ParameterHelper(TestParameters param)
{
m_aCurrentParams = param;
- // m_aLog = log;
- // interpretReferenceType();
- // interpretPrinterName();
}
@@ -133,24 +125,6 @@ public class ParameterHelper
return m_sOutputPath;
}
-// public String getReferencePath()
-// {
-// if (m_sReferencePath == null)
-// {
-// String sReferencePath = (String)getTestParameters().get( PropertyName.DOC_COMPARATOR_REFERENCE_PATH );
-// if (sReferencePath == null || sReferencePath.length() == 0)
-// {
-// GlobalLogWriter.println("Please set reference path (path to reference documents) " + PropertyName.DOC_COMPARATOR_REFERENCE_PATH + "=path.");
-// }
-// else
-// {
-// m_sReferencePath = sReferencePath;
-// }
-// }
-// return m_sReferencePath;
-// }
-
-
public boolean isIncludeSubDirectories()
{
m_bIncludeSubdirectories = true;
@@ -183,7 +157,6 @@ public class ParameterHelper
}
else
{
- // log.println("found REFERENCE_TYPE " + sReferenceType );
m_sReferenceType = sReferenceType;
}
}
@@ -203,7 +176,6 @@ public class ParameterHelper
}
else
{
- // log.println("found PRINTER_NAME " + sPrinterName );
m_sPrinterName = sPrinterName;
}
}
@@ -232,7 +204,6 @@ public class ParameterHelper
public String getBuildID()
{
String sAPP = (String)m_aCurrentParams.get(util.PropertyName.APP_EXECUTION_COMMAND);
- // return getBuildID(sAPP);
// TODO: here we need the getBuildID(string) method
String sBuildID = BuildID.getBuildID(sAPP);
return sBuildID;
@@ -322,27 +293,6 @@ public class ParameterHelper
}
-// String m_sDefaultXMLFormatApplication = null;
-// public String getDefaultXMLFormatApp()
-// {
-// if (m_sDefaultXMLFormatApplication == null)
-// {
-// // DEFAULT_XML_FORMAT_APP ------
-
-// String sDefaultXMLFormatApp = (String)m_aCurrentParams.get( PropertyName.DOC_COMPARATOR_DEFAULT_XML_FORMAT_APP );
-// if (sDefaultXMLFormatApp == null || sDefaultXMLFormatApp.length() == 0)
-// {
-// m_sDefaultXMLFormatApplication = "word";
-// }
-// else
-// {
-// m_sDefaultXMLFormatApplication = sDefaultXMLFormatApp;
-// }
-// }
-// return m_sDefaultXMLFormatApplication;
-// }
-
-
// Pages -------------------------------------------------------------------
/**
diff --git a/qadevOOo/runner/graphical/PerformanceContainer.java b/qadevOOo/runner/graphical/PerformanceContainer.java
index 26c9d39cfced..f4b4b4e5b426 100644
--- a/qadevOOo/runner/graphical/PerformanceContainer.java
+++ b/qadevOOo/runner/graphical/PerformanceContainer.java
@@ -19,13 +19,8 @@
package graphical;
import java.io.File;
-// import java.io.FileWriter;
-// import java.io.OutputStream;
-// import java.io.PrintStream;
import java.io.PrintStream;
import java.io.RandomAccessFile;
-// import java.io.StringWriter;
-// import java.lang.Double;
public class PerformanceContainer /* extends *//* implements */ {
@@ -115,8 +110,6 @@ public class PerformanceContainer /* extends *//* implements */ {
public void print(PrintStream out)
{
- // String ls = System.getProperty("line.separator");
- // out.
out.println("loadtime=" + String.valueOf(m_nTime[ Load ]));
out.println("storetime=" + String.valueOf(m_nTime[ Store ]));
out.println("printtime=" + String.valueOf(m_nTime[ Print ]));
@@ -128,8 +121,6 @@ public class PerformanceContainer /* extends *//* implements */ {
public void print(IniFile _aIniFile, String _sSection)
{
- // String ls = System.getProperty("line.separator");
- // out.
_aIniFile.insertValue(_sSection, "loadtime" , String.valueOf(m_nTime[ Load ]));
_aIniFile.insertValue(_sSection, "storetime" , String.valueOf(m_nTime[ Store ]));
_aIniFile.insertValue(_sSection, "printtime" , String.valueOf(m_nTime[ Print ]));
@@ -243,17 +234,4 @@ public class PerformanceContainer /* extends *//* implements */ {
}
}
-// public static void main(String[] args)
-// {
-// BorderRemover a = new BorderRemover();
-// try
-// {
-// a.createNewImageWithoutBorder(args[0], args[1]);
-// }
-// catch(java.io.IOException e)
-// {
-// System.out.println("Exception caught.");
-// }
-
-// }
}
diff --git a/qadevOOo/runner/graphical/PixelCounter.java b/qadevOOo/runner/graphical/PixelCounter.java
index 69c1b232b67d..10dab09451d9 100644
--- a/qadevOOo/runner/graphical/PixelCounter.java
+++ b/qadevOOo/runner/graphical/PixelCounter.java
@@ -32,7 +32,6 @@ class CountNotWhite extends CountPixel
{
public CountNotWhite()
{
- // System.out.println("CountWhite()");
}
public void countold(final int pixel)
@@ -42,7 +41,6 @@ class CountNotWhite extends CountPixel
final int green = (pixel >> 8) & 0xff;
final int blue = (pixel ) & 0xff;
- // System.out.println(String.valueOf(red) + ":" + String.valueOf(green) + ":" + String.valueOf(blue));
if (red == 0xff && green == 0xff && blue == 0xff)
{
return;
@@ -78,7 +76,6 @@ class CountNotBlack extends CountPixel
{
public CountNotBlack()
{
- // System.out.println("CountBlack()");
}
public void countold(final int pixel)
@@ -121,38 +118,10 @@ class CountNotBlack extends CountPixel
class graphics_stuff
{
-// public int stuff()
-// {
-//// (1) decoding
-// int rgba = 0; // ...; // comes from PixelGrabber, BufferedImage.getRGB etc.
-// int red = (rgba >> 16) & 0xff;
-// int green = (rgba >> 8) & 0xff;
-// int blue = rgba & 0xff;
-// int alpha = (rgba >> 24) & 0xff;
-//// (2) now modify red, green, blue and alpha as you like;
-//// make sure that each of the four values stays in the
-//// interval 0 to 255
-//// ...
-//// (3) and encode back to an int, e.g. to give it to MemoryImageSource or
-//// BufferedImage.setRGB
-// rgba = (alpha << 24) | (red << 16) | (green << 8) | blue;
-// return 0;
-// }
-
-// public static void handlesinglepixel(int x, int y, int pixel)
-// {
-// int alpha = (pixel >> 24) & 0xff;
-// int red = (pixel >> 16) & 0xff;
-// int green = (pixel >> 8) & 0xff;
-// int blue = (pixel ) & 0xff;
-// // Deal with the pixel as necessary...
-// }
-
public static void countPixel(ImageHelper img, int _x, int _y, int _w, int _h, CountPixel _aPixelCounter)
{
for (int y = 0; y < _h; y++) {
for (int x = 0; x < _w; x++) {
- // handlesinglepixel(x+i, y+j, pixels[j * w + i]);
_aPixelCounter.count(img.getPixel(x,y));
}
}
@@ -181,9 +150,6 @@ class graphics_stuff
public class PixelCounter {
- // private Image m_aImage;
- // ImageHelper m_aImage;
-
public int countNotWhitePixel(String _sFile)
throws java.io.IOException
@@ -216,23 +182,6 @@ public class PixelCounter {
}
-
-// public static void main(String[] args) {
-
-// String a = helper.StringHelper.createValueString(10, 4);
-// int dummy = 1;
-//
-// BorderRemover a = new BorderRemover();
-// try
-// {
-// a.createNewImageWithoutBorder(args[0], args[1]);
-// }
-// catch(java.io.IOException e)
-// {
-// System.out.println("Exception caught.");
-// }
-// */
-// }
}
diff --git a/qadevOOo/runner/helper/APIDescGetter.java b/qadevOOo/runner/helper/APIDescGetter.java
index f8e124cfe20a..a7c97dc37b17 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -285,8 +285,6 @@ public class APIDescGetter extends DescGetter
continue;
}
// TODO Probleme here
- // int nFirstSemicolon = line.indexOf(";");
- // int nLastSemicolon = line.lastIndexOf(";");
String ifc_name = ""; // = line.substring(line.indexOf(";") + 2, line.lastIndexOf(";") - 1);
String meth_name = ""; // = line.substring(line.lastIndexOf(";") + 2, line.length() - 1);
@@ -309,9 +307,6 @@ public class APIDescGetter extends DescGetter
meth_name = StringHelper.removeQuoteIfExists(aToken.nextToken());
}
- // String ifc_name = line.substring(line.indexOf(";") + 2, line.lastIndexOf(";") - 1);
- // String meth_name = line.substring(line.lastIndexOf(";") + 2, line.length() - 1);
-
DescEntry methDesc = createDescEntry(meth_name, ifc_name, parent);
if (!ifc_name.equals(old_ifc_name))
@@ -579,10 +574,6 @@ public class APIDescGetter extends DescGetter
String entry = e.nextElement().toString();
-// if (debug) {
-// System.out.println("### Read from connetion: " + entry);
-// }
-
if ((entry.lastIndexOf(sStartModule) != -1) &&
entry.endsWith(sEndsWithCSVName))
{
diff --git a/qadevOOo/runner/helper/FileTools.java b/qadevOOo/runner/helper/FileTools.java
index 8ce58e29f53a..8a859183ebf6 100644
--- a/qadevOOo/runner/helper/FileTools.java
+++ b/qadevOOo/runner/helper/FileTools.java
@@ -102,34 +102,10 @@ public class FileTools {
*/
public static boolean deleteDir(File dir) {
- // if (! cleanDir(dir)) return false;
-
// The directory is now empty so delete it
- // return dir.delete();
return cleanDir(dir);
}
- /**
- * Deletes all files and subdirectories under dir.
- * Returns true if all deletions were successful.
- * If a deletion fails, the method continues to delete rest of the files.
- * @return Returns true if all deletions were successful, else false.
- * @param dir the directory to clean from content
- */
- // public static boolean cleanDir(File dir){
-
- // boolean success = true;
- // if (dir.isDirectory()){
- // File [] theFiles = dir.listFiles();
-
- // if (theFiles.length != 0 )
- // for (int i = 0; i < theFiles.length; i++){
- // success &= theFiles[i].delete();
- // }
- // }
- // return success;
- // }
-
public static boolean cleanDir(File dir)
{
if (dir.isDirectory())
diff --git a/qadevOOo/runner/helper/ObjectInspectorModelImpl.java b/qadevOOo/runner/helper/ObjectInspectorModelImpl.java
index 3626a0dabeee..b40888102438 100644
--- a/qadevOOo/runner/helper/ObjectInspectorModelImpl.java
+++ b/qadevOOo/runner/helper/ObjectInspectorModelImpl.java
@@ -59,7 +59,6 @@ public class ObjectInspectorModelImpl implements XObjectInspectorModel{
inCat =(CategoryMem == category)? ++inCat: 1;
CategoryMem = category;
- //System.out.println("Category" + category + "Number" + inCat);
m_Categories[n].ProgrammaticName = "Category" + category;
m_Categories[n].UIName = "Category" + category + "Number" + inCat;
m_Categories[n].HelpURL = "h:" + n;
diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java
index 3f45e02894ce..a208c1e09e7d 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -17,7 +17,6 @@
*/
package helper;
-//import com.sun.star.bridge.UnoUrlResolver;
import com.sun.star.beans.XFastPropertySet;
import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.container.XEnumeration;
diff --git a/qadevOOo/runner/helper/OfficeWatcher.java b/qadevOOo/runner/helper/OfficeWatcher.java
index b7381b6657db..a45b4343b18e 100644
--- a/qadevOOo/runner/helper/OfficeWatcher.java
+++ b/qadevOOo/runner/helper/OfficeWatcher.java
@@ -91,13 +91,6 @@ public class OfficeWatcher extends Thread implements share.Watcher {
final ProcessHandler pHdl = new ProcessHandler(sKillCommand);
pHdl.executeSynchronously();
-// dbg("---> Output of killoffice:");
-// dbg(pHdl.getOutputText());
-// dbg("<--- Output of killoffice");
-// dbg("---> Error output of killoffice:");
-// dbg(pHdl.getErrorText());
-// dbg("<--- Error output of killoffice");
-
}
}
ph.kill();
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index bc7f4293654b..5c477447381f 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -390,10 +390,6 @@ public class ProcessHandler
int hangcheck = 10;
while (!this.isFinished() && changedText)
{
- // dbg("runCommand: waiting " + mTimeOut / 1000 + " seconds while command execution is ongoing... " + count);
- // shortWait(mTimeOut);
- // shortWait(2000); // wait 2 seconds.
- //waitFor(mTimeOut);
waitFor(2000, false); // wait but don't kill
if (ow != null)
@@ -513,8 +509,6 @@ public class ProcessHandler
*/
public static long getSystemTime()
{
- // Calendar cal = new GregorianCalendar();
- // final long nTime = cal.getTimeInMillis();
final long nTime = System.currentTimeMillis();
return nTime;
}
@@ -561,7 +555,6 @@ public class ProcessHandler
for (int i = 0; i < cmdLineArray.length; i++)
{
log.println(cmdLineArray[i]);
- // log.print(" ");
}
showEnvVars();
log.println("");
@@ -605,9 +598,6 @@ public class ProcessHandler
stderr = new Pump(m_aProcess.getErrorStream(), log, "err > ", bUseOutput);
stdIn = new PrintStream(m_aProcess.getOutputStream());
- // int nExitValue = m_aProcess.exitValue();
- // int dummy = 0;
-
dbg("execute: flush io-streams");
flushInput();
@@ -828,7 +818,6 @@ public class ProcessHandler
}
catch (Exception e)
{
- //System.out.println("No ExitValue available");
}
return exitValue;
diff --git a/qadevOOo/runner/helper/StreamSimulator.java b/qadevOOo/runner/helper/StreamSimulator.java
index ee5f4f06b481..4352ca8eaf49 100644
--- a/qadevOOo/runner/helper/StreamSimulator.java
+++ b/qadevOOo/runner/helper/StreamSimulator.java
@@ -51,7 +51,6 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
private com.sun.star.io.XOutputStream m_xOutStream ;
private com.sun.star.io.XSeekable m_xSeek ;
- //public ComplexTestEnvironment //m_aProtocol ;
public boolean m_bInWasUsed ;
public boolean m_bOutWasUsed ;
@@ -118,12 +117,6 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
}
}
-/* public void finalize()
- {
- ////m_aProtocol.log("finalize was called. Please check if it was right or not.\n");
- } */
-
-
/**
* following methods simulates the XInputStream.
* The notice all actions inside the internal protocol
@@ -135,12 +128,10 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
com.sun.star.io.BufferSizeExceededException,
com.sun.star.io.IOException
{
- //m_aProtocol.log("readBytes(lData["+lData.length+"]["+lData[0]+"],"+nBytesToRead+")\n{\n");
m_bInWasUsed = true;
if (m_xInStream == null)
{
- //m_aProtocol.log("\tstream not open. throw NotConnectedException\n\n\tfailed\n}\n");
throw new com.sun.star.io.NotConnectedException("stream not open");
}
@@ -158,11 +149,6 @@ public class StreamSimulator implements com.sun.star.io.XInputStream ,
catch (com.sun.star.uno.RuntimeException exRuntime) { //m_aProtocol.log("\tgot RuntimeException\n\tfailed\n}\n" ); throw exRuntime;
}
- //m_aProtocol.log("\treads "+nRead+" bytes\n\tOK\n}\n");
-
- //if (nRead != nBytesToRead)
- //m_aProtocol.log("there are some missing bytes for reading!\n");
-
return nRead;
}
diff --git a/qadevOOo/runner/helper/URLHelper.java b/qadevOOo/runner/helper/URLHelper.java
index 58a481b3f421..9bb6f7d9deaa 100644
--- a/qadevOOo/runner/helper/URLHelper.java
+++ b/qadevOOo/runner/helper/URLHelper.java
@@ -140,7 +140,6 @@ public class URLHelper
int index = sFileURL.indexOf(sBaseURL);
String sURL = sFileURL.substring(0,index) + sServerURL +
sFileURL.substring(index+sBaseURL.length());
- //String sURL = sFileURL.replaceFirst(sBaseURL,sServerURL);
return sURL;
}
diff --git a/qadevOOo/runner/lib/MultiMethodTest.java b/qadevOOo/runner/lib/MultiMethodTest.java
index 2fc90d795653..0493b4bbf37e 100644
--- a/qadevOOo/runner/lib/MultiMethodTest.java
+++ b/qadevOOo/runner/lib/MultiMethodTest.java
@@ -152,7 +152,6 @@ public class MultiMethodTest
if (! ("ifc.qadevooo._SelfTest").equals(entry.entryName))
{
getInterfaceName();
- // System.out.println("checking : " + ifcName);
System.out.print("checking: [" + entry.longName + "]");
// defining a name of the class corresponding to the tested interface
diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java b/qadevOOo/runner/lib/MultiPropertyTest.java
index 544538dadeef..531946d88eb9 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -360,8 +360,6 @@ public class MultiPropertyTest extends MultiMethodTest
{
oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue);
}
-// log.println("old = " + toString(oldValue));
-// log.println("new = " + toString(newValue));
log.println("result = " + toString(resValue));
}
catch (com.sun.star.lang.IllegalArgumentException iae)
@@ -396,8 +394,6 @@ public class MultiPropertyTest extends MultiMethodTest
{
oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue);
}
-// log.println("old = " + toString(oldValue));
-// log.println("new = " + toString(newValue));
log.println("result = " + toString(resValue));
}
catch (com.sun.star.lang.IllegalArgumentException iae)
@@ -422,7 +418,6 @@ public class MultiPropertyTest extends MultiMethodTest
{
tRes.tested(propName, false);
}
- //tRes.tested(propName, false);
}
else
{
@@ -433,8 +428,6 @@ public class MultiPropertyTest extends MultiMethodTest
{
oldValue = AnyConverter.toObject(new Type(((Any) oldValue).getClass()), oldValue);
}
-// log.println("old = " + toString(oldValue));
-// log.println("new = " + toString(newValue));
log.println("result = " + toString(resValue));
}
catch (com.sun.star.lang.IllegalArgumentException iae)
diff --git a/qadevOOo/runner/lib/TestParameters.java b/qadevOOo/runner/lib/TestParameters.java
index 9fe80bf7d921..17d5cdd95dd0 100644
--- a/qadevOOo/runner/lib/TestParameters.java
+++ b/qadevOOo/runner/lib/TestParameters.java
@@ -26,8 +26,6 @@ import com.sun.star.beans.XPropertySet;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.XComponentContext;
-//import com.sun.star.lang.XMultiServiceFactory;
-
/**
* TestParameters describes a parameters (in a form of pairs: name, value) to
* be passed to tests and which may affect the test behaviour. That can be,
diff --git a/qadevOOo/runner/share/DescGetter.java b/qadevOOo/runner/share/DescGetter.java
index 739e52fb67f0..463acc704b45 100644
--- a/qadevOOo/runner/share/DescGetter.java
+++ b/qadevOOo/runner/share/DescGetter.java
@@ -97,9 +97,6 @@ public abstract class DescGetter
}
}
}
-// DescEntry aEntry = getDescriptionForSingleJob(
-// line.substring(3).trim(), descPath,
-// debug);
if (aEntry != null)
{
entryList.add(aEntry);
diff --git a/qadevOOo/runner/stats/ComplexDataBaseOutProducer.java b/qadevOOo/runner/stats/ComplexDataBaseOutProducer.java
index 386ec11ca844..1ba18f6e0c13 100644
--- a/qadevOOo/runner/stats/ComplexDataBaseOutProducer.java
+++ b/qadevOOo/runner/stats/ComplexDataBaseOutProducer.java
@@ -57,8 +57,6 @@ public class ComplexDataBaseOutProducer extends DataBaseOutProducer {
testBase = testBase.substring(sep+1);
// 2do fallback?
-// if (os == null || os.equals(""))
-// os = System.getProperty("os.name");
String descriptionString = testLanguage+":"+ os +":"+testBase+":"+apiVersion;
if (apiVersion != null)
apiVersion = apiVersion.substring(0, 6);
diff --git a/qadevOOo/runner/stats/SimpleLogWriter.java b/qadevOOo/runner/stats/SimpleLogWriter.java
index 3d3164373fbf..2610d9b0a366 100644
--- a/qadevOOo/runner/stats/SimpleLogWriter.java
+++ b/qadevOOo/runner/stats/SimpleLogWriter.java
@@ -77,11 +77,6 @@ public class SimpleLogWriter extends PrintWriter implements LogWriter {
super.println("LOG> " + msg);
super.flush();
}
- // else
- // {
- // super.println(" ++ " + msg);
- // super.flush();
- // }
}
public boolean summary(share.DescEntry entry) {
diff --git a/qadevOOo/runner/util/AccessibilityTools.java b/qadevOOo/runner/util/AccessibilityTools.java
index 1b59b251181d..e13bfcf58c68 100644
--- a/qadevOOo/runner/util/AccessibilityTools.java
+++ b/qadevOOo/runner/util/AccessibilityTools.java
@@ -198,7 +198,6 @@ public class AccessibilityTools {
(utils.getImplName(ac).indexOf(implName) > -1)) {
SearchedAccessible = xacc;
- //System.out.println("FOUND the desired component -- "+ ac.getAccessibleName() +isShowing);
return ac;
} else {
int k = ac.getAccessibleChildCount();
@@ -240,7 +239,6 @@ public class AccessibilityTools {
(utils.getImplName(ac).indexOf(implName) > -1) &&
isShowing) {
SearchedAccessible = xacc;
- //System.out.println("FOUND the desired component -- "+ ac.getAccessibleName() +isShowing);
return ac;
} else {
int k = ac.getAccessibleChildCount();
@@ -300,8 +298,6 @@ public class AccessibilityTools {
}
- //System.out.println("cellName: " + cellName + " cellIndex: " + cellIndex);
-
try {
XAccessibleContext ac = xSheetAcc.getAccessibleChild(cellIndex).getAccessibleContext();
System.out.println(ac.getAccessibleRole() + "," +
diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java
index acb24c290475..96778354ab6a 100644
--- a/qadevOOo/runner/util/DesktopTools.java
+++ b/qadevOOo/runner/util/DesktopTools.java
@@ -305,22 +305,18 @@ public class DesktopTools
}
catch (com.sun.star.util.CloseVetoException e)
{
- // e.printStackTrace();
System.out.println("Couldn't close document");
}
catch (com.sun.star.lang.DisposedException e)
{
- // e.printStackTrace();
System.out.println("Couldn't close document");
}
catch (java.lang.NullPointerException e)
{
- // e.printStackTrace();
System.out.println("Couldn't close document");
}
catch (com.sun.star.beans.PropertyVetoException e)
{
- // e.printStackTrace();
System.out.println("Couldn't close document");
}
}
@@ -483,8 +479,6 @@ public class DesktopTools
*/
public static void bringWindowToFront(XModel xModel)
{
- // System.out.println("DEBUG: bring to front xModel");
-
XTopWindow xTopWindow =
UnoRuntime.queryInterface(
XTopWindow.class,
@@ -495,7 +489,6 @@ public class DesktopTools
public static void bringWindowToFront(XComponent xComponent)
{
- // System.out.println("DEBUG: bring to front xComponent");
XModel xModel = UnoRuntime.queryInterface(XModel.class, xComponent);
if (xModel != null)
{
diff --git a/qadevOOo/runner/util/RegistryTools.java b/qadevOOo/runner/util/RegistryTools.java
index d8129087d4f9..686411495feb 100644
--- a/qadevOOo/runner/util/RegistryTools.java
+++ b/qadevOOo/runner/util/RegistryTools.java
@@ -356,6 +356,4 @@ public class RegistryTools {
}
-// public static void compareKeyTrees
-
}
diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java
index 8df2feea3ffd..7b63dab6c161 100644
--- a/qadevOOo/runner/util/ValueChanger.java
+++ b/qadevOOo/runner/util/ValueChanger.java
@@ -21,7 +21,6 @@ package util;
import com.sun.star.awt.Point;
import com.sun.star.beans.PropertyValue;
import com.sun.star.drawing.PolygonFlags;
-//import util.BitmapLoader;
import com.sun.star.uno.Enum ;
import java.lang.reflect.Field ;
import java.lang.reflect.Method ;
@@ -676,14 +675,6 @@ public class ValueChanger {
} else
-// if (oldValue instanceof com.sun.star.text.TableColumnSeparator[]){
-// com.sun.star.text.TableColumnSeparator[] _newValue = (com.sun.star.text.TableColumnSeparator[]) oldValue;
-// com.sun.star.text.TableColumnSeparator sep = new com.sun.star.text.TableColumnSeparator();
-// sep.IsVisible = ! _newValue[0].IsVisible;
-// _newValue[0] = sep;
-// newValue = _newValue;
-// } else
-
if (oldValue instanceof com.sun.star.style.BreakType){
com.sun.star.style.BreakType BT1 = com.sun.star.style.BreakType.COLUMN_AFTER;
com.sun.star.style.BreakType BT2 = com.sun.star.style.BreakType.COLUMN_BEFORE;
diff --git a/qadevOOo/runner/util/compare/PDFComparator.java b/qadevOOo/runner/util/compare/PDFComparator.java
index 4efe701c7f5d..9c4d7fd253c0 100644
--- a/qadevOOo/runner/util/compare/PDFComparator.java
+++ b/qadevOOo/runner/util/compare/PDFComparator.java
@@ -36,18 +36,5 @@ class PDFComparator extends GraphicalComparator implements DocComparator
return a;
}
- // all in GraphicalComparator implemented.
- // public boolean isReferenceExistent() throws IOException;
-
- // public void createReference() throws IOException;
-
- // public boolean compare() throws IOException;
-
-
- // public boolean isDiffReferenceExistent() throws IOException;
-
- // public void createDiffReference() throws IOException;
-
- // public boolean compareDiff() throws IOException;
}
diff --git a/qadevOOo/runner/util/compare/XMLComparator.java b/qadevOOo/runner/util/compare/XMLComparator.java
deleted file mode 100644
index de5c916fb10d..000000000000
--- a/qadevOOo/runner/util/compare/XMLComparator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package util.compare;
-
-//import java.io.IOException;
-//import util.compare.DocComparator;
-//import lib.TestParameters;
-
-/**
- * This Interface isn't ready yet.
- *
- */
-/*
-class XMLComparator implements DocComparator
-{
- static DocComparator getInstance(TestParameters aParams)
- {
- return null;
- }
- public boolean isReferenceExistent() throws IOException;
-
- public void createReference() throws IOException;
-
- public boolean compare() throws IOException;
-
-
- public boolean isDiffReferenceExistent() throws IOException;
-
- public void createDiffReference() throws IOException;
-
- public boolean compareDiff() throws IOException;
-}
-*/
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index bfc8afedb0e0..183daadee8dc 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -177,10 +177,6 @@ public class utils {
} else {
if (fullDocPath.startsWith("/")) {
prefix = "file://";
-// if (helper.OSHelper.isLinuxIntel())
-// {
-// prefix = "file:/";
-// }
}
else
{