summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/convwatch
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/convwatch')
-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
29 files changed, 1 insertions, 1185 deletions
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;
-// }
}