summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/convwatch
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/convwatch')
-rw-r--r--qadevOOo/runner/convwatch/Basename.java10
-rw-r--r--qadevOOo/runner/convwatch/BorderRemover.java40
-rw-r--r--qadevOOo/runner/convwatch/BuildID.java4
-rw-r--r--qadevOOo/runner/convwatch/ConvWatch.java56
-rw-r--r--qadevOOo/runner/convwatch/ConvWatchCancelException.java2
-rw-r--r--qadevOOo/runner/convwatch/ConvWatchException.java4
-rw-r--r--qadevOOo/runner/convwatch/ConvWatchStarter.java24
-rw-r--r--qadevOOo/runner/convwatch/CrashLoopTest.java6
-rw-r--r--qadevOOo/runner/convwatch/DB.java138
-rw-r--r--qadevOOo/runner/convwatch/DBHelper.java58
-rwxr-xr-xqadevOOo/runner/convwatch/DateHelper.java6
-rw-r--r--qadevOOo/runner/convwatch/DirectoryHelper.java26
-rw-r--r--qadevOOo/runner/convwatch/DocumentConverter.java24
-rw-r--r--qadevOOo/runner/convwatch/EnhancedComplexTestCase.java10
-rw-r--r--qadevOOo/runner/convwatch/FileHelper.java48
-rw-r--r--qadevOOo/runner/convwatch/FilenameHelper.java60
-rw-r--r--qadevOOo/runner/convwatch/GfxCompare.java20
-rw-r--r--qadevOOo/runner/convwatch/GlobalLogWriter.java8
-rw-r--r--qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java28
-rw-r--r--qadevOOo/runner/convwatch/GraphicalTestArguments.java74
-rw-r--r--qadevOOo/runner/convwatch/HTMLOutputter.java50
-rw-r--r--qadevOOo/runner/convwatch/INIOutputter.java14
-rw-r--r--qadevOOo/runner/convwatch/ImageHelper.java8
-rw-r--r--qadevOOo/runner/convwatch/IniFile.java54
-rw-r--r--qadevOOo/runner/convwatch/LISTOutputter.java6
-rw-r--r--qadevOOo/runner/convwatch/MSOfficePrint.java52
-rw-r--r--qadevOOo/runner/convwatch/NameHelper.java4
-rw-r--r--qadevOOo/runner/convwatch/OSHelper.java10
-rw-r--r--qadevOOo/runner/convwatch/OfficePrint.java184
-rw-r--r--qadevOOo/runner/convwatch/PRNCompare.java184
-rw-r--r--qadevOOo/runner/convwatch/PerformanceContainer.java24
-rw-r--r--qadevOOo/runner/convwatch/PixelCounter.java26
-rw-r--r--qadevOOo/runner/convwatch/PropertyName.java2
-rw-r--r--qadevOOo/runner/convwatch/ReferenceBuilder.java26
-rwxr-xr-xqadevOOo/runner/convwatch/ReportDesignerTest.java130
-rw-r--r--qadevOOo/runner/convwatch/SimpleFileSemaphore.java20
-rw-r--r--qadevOOo/runner/convwatch/StatusHelper.java12
-rw-r--r--qadevOOo/runner/convwatch/StringHelper.java26
-rwxr-xr-xqadevOOo/runner/convwatch/TimeHelper.java2
-rw-r--r--qadevOOo/runner/convwatch/TriState.java22
-rw-r--r--qadevOOo/runner/convwatch/ValueNotFoundException.java2
41 files changed, 752 insertions, 752 deletions
diff --git a/qadevOOo/runner/convwatch/Basename.java b/qadevOOo/runner/convwatch/Basename.java
index 05381e841eed..b93824fce953 100644
--- a/qadevOOo/runner/convwatch/Basename.java
+++ b/qadevOOo/runner/convwatch/Basename.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,7 +28,7 @@
package convwatch;
// -----------------------------------------------------------------------------
-// Helper stuff to
+// Helper stuff to
// abstract class Name
// {
// abstract public String getName();
@@ -41,7 +41,7 @@ package convwatch;
// {
// public String getName() {return "-test";}
// }
-//
+//
// public class Basename /* extends *//* implements */ {
// String fs;
// Basename()
@@ -54,8 +54,8 @@ package convwatch;
// 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 986f6ff6582b..88415fc78c92 100644
--- a/qadevOOo/runner/convwatch/BorderRemover.java
+++ b/qadevOOo/runner/convwatch/BorderRemover.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,7 +76,7 @@ class BorderRemover
* @param _nColor1
* @param _nColor2
* @param _nTolerance is a percentage value how strong the colors could be differ
-
+
*/
boolean compareColorWithTolerance(int _nColor1, int _nColor2, int _nTolerance)
{
@@ -84,7 +84,7 @@ class BorderRemover
int red1 = (_nColor1 >> 16) & 0xff;
int green1 = (_nColor1 >> 8) & 0xff;
int blue1 = (_nColor1 ) & 0xff;
-
+
// int alpha2 = (_nColor2 >> 24) & 0xff;
int red2 = (_nColor2 >> 16) & 0xff;
int green2 = (_nColor2 >> 8) & 0xff;
@@ -97,11 +97,11 @@ class BorderRemover
// calculate tolerance halve
double nTolerable = (_nTolerance * 256 / 100);
- if (nTolerable < 0)
+ if (nTolerable < 0)
{
nTolerable = 0;
}
-
+
// X - th < Y < X + th
// if ((red1 - nTolerable) < red2 && red2 < (red1 + nTolerable))
// is the same
@@ -112,7 +112,7 @@ class BorderRemover
{
if (Math.abs(blue1 - blue2) < nTolerable)
{
- return true;
+ return true;
}
else
{
@@ -128,10 +128,10 @@ class BorderRemover
{
// red differ
}
-
+
return false;
}
-
+
/**
* create a new image from an exist one without it's borders
* open the file (_sFilenameFrom) as an image, check if it contains any borders and remove
@@ -151,7 +151,7 @@ class BorderRemover
// 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);
@@ -159,20 +159,20 @@ class BorderRemover
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");
Object aObj = getWriterMIMETypesMethod.invoke(imageIOClass, new Object[]{ });
String[] types = (String[])aObj;
// GlobalLogWriter.get().println("Hello World: types: " + Arrays.asList(types) );
-
+
Method writeMethod = imageIOClass.getDeclaredMethod("write", new Class[]{ java.awt.image.RenderedImage.class,
java.lang.String.class,
java.io.File.class});
@@ -207,8 +207,8 @@ class BorderRemover
return true;
}
-
-
+
+
/**
* runs through the image, pixel by pixel
* as long as found pixels like the color at (0,0) this is interpreted as border.
@@ -223,7 +223,7 @@ class BorderRemover
int nXMax = 0;
int nYMin = h;
int nYMax = 0;
-
+
for (int y = 0; y < h; y++)
{
for (int x = 0; x < nXMin; x++)
@@ -276,8 +276,8 @@ class BorderRemover
// create the smalles possible image
aRect = new Rect(0,0,1,1);
}
-
-
+
+
// m_nXMin = nXMin;
// m_nXMax = nXMax;
// m_nYMin = nYMin;
@@ -294,8 +294,8 @@ class BorderRemover
if (w <= 0 || h <= 0)
{
throw new IllegalArgumentException("width or height are too small or negative.");
- }
-
+ }
+
BufferedImage aBI = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
int nXOffset = _aRect.getX();
@@ -315,5 +315,5 @@ class BorderRemover
// return java.awt.Toolkit.getDefaultToolkit().createImage(aSource);
return aBI;
}
-
+
}
diff --git a/qadevOOo/runner/convwatch/BuildID.java b/qadevOOo/runner/convwatch/BuildID.java
index efb091d160f9..dc60b89e1291 100644
--- a/qadevOOo/runner/convwatch/BuildID.java
+++ b/qadevOOo/runner/convwatch/BuildID.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -82,7 +82,7 @@ public class BuildID
{
GlobalLogWriter.get().println("soffice executable not found.");
}
-
+
int dummy = 0;
return sBuildID;
}
diff --git a/qadevOOo/runner/convwatch/ConvWatch.java b/qadevOOo/runner/convwatch/ConvWatch.java
index 76dc3522d2e0..138dcef519c0 100644
--- a/qadevOOo/runner/convwatch/ConvWatch.java
+++ b/qadevOOo/runner/convwatch/ConvWatch.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,7 +36,7 @@ import convwatch.StatusHelper;
import helper.URLHelper;
import java.io.File;
-public class ConvWatch
+public class ConvWatch
{
String getBuildID_FromFile(String _sInfoFile)
@@ -50,13 +50,13 @@ public class ConvWatch
return sBuildID;
}
/**
- * Check if given document (_sAbsoluteInputFile) and it's postscript representation (_sAbsoluteReferenceFile) produce
+ * Check if given document (_sAbsoluteInputFile) and it's postscript representation (_sAbsoluteReferenceFile) produce
* the same output like the StarOffice / OpenOffice.org which is accessable with XMultiServiceFactory.
* Here a simple graphically difference check is run through.
*
* Hint: In the OutputPath all needed files will create, there must
* be very much space. It's not possible to say how much.
- * One page need up to 800kb as jpeg.
+ * One page need up to 800kb as jpeg.
* Sample: If a document contains 2 pages, we need 2*800kb for prn
* output and 2*800kb for ps output and 2*800kb for it's difference
* output. So up to 4800kb or 4.8mb.
@@ -65,12 +65,12 @@ public class ConvWatch
*
* It's also absolutlly impossible to say, how much time this functions consume.
*/
-
+
StatusHelper[] createPostscriptStartCheck(GraphicalTestArguments _aGTA,
String _sOutputPath, String _sAbsoluteInputFile, String _sAbsoluteReferenceFile)
throws ConvWatchCancelException
{
-// TODO: some more checks
+// TODO: some more checks
if (! FileHelper.exists(_sAbsoluteInputFile))
{
@@ -88,7 +88,7 @@ public class ConvWatch
File aAbsoluteReferenceFile = new File(_sAbsoluteReferenceFile);
if (aAbsoluteReferenceFile.isDirectory())
- {
+ {
String sBasename = FileHelper.getBasename(_sAbsoluteInputFile);
String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
String sAbsoluteReferenceFileInfo = _sAbsoluteReferenceFile + fs + sNameNoSuffix + ".info";
@@ -115,8 +115,8 @@ public class ConvWatch
throw new ConvWatchCancelException("createPostscriptStartCheck: Given reference directory: '" + _sAbsoluteReferenceFile + "' does not exist.");
}
}
-
-
+
+
boolean bAbsoluteReferenceFile = true;
if (! FileHelper.exists(_sAbsoluteReferenceFile))
{
@@ -130,7 +130,7 @@ public class ConvWatch
throw new ConvWatchCancelException("createPostscriptStartCheck: Given reference file: " + _sAbsoluteReferenceFile + " does not exist.");
}
}
-
+
FileHelper.makeDirectories("", _sOutputPath);
// runner.convwatch.compare();
@@ -139,10 +139,10 @@ public class ConvWatch
String sInputFile = FileHelper.getBasename(_sAbsoluteInputFile);
// System.out.println("InputFile: " + sInputFile);
-
+
String sInputFileNoSuffix = FileHelper.getNameNoSuffix(sInputFile);
// System.out.println("BasenameNoSuffix: " + sInputFileNoSuffix);
-
+
String sAbsoluteOutputFile = _sOutputPath + fs + sInputFile;
String sAbsoluteOutputFileURL = URLHelper.getFileURLFromSystemPath(sAbsoluteOutputFile);
@@ -154,7 +154,7 @@ public class ConvWatch
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);
@@ -163,7 +163,7 @@ public class ConvWatch
OfficePrint.printToFile(_aGTA, sAbsoluteInputFileURL, sAbsoluteOutputFileURL, sAbsolutePrintFileURL);
// wait(2);
-
+
if (! FileHelper.exists(sAbsolutePrintFile))
{
throw new ConvWatchCancelException("createPostscriptStartCheck: Printed file " + sAbsolutePrintFile + " does not exist.");
@@ -181,16 +181,16 @@ public class ConvWatch
throw new ConvWatchCancelException("createPostscriptStartCheck: Given reference file: " + _sAbsoluteReferenceFile + " does not exist, after try to copy.");
}
}
-
+
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 );
@@ -213,7 +213,7 @@ public class ConvWatch
a.setMaxPages(9999);
}
}
-
+
a.setResolutionInDPI(_aGTA.getResolutionInDPI());
a.setBorderMove(_aGTA.getBorderMove());
a.setDocumentType(_aGTA.getDocumentType());
@@ -223,7 +223,7 @@ public class ConvWatch
_aGTA.setBorderMove(a.getBorderMove());
return aList;
}
-
+
// -----------------------------------------------------------------------------
// This creates a status for exact on document
static boolean createINIStatus(StatusHelper[] aList, String _sFilenamePrefix, String _sOutputPath, String _sAbsoluteInputFile, String _sBuildID, String _sRefBuildID)
@@ -235,14 +235,14 @@ public class ConvWatch
// String sHTMLFile = _sFilenamePrefix + sNameNoSuffix + ".html";
// HTMLOutputter HTMLoutput = HTMLOutputter.create(_sOutputPath, sHTMLFile, "", "");
// HTMLoutput.header(sNameNoSuffix);
-// TODO: version info was fine
+// TODO: version info was fine
// HTMLoutput.checkSection(sBasename);
// Status end
String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini";
INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, "", "");
INIoutput.createHeader();
-// TODO: version info was fine
+// TODO: version info was fine
INIoutput.writeSection("global");
INIoutput.writeValue("pages", String.valueOf(aList.length));
@@ -256,7 +256,7 @@ 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)
aList[i].printStatus();
-
+
boolean bCurrentResult = true; // result over exact one page
int nCurrentDiffStatus = aList[i].nDiffStatus;
@@ -294,7 +294,7 @@ public class ConvWatch
INIoutput.close();
return bResultIsOk;
}
-
+
// -----------------------------------------------------------------------------
static void createINIStatus_DiffDiff(StatusHelper[] aDiffDiffList, String _sFilenamePrefix, String _sOutputPath, String _sAbsoluteInputFile, String _sBuildID)
@@ -330,7 +330,7 @@ public class ConvWatch
// HTMLoutput.close();
INIoutput.close();
}
-
+
// -----------------------------------------------------------------------------
@@ -355,7 +355,7 @@ public class ConvWatch
}
return bResultIsOk;
}
-
+
// -----------------------------------------------------------------------------
public static boolean checkDiffDiff(GraphicalTestArguments _aGTA,
String _sOutputPath, String _sAbsoluteInputFile, String _sAbsoluteReferenceFile,
@@ -396,7 +396,7 @@ public class ConvWatch
String sSourceFile1 = sDiffBasename;
String sSourcePath2 = _sAbsoluteDiffPath;
String sSourceFile2 = sDiffBasename;
-
+
StatusHelper aCurrentStatus = aCompare.checkDiffDiff(_sOutputPath, sSourcePath1, sSourceFile1, sSourcePath2, sSourceFile2);
boolean bCurrentResult = (aCurrentStatus.nDiffStatus == StatusHelper.DIFF_NO_DIFFERENCES); // logic: nDiff==0 = true if there is no difference
bDiffIsOk &= bCurrentResult;
@@ -417,7 +417,7 @@ public class ConvWatch
}
return bDiffIsOk;
}
-
+
// public static void main( String[] argv )
// {
// PRNCompare a = new PRNCompare();
@@ -425,7 +425,7 @@ public class ConvWatch
// 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/ConvWatchCancelException.java b/qadevOOo/runner/convwatch/ConvWatchCancelException.java
index 2042f600b4cc..27b8ddceed81 100644
--- a/qadevOOo/runner/convwatch/ConvWatchCancelException.java
+++ b/qadevOOo/runner/convwatch/ConvWatchCancelException.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/convwatch/ConvWatchException.java b/qadevOOo/runner/convwatch/ConvWatchException.java
index f0fab0852deb..3493a4984008 100644
--- a/qadevOOo/runner/convwatch/ConvWatchException.java
+++ b/qadevOOo/runner/convwatch/ConvWatchException.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -27,7 +27,7 @@
package convwatch;
-public class ConvWatchException extends Exception
+public class ConvWatchException extends Exception
{
public ConvWatchException(String _aMessage)
{
diff --git a/qadevOOo/runner/convwatch/ConvWatchStarter.java b/qadevOOo/runner/convwatch/ConvWatchStarter.java
index c81ba3dfca85..1d7bbdee0681 100644
--- a/qadevOOo/runner/convwatch/ConvWatchStarter.java
+++ b/qadevOOo/runner/convwatch/ConvWatchStarter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -155,7 +155,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
/**
- *
+ *
* @return a List of software which must accessable as an external executable
*/
protected Object[] mustInstalledSoftware()
@@ -178,11 +178,11 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
// Ghostscript
aList.add( "gswin32c.exe -version" );
}
-
+
return aList.toArray();
}
-
+
/**
* The test method itself.
* Don't try to call it from outside, it is started only from qadevOOo runner
@@ -205,7 +205,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
{
return;
}
-
+
initMember();
aGTA.allowStore();
@@ -220,7 +220,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
// }
String fs = System.getProperty("file.separator");
-
+
String sHTMLName = "index.html";
File aInputPathTest = new File(m_sInputPath);
if (!aInputPathTest.isDirectory())
@@ -295,13 +295,13 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
runGDCWithStatus(HTMLoutput, LISToutput, m_sInputPath, m_sOutputPath, m_sReferencePath, m_sDiffPath, "");
}
}
-
+
LISToutput.close();
HTMLoutput.close();
log.println("The file '" + HTMLoutput.getFilename() + "' shows a html based status.");
DB.writeHTMLFile(HTMLoutput.getFilename());
}
-
+
// -----------------------------------------------------------------------------
void runGDCWithStatus(HTMLOutputter _aHTMLoutput, LISTOutputter _aLISToutput, String _sInputFile, String _sOutputPath, String _sReferencePath, String _sDiffPath, String _sNewSubDir )
@@ -317,7 +317,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
// {
// aSemaphore.P(aSemaphore.getSemaphoreFile());
// }
-
+
aGTA.getPerformance().startTime(PerformanceContainer.OfficeStart);
aProvider = new OfficeProvider();
XMultiServiceFactory xMSF = (XMultiServiceFactory) aProvider.getManager(param);
@@ -328,7 +328,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
aGTA = getGraphicalTestArguments(); // get new TestArguments
aGTA.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
// internal counter increase and at a given point (300 seconds) the office is killed.
@@ -371,7 +371,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
sStatusRunThrough = "FAILED, FAILED";
DB.destination_failed(sStatusRunThrough, sStatusMessage);
}
-
+
GlobalLogWriter.get().println("Watcher count is: " + aWatcher.getPing());
// Office shutdown
@@ -441,5 +441,5 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
}
-
+
}
diff --git a/qadevOOo/runner/convwatch/CrashLoopTest.java b/qadevOOo/runner/convwatch/CrashLoopTest.java
index 6eb7b35391b8..daab40c3a9f7 100644
--- a/qadevOOo/runner/convwatch/CrashLoopTest.java
+++ b/qadevOOo/runner/convwatch/CrashLoopTest.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,9 +49,9 @@ public class CrashLoopTest extends ReferenceBuilder
return new String[]{"testcrashandloops"};
}
- public void testcrashandloops()
+ public void testcrashandloops()
{
buildreference();
}
-
+
}
diff --git a/qadevOOo/runner/convwatch/DB.java b/qadevOOo/runner/convwatch/DB.java
index 4f6ab74a738b..071f390cf9e2 100644
--- a/qadevOOo/runner/convwatch/DB.java
+++ b/qadevOOo/runner/convwatch/DB.java
@@ -15,7 +15,7 @@ public class DB extends DBHelper
private DB()
{
}
-
+
private static synchronized DB getDB()
{
if (m_aDB == null)
@@ -38,17 +38,17 @@ public class DB extends DBHelper
getDB().fillVariables(_sDBInfoString);
getDB().updatestate_status("source started");
}
-
+
public static void test()
{
getDB().sql_test();
}
-
+
public static void source_start()
{
getDB().updatestate_status("source started");
}
-
+
public static void source_finished()
{
getDB().updatestate_status( "source finished");
@@ -64,7 +64,7 @@ public class DB extends DBHelper
{
getDB().updatestate_status("destination started");
}
-
+
public static void destination_finished()
{
getDB().updatestate_status("PASSED-OK");
@@ -87,14 +87,14 @@ public class DB extends DBHelper
{
getDB().updatehtmlfile_status(_sHTMLFile);
}
-
- public static void writeToDB(String _sFilename,
- String _sBasename,
- String _sFileFormat,
- String _sBuildID,
- String _sSourceType,
+
+ public static void writeToDB(String _sFilename,
+ String _sBasename,
+ String _sFileFormat,
+ String _sBuildID,
+ String _sSourceType,
int _nResolution )
- {
+ {
GlobalLogWriter.get().println("DB: Filename:" + _sFilename);
GlobalLogWriter.get().println("DB: Basename:" + _sBasename);
GlobalLogWriter.get().println("DB: FileFormat:" + _sFileFormat);
@@ -102,7 +102,7 @@ public class DB extends DBHelper
GlobalLogWriter.get().println("DB: SourceType:" + _sSourceType);
GlobalLogWriter.get().println("DB: Resolution:" + _nResolution);
}
-
+
private String getEnvironment()
{
if (OSHelper.isWindows())
@@ -129,7 +129,7 @@ public class DB extends DBHelper
return "";
}
}
-
+
// fill some db access important variables with values given out of a simple string
// DOC_COMPARATOR_DB_INFO_STRING=p:m220,c:m224,d:demo_lla,src:m220,dest:m224,doc:demo_lla,id:294,distinct:81
@@ -137,7 +137,7 @@ public class DB extends DBHelper
{
fillDBConnection(_sInfo);
m_sEnvironment = getEnvironment();
-
+
StringTokenizer aTokenizer = new StringTokenizer(_sInfo,",",false);
while (aTokenizer.hasMoreTokens())
{
@@ -187,21 +187,21 @@ public class DB extends DBHelper
}
}
}
-
- // public static void insertinto_file(String _sFilename,
- // String _sBasename,
- // String _sFileFormat,
- // String _sBuildID,
- // String _sSourceType,
+
+ // 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 ) .
@@ -210,21 +210,21 @@ public class DB extends DBHelper
// append( Quote( _sFileFormat) ) . append( sComma ) .
// append( Quote( _sBuildID) ) . append( sComma ) .
// append( _nResolution) . append( sComma ) .
- // append( Quote( today() ) );
- //
+ // append( Quote( today() ) );
+ //
// SQLinsertValues(aCon, "file", sValueLine, aDataLine.toString());
// }
-
- // public static void updatestate_currentdocs(String _sFilename,
+
+ // 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 );
@@ -242,9 +242,9 @@ public class DB extends DBHelper
Connection oCon = null;
ArrayList aResultList = new ArrayList();
try
- {
+ {
oStmt = _aCon.createStatement();
-
+
java.sql.ResultSet aResultSet = oStmt.executeQuery(_sSQL);
java.sql.ResultSetMetaData aResultSetMetaData = aResultSet.getMetaData();
@@ -261,8 +261,8 @@ public class DB extends DBHelper
try
{
Object aObj = null;
-
-
+
+
aResult.append("sqlresult: ");
for (int i=1;i<=nColumnCount;i++)
{
@@ -281,7 +281,7 @@ public class DB extends DBHelper
sValue = String.valueOf(nValue);
break;
}
-
+
default:
sValue = "UNSUPPORTED TYPE";
}
@@ -296,7 +296,7 @@ public class DB extends DBHelper
catch (java.sql.SQLException e)
{
}
- }
+ }
}
catch (java.sql.SQLException e)
{
@@ -306,16 +306,16 @@ public class DB extends DBHelper
}
return aResultList;
}
-
+
private void updatestate_status(String _sStatus)
{
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)
@@ -326,12 +326,12 @@ public class DB extends DBHelper
private void updateinfo_status(String _sInfo)
{
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 );
@@ -339,7 +339,7 @@ public class DB extends DBHelper
private void updateerrorfile_status(String _sErrorFile)
{
Connection aCon = new ShareConnection().getConnection();
-
+
String sErrorFile = _sErrorFile.replace('\\', '/');
String sSet = "errorfile=" + Quote(sErrorFile);
@@ -349,7 +349,7 @@ public class DB extends DBHelper
private void updatehtmlfile_status(String _sHtmlFile)
{
Connection aCon = new ShareConnection().getConnection();
-
+
String sHtmlFile = _sHtmlFile.replace('\\', '/');
String sSet = "htmlfile=" + Quote(sHtmlFile);
@@ -363,10 +363,10 @@ public class DB extends DBHelper
String sSet = "pagecount=" + _nPageCount;
String sWhere = getWhereClause();
SQLupdateValue( aCon, "documents", sSet, sWhere );
-
+
}
-
-
+
+
private String getWhereClause()
{
StringBuffer aWhereClause = new StringBuffer();
@@ -394,7 +394,7 @@ public class DB extends DBHelper
}
return aWhereClause.toString();
}
-
+
private String getDBDistinct()
{
Connection aCon = new ShareConnection().getConnection();
@@ -427,10 +427,10 @@ public class DB extends DBHelper
}
// System.out.println(sResult);
}
-
+
return "0";
}
-
+
public static void insertinto_documentcompare(String _sSourceVersion, String _sSourceName, String _sSourceCreatorType,
String _sDestinationVersion, String _sDestinationName, String _sDestinationCreatorType,
String _sDocumentPoolDir, String _sDocumentPoolName, String _sMailAddress,
@@ -441,7 +441,7 @@ public class DB extends DBHelper
_sDocumentPoolDir, _sDocumentPoolName, _sMailAddress,
_sSpecial, _sParentDistinct);
}
-
+
private void insertinto_documentcompare_impl(String _sSourceVersion, String _sSourceName, String _sSourceCreatorType,
String _sDestinationVersion, String _sDestinationName, String _sDestinationCreatorType,
String _sDocumentPoolDir, String _sDocumentPoolName, String _sMailAddress,
@@ -452,7 +452,7 @@ public class DB extends DBHelper
{
_sParentDistinct = "";
}
-
+
Connection aCon = new ShareConnection().getConnection();
String sValueLine="dbdistinct2, environment, sourceversion, sourcename, sourcecreatortype, destinationversion, destinationname, destinationcreatortype, documentpoolpath, documentpool, mailfeedback, state, special, parentdistinct, startdate";
@@ -473,7 +473,7 @@ public class DB extends DBHelper
append( Quote( _sSpecial ) ) . append( sComma ) .
append( Quote( _sParentDistinct ) ) . append( sComma ) .
append( Quote( today() ));
-
+
SQLinsertValues(aCon, "documentcompare", sValueLine, aDataLine.toString());
}
@@ -481,25 +481,25 @@ public class DB extends DBHelper
// {
// 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 ) .
@@ -508,33 +508,33 @@ public class DB extends DBHelper
// 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() ) );
- //
+ // append( Quote( today() ) );
+ //
// SQLinsertValues(aCon, "file", sValueLine, aDataLine.toString());
// }
-
- // public static void main( String[] args )
+
+ // 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 e28fafb65ec4..30df13123b99 100644
--- a/qadevOOo/runner/convwatch/DBHelper.java
+++ b/qadevOOo/runner/convwatch/DBHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,13 +41,13 @@ class ShareConnection
private Connection m_aConnection = null;
public ShareConnection()
{}
-
+
public Connection getConnection()
{
if (m_aConnection == null)
{
try
- {
+ {
m_aConnection = DBHelper.getMySQLConnection();
}
catch(java.sql.SQLException e)
@@ -69,7 +69,7 @@ class ShareConnection
m_aCon = _aCon;
m_sSQL = _sSQL;
}
-
+
public void run()
{
Statement oStmt = null;
@@ -78,13 +78,13 @@ class ShareConnection
GlobalLogWriter.get().println("DB: ERROR: in ExecSQL, connection not established.");
return;
}
-
+
// Connection oCon = null;
try
- {
+ {
// oCon = getMySQLConnection();
oStmt = m_aCon.createStatement();
-
+
GlobalLogWriter.get().println("DB: " + m_sSQL);
/* ResultSet oResult = */
oStmt.executeUpdate(m_sSQL);
@@ -103,8 +103,8 @@ public class DBHelper
* This method inserts given values into<br>
* the table 'states'
* @param values a set of comma separated values to be inserted
- */
-
+ */
+
public void SQLinsertValues(Connection _aCon, String _sTableName, String value_names, String values)
{
if (_aCon == null)
@@ -112,13 +112,13 @@ public class DBHelper
GlobalLogWriter.get().println("DB: ERROR: in SQLinsertValues, connection not established.");
return;
}
-
+
// String aInsertStr = "";
- //
+ //
// aInsertStr = "INSERT INTO " + _sTableName + " (" + value_names + " ) VALUES (" + values + ")";
// ExecSQL(_aCon, aInsertStr);
StringBuffer aInsertStr = new StringBuffer();
-
+
aInsertStr.append( "INSERT INTO " ) . append( _sTableName );
aInsertStr.append( " (").append( value_names ).append ( ")" );
aInsertStr.append(" VALUES (" ).append( values ).append( ")" );
@@ -132,13 +132,13 @@ public class DBHelper
GlobalLogWriter.get().println("DB: ERROR: in SQLinsertValues, connection not established.");
return;
}
-
+
// String aUpdateStr = "";
- //
+ //
// aUpdateStr = "UPDATE " + _sTableName + " SET " + _sSet + " WHERE " + _sWhere;
// ExecSQL( _aCon, aUpdateStr );
StringBuffer aUpdateStr = new StringBuffer();
-
+
aUpdateStr.append( "UPDATE " ).append( _sTableName )
.append( " SET " ).append( _sSet )
.append( " WHERE " ).append( _sWhere );
@@ -149,7 +149,7 @@ public class DBHelper
private static String m_sDBName;
private static String m_sDBUser;
private static String m_sDBPasswd;
-
+
protected synchronized void fillDBConnection(String _sInfo)
{
StringTokenizer aTokenizer = new StringTokenizer(_sInfo,",",false);
@@ -175,12 +175,12 @@ public class DBHelper
}
}
}
-
+
/**
* This method establishes a Connection<br>
* with the database 'module_unit' on jakobus
- */
-
+ */
+
public static Connection getMySQLConnection() throws SQLException
{
try
@@ -206,28 +206,28 @@ public class DBHelper
* module/platform combination
* @param mdl the name of the module, e.g. sal
* @param os the name of the platform, e.g. unxsols
- */
+ */
// LLA: public static void SQLdeleteValues(Connection _aCon, String _sEnvironment, String _sUnitName, String _sMethodName, String _sCWS, String _sDate)
// LLA: {
- // LLA: String sSQL =
+ // LLA: String sSQL =
// LLA: "DELETE FROM states WHERE " +
// LLA: " unit=" + DatabaseEntry.Quote(_sUnitName) +
- // LLA: " AND pf=" + DatabaseEntry.Quote (_sEnvironment) +
+ // LLA: " AND pf=" + DatabaseEntry.Quote (_sEnvironment) +
// LLA: " AND meth=" + DatabaseEntry.Quote (_sMethodName) +
// LLA: " AND cws=" + DatabaseEntry.Quote(_sCWS) +
// LLA: " AND dt=" + DatabaseEntry.Quote(_sDate);
- // LLA:
+ // LLA:
// LLA: // ExecSQL(_aCon, sSQL);
// LLA: }
-
+
protected synchronized void ExecSQL(Connection _aCon, String _sSQL)
{
MySQLThread aSQLThread = new MySQLThread(_aCon, _sSQL);
aSQLThread.start();
}
+
-
-
+
// public static int QueryIntFromSQL(String _sSQL, String _sColumnName, String _sValue)
// {
// boolean bNeedSecondTry = false;
@@ -255,10 +255,10 @@ public class DBHelper
Connection oCon = null;
int nValue = 0;
try
- {
+ {
// oCon = getMySQLConnection();
oStmt = _aCon.createStatement();
-
+
ResultSet oResult = oStmt.executeQuery(_sSQL);
oResult.next();
@@ -301,7 +301,7 @@ public class DBHelper
}
return ts + _sToQuote + ts;
}
-
+
/* default date format in the MySQL DB yyyy-MM-dd */
public static String today()
{
diff --git a/qadevOOo/runner/convwatch/DateHelper.java b/qadevOOo/runner/convwatch/DateHelper.java
index 59207ea3ee3a..d551a8b3c75b 100755
--- a/qadevOOo/runner/convwatch/DateHelper.java
+++ b/qadevOOo/runner/convwatch/DateHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,7 +38,7 @@ public class DateHelper
{
return getDateString("yyyyMMdd-HHmmss");
}
-
+
public static String getDateTimeForHumanreadableLog()
{
return getDateString("[yyyy/MM/dd hh:mm:ss]");
@@ -48,7 +48,7 @@ public class DateHelper
{
GregorianCalendar aCalendar = new GregorianCalendar();
StringBuffer aBuf = new StringBuffer();
-
+
Locale aLocale = new Locale("en","US");
SimpleDateFormat aFormat = new SimpleDateFormat(_sFormat, aLocale);
aBuf = aFormat.format(aCalendar.getTime(), aBuf, new FieldPosition(0) );
diff --git a/qadevOOo/runner/convwatch/DirectoryHelper.java b/qadevOOo/runner/convwatch/DirectoryHelper.java
index a15d790b9c25..74b6097c1798 100644
--- a/qadevOOo/runner/convwatch/DirectoryHelper.java
+++ b/qadevOOo/runner/convwatch/DirectoryHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@ import java.util.ArrayList;
* @author Lars.Langhans@sun.com
*/
public class DirectoryHelper
-{
+{
ArrayList m_aFileList = new ArrayList();
boolean m_bRecursiveIsAllowed = true;
@@ -45,12 +45,12 @@ public class DirectoryHelper
{
m_bRecursiveIsAllowed = _bValue;
}
-
+
/**
* Traverse over a given directory, and filter with a given FileFilter
* object and gives back the deep directory as a Object[] list, which
* contain a String object for every directory entry.
- *
+ *
* <B>Example</B>
* List directory /bin, filter out all files which ends with '.prn'
*
@@ -65,14 +65,14 @@ public class DirectoryHelper
* return true;
* }
* };
- *
+ *
* Object[] aList = DirectoryHelper.traverse("/bin", aFileFilter);
* for (int i=0;i<aList.length;i++)
* {
* String aEntry = (String)aList[i];
* System.out.println(aEntry);
* }
- *
+ *
*/
public static Object[] traverse( String _sDirectory, FileFilter _aFileFilter, boolean _bRecursiveIsAllowed )
{
@@ -81,7 +81,7 @@ public class DirectoryHelper
a.traverse_impl(_sDirectory, _aFileFilter);
return a.m_aFileList.toArray();
}
-
+
public static Object[] traverse( String _sDirectory, boolean _bRecursiveIsAllowed )
{
DirectoryHelper a = new DirectoryHelper();
@@ -89,8 +89,8 @@ public class DirectoryHelper
a.traverse_impl(_sDirectory, null);
return a.m_aFileList.toArray();
}
-
- void traverse_impl( String afileDirectory, FileFilter _aFileFilter )
+
+ void traverse_impl( String afileDirectory, FileFilter _aFileFilter )
{
File fileDirectory = new File(afileDirectory);
// Testing, if the file is a directory, and if so, it throws an exception
@@ -98,7 +98,7 @@ public class DirectoryHelper
{
throw new IllegalArgumentException( "not a directory: " + fileDirectory.getName() );
}
-
+
// Getting all files and directories in the current directory
File[] aDirEntries;
if (_aFileFilter != null)
@@ -109,7 +109,7 @@ public class DirectoryHelper
{
aDirEntries = fileDirectory.listFiles();
}
-
+
// Iterating for each file and directory
for ( int i = 0; i < aDirEntries.length; ++i )
{
@@ -121,7 +121,7 @@ public class DirectoryHelper
traverse_impl( aDirEntries[ i ].getAbsolutePath(), _aFileFilter );
}
}
- else
+ else
{
// adding file to List
try
@@ -145,7 +145,7 @@ public class DirectoryHelper
// {
// String sDirectory = "/misc/convwatch/gfxcmp/data/doc-pool/demo";
// Object[] aDirectoryList = DirectoryHelper.traverse( sDirectory, false );
- //
+ //
// for (int i=0;i<aDirectoryList.length;i++)
// {
// String sEntry = (String)aDirectoryList[i];
diff --git a/qadevOOo/runner/convwatch/DocumentConverter.java b/qadevOOo/runner/convwatch/DocumentConverter.java
index f6583dd5fdbc..e0a567d6c2b9 100644
--- a/qadevOOo/runner/convwatch/DocumentConverter.java
+++ b/qadevOOo/runner/convwatch/DocumentConverter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -109,7 +109,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
log.println("found " + PropertyName.DOC_COMPARATOR_INPUT_PATH + " " + sINPATH);
m_sInputPath = sINPATH;
}
-
+
// REFERENCE_PATH ----------
String sREF = (String)param.get( PropertyName.DOC_COMPARATOR_REFERENCE_PATH );
if (sREF == null || sREF.length() == 0)
@@ -122,21 +122,21 @@ public class DocumentConverter extends EnhancedComplexTestCase
log.println("found " + PropertyName.DOC_COMPARATOR_REFERENCE_PATH + " " + sREF);
m_sReferencePath = sREF;
}
-
+
if (bQuit == true)
{
// log.println("must quit.");
assure("Must quit, Parameter problems.", false);
}
-
+
if (m_sInputPath.startsWith("file:") ||
m_sReferencePath.startsWith("file:"))
{
assure("We can't handle file: URL right, use system path instead.", false);
}
-
+
}
-
+
/**
* Function returns a List of software which must accessable as an external executable
*/
@@ -148,7 +148,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
}
// the test ======================================================================
- public void convert()
+ public void convert()
{
GlobalLogWriter.set(log);
// check if all need software is installed and accessable
@@ -162,7 +162,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
{
assure("Must quit", false);
}
-
+
initMember();
File aInputPath = new File(m_sInputPath);
@@ -173,7 +173,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
String sRemovePath = aInputPath.getAbsolutePath();
// a whole directory
FileFilter aFileFilter = FileHelper.getFileFilter();
-
+
Object[] aList = DirectoryHelper.traverse(m_sInputPath, aFileFilter, aGTA.includeSubDirectories());
for (int i=0;i<aList.length;i++)
{
@@ -218,7 +218,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
param.put("ServiceFactory", xMSF);
}
GraphicalTestArguments aGTA = getGraphicalTestArguments();
-
+
if (aGTA.getOfficeProgram().toLowerCase().equals("msoffice"))
{
// ReferenceType is MSOffice
@@ -238,7 +238,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
{
sOutputFile += fs + sInputFileBasename;
}
-
+
a.storeToFileWithMSOffice(aGTA, _sInputFile, sOutputFile);
}
catch(ConvWatchCancelException e)
@@ -265,7 +265,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
assure(e.getMessage(), false);
}
}
-
+
if (aGTA.restartOffice())
{
// Office shutdown
diff --git a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
index 7c51940d7801..38b972b8b525 100644
--- a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase
// {
// // System.out.println("before()");
// }
- //
+ //
// public void after()
// {
// // System.out.println("after()");
@@ -90,7 +90,7 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase
}
}
}
-
+
// -----------------------------------------------------------------------------
protected abstract Object[] mustInstalledSoftware();
@@ -111,7 +111,7 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase
}
return false;
}
-
+
// -----------------------------------------------------------------------------
public GraphicalTestArguments getGraphicalTestArguments()
@@ -124,7 +124,7 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase
if (aGTA.getExportFilterName() != null && aGTA.getExportFilterName().toLowerCase().equals("help"))
{
aGTA = null;
- }
+ }
return aGTA;
}
}
diff --git a/qadevOOo/runner/convwatch/FileHelper.java b/qadevOOo/runner/convwatch/FileHelper.java
index 2ff9ede2f8d4..e0e003246779 100644
--- a/qadevOOo/runner/convwatch/FileHelper.java
+++ b/qadevOOo/runner/convwatch/FileHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,13 +44,13 @@ public class FileHelper
String sOSName = System.getProperty("os.name");
String sOSArch = System.getProperty("os.arch");
String sOSVersion = System.getProperty("os.version");
-
+
GlobalLogWriter.get().println(sOSName);
GlobalLogWriter.get().println(sOSArch);
GlobalLogWriter.get().println(sOSVersion);
}
-
+
public static void MessageBox(String _sStr)
{
String sVersion = System.getProperty("java.version");
@@ -75,17 +75,17 @@ public class FileHelper
// 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;
}
-
+
public static boolean isDir(String _sDir)
{
if (_sDir == null) return false;
@@ -104,7 +104,7 @@ public class FileHelper
}
return false;
}
-
+
public static String getBasename(String _sFilename)
{
if (_sFilename == null) return "";
@@ -128,7 +128,7 @@ public class FileHelper
}
return _sFilename;
}
-
+
public static String getSuffix(String _sFilename)
{
if (_sFilename == null) return "";
@@ -139,7 +139,7 @@ public class FileHelper
}
return "";
}
-
+
public static String getPath(String _sFilename)
{
if (_sFilename == null) return "";
@@ -155,19 +155,19 @@ public class FileHelper
/*
static ArrayList files = new ArrayList();
- public static Object[] traverse( String afileDirectory )
+ 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 )
{
@@ -206,7 +206,7 @@ public class FileHelper
first = path.substring(0, n);
path = path.substring(n + 1);
}
-
+
String already_done = null;
StringTokenizer path_tokenizer = new StringTokenizer(path,fs,false);
already_done = first;
@@ -218,7 +218,7 @@ public class FileHelper
// System.out.println(already_done);
//create the directory
new_dir.mkdirs();
- if (OSHelper.isUnix() &&
+ if (OSHelper.isUnix() &&
_sMode.length() > 0)
{
try
@@ -237,7 +237,7 @@ public class FileHelper
public static void chmod(File file, String mode) throws java.io.IOException
{
Runtime.getRuntime().exec
- (new String[]
+ (new String[]
{"chmod", mode, file.getAbsolutePath()});
}
@@ -274,7 +274,7 @@ public class FileHelper
sSubDirs = sSubDirs.substring(1);
}
}
-
+
return sSubDirs;
}
@@ -340,7 +340,7 @@ public class FileHelper
return bDebug;
}
- public static void copy(String _sSource, String _sDestination)
+ public static void copy(String _sSource, String _sDestination)
{
try
{
@@ -350,10 +350,10 @@ public class FileHelper
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();
}
@@ -363,12 +363,12 @@ public class FileHelper
GlobalLogWriter.get().println("Message: " + e.getMessage());
}
}
-
+
/**
* Within the directory run through, it's possible to say which file extension types should not
* consider like '*.prn' because it's not a document.
*
- * @return a FileFilter function
+ * @return a FileFilter function
*/
public static FileFilter getFileFilter()
{
@@ -381,7 +381,7 @@ public class FileHelper
{
return false;
}
-
+
if (pathname.getName().endsWith(".prn"))
{
return false;
@@ -395,7 +395,7 @@ public class FileHelper
if (pathname.getName().endsWith("_"))
{
return false;
- }
+ }
return true;
}
};
diff --git a/qadevOOo/runner/convwatch/FilenameHelper.java b/qadevOOo/runner/convwatch/FilenameHelper.java
index 3d49703dc995..0f6df3538b93 100644
--- a/qadevOOo/runner/convwatch/FilenameHelper.java
+++ b/qadevOOo/runner/convwatch/FilenameHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -27,9 +27,9 @@
/**
* Helper class to hold a Filename or a FileURL
- * Something like File in Java,
+ * Something like File in Java,
* with some more extensions direct to ConvWatch and it's name conventions
- *
+ *
*
*/
package convwatch;
@@ -42,7 +42,7 @@ import util.utils;
interface Filenamer
{
public String getSuffix();
- public String getFileURL();
+ public String getFileURL();
public String getAbsoluteSystemFilename();
public String getFilename();
public String getSystemPath();
@@ -57,7 +57,7 @@ abstract class FilenameHelper_impl implements Filenamer
String m_sFilename;
String m_sSuffix;
int m_nNumber = 0;
-
+
public String getNumber()
{
return StringHelper.createValueString(m_nNumber, 4);
@@ -70,17 +70,17 @@ abstract class FilenameHelper_impl implements Filenamer
{
fs = System.getProperty("file.separator");
}
-
+
/**
* initialise a FilenameHelper_impl with a complete filename.
* if the filename starts with 'file:///' it is interpret as a file URL
- *
+ *
*/
public FilenameHelper_impl()
{
initMember();
}
-
+
public void setCompleteFilename(String _sFilename)
{
if (_sFilename.startsWith("file:///"))
@@ -109,27 +109,27 @@ abstract class FilenameHelper_impl implements Filenamer
String sPath = checkPath(_sPath);
String sFilename = checkFilename(_sName);
String sSuffix = checkSuffix(_sSuffix);
-
+
m_sPath = sPath;
m_sFilename = sFilename;
m_sSuffix = sSuffix;
}
-
+
/**
* @return the current path as a OOo path URL
*/
- public String getFileURL()
+ public String getFileURL()
{
String sSystemPath = createAbsoluteFilename();
String sFileURL = URLHelper.getFileURLFromSystemPath(sSystemPath);
return sFileURL;
}
-
+
/**
* @return the current path as a system path
*/
- public String getAbsoluteSystemFilename()
+ public String getAbsoluteSystemFilename()
{
String sSystemFilename = createAbsoluteFilename();
sSystemFilename = utils.replaceAll13(sSystemFilename, "/", fs);
@@ -154,7 +154,7 @@ abstract class FilenameHelper_impl implements Filenamer
{
m_sPath = _sName;
}
-
+
/**
* @return a created name
*/
@@ -162,7 +162,7 @@ abstract class FilenameHelper_impl implements Filenamer
// {
// return getName();
// }
-
+
/**
* @return the complete filename with it's suffix
*/
@@ -187,7 +187,7 @@ abstract class FilenameHelper_impl implements Filenamer
{
return FileHelper.isDir(getSystemPath());
}
-
+
/**
* @return true, if the file really exist.
*/
@@ -195,10 +195,10 @@ abstract class FilenameHelper_impl implements Filenamer
{
return FileHelper.exists(createAbsoluteFilename());
}
-
+
/**
* @return the current suffix
- */
+ */
public String getSuffix()
{
return m_sSuffix;
@@ -210,7 +210,7 @@ abstract class FilenameHelper_impl implements Filenamer
{
return m_sPath + fs + getFilename();
}
-
+
/*
* remove follows 'file separators'
*/
@@ -227,7 +227,7 @@ abstract class FilenameHelper_impl implements Filenamer
}
return sPath;
}
-
+
String checkFilename(String _sFilename)
{
String sFilename;
@@ -241,7 +241,7 @@ abstract class FilenameHelper_impl implements Filenamer
}
return sFilename;
}
-
+
String checkSuffix(String _sSuffix)
{
String sSuffix;
@@ -255,13 +255,13 @@ abstract class FilenameHelper_impl implements Filenamer
}
return sSuffix;
}
-
+
String splitSuffix(String _sName)
{
String sSuffix = FileHelper.getSuffix(_sName);
return checkSuffix(sSuffix);
}
-
+
public boolean equals(FilenameHelper_impl _aOtherFN)
{
String sPath = createAbsoluteFilename();
@@ -272,7 +272,7 @@ abstract class FilenameHelper_impl implements Filenamer
}
return false;
}
-
+
}
/**
@@ -284,7 +284,7 @@ class OriginalFilename extends FilenameHelper_impl
{
return getName();
}
-
+
public OriginalFilename(){}
public OriginalFilename(String _path, String _filename, String _ext) { super(_path, _filename, _ext);}
}
@@ -302,7 +302,7 @@ class OriginalReferenceFilename extends FilenameHelper_impl
{
return getName();
}
- public OriginalReferenceFilename(){}
+ public OriginalReferenceFilename(){}
public OriginalReferenceFilename(String _path, String _filename, String _ext) { super(_path, _filename, _ext);}
}
@@ -323,7 +323,7 @@ class OriginalReferencePictureFilename extends FilenameHelper_impl
{
return getName() + "-" + "%04d" + "-ref";
}
-
+
public OriginalReferencePictureFilename(){}
public OriginalReferencePictureFilename(String _path, String _filename, String _ext) { super(_path, _filename, _ext);}
}
@@ -371,7 +371,7 @@ class CurrentReferencePictureFilename extends FilenameHelper_impl
public class FilenameHelper
{
-
+
public static void main(String[] args)
{
OriginalReferenceFilename d = new OriginalReferenceFilename();
@@ -387,8 +387,8 @@ public class FilenameHelper
OriginalReferenceFilename a2 = new OriginalReferenceFilename("/dir1/dir2","/name.ext","");
OriginalReferenceFilename a3 = new OriginalReferenceFilename("/dir1/dir2","/name",".ext");
OriginalReferenceFilename a4 = 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");
diff --git a/qadevOOo/runner/convwatch/GfxCompare.java b/qadevOOo/runner/convwatch/GfxCompare.java
index b45897475c23..a2baadf60c3e 100644
--- a/qadevOOo/runner/convwatch/GfxCompare.java
+++ b/qadevOOo/runner/convwatch/GfxCompare.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,13 +53,13 @@ public class GfxCompare extends EnhancedComplexTestCase
* Return all test methods.
* @return The test methods.
*/
-
+
public String[] getTestMethodNames() {
return new String[]{"gfxcompare"};
}
/**
- *
+ *
* @return a List of software which must accessable as an external executable
*/
protected Object[] mustInstalledSoftware()
@@ -95,7 +95,7 @@ public class GfxCompare extends EnhancedComplexTestCase
String sFile2 = (String)param.get("FILE2");
compare(sFile1, sFile2);
}
-
+
// -----------------------------------------------------------------------------
String createJPEG(String _sFile, String _sAdditional)
@@ -122,20 +122,20 @@ public class GfxCompare extends EnhancedComplexTestCase
String sFileDir = FileHelper.getPath(_sFile);
String sBasename = FileHelper.getBasename(_sFile);
String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
-
+
String fs = System.getProperty("file.separator");
String sTmpDir = util.utils.getUsersTempDir();
if (m_aArguments.getOutputPath() != null)
{
sTmpDir = m_aArguments.getOutputPath();
}
-
+
if (_sFile.toLowerCase().endsWith("ps") ||
_sFile.toLowerCase().endsWith("prn") ||
_sFile.toLowerCase().endsWith("pdf"))
{
// seems to be a Postscript of PDF file
-
+
String[] aList = PRNCompare.createJPEGFromPostscript(sTmpDir, sFileDir, sBasename, m_aArguments.getResolutionInDPI());
sJPEGFile = aList[0];
}
@@ -173,8 +173,8 @@ public class GfxCompare extends EnhancedComplexTestCase
}
return sJPEGFile;
}
-
-
+
+
public String compare(String _sFile1, String _sFile2)
{
String sJPEGFile1 = createJPEG(_sFile1, "-1");
@@ -183,7 +183,7 @@ public class GfxCompare extends EnhancedComplexTestCase
if (sJPEGFile1.length() > 0 && sJPEGFile2.length() > 0)
{
String sDiffFile = PRNCompare.compareJPEGs(sJPEGFile1, sJPEGFile2);
-
+
if (sDiffFile.length() > 0)
{
GlobalLogWriter.get().println("Difference created: " + sDiffFile);
diff --git a/qadevOOo/runner/convwatch/GlobalLogWriter.java b/qadevOOo/runner/convwatch/GlobalLogWriter.java
index fe785915cc02..cb31959dd0e7 100644
--- a/qadevOOo/runner/convwatch/GlobalLogWriter.java
+++ b/qadevOOo/runner/convwatch/GlobalLogWriter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,16 +42,16 @@ 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 efce96c1c15b..fe4de9d172f4 100644
--- a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
+++ b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,7 +55,7 @@ public class GraphicalDifferenceCheck
GlobalLogWriter.get().println("");
}
}
-
+
/**
* Creates references form documents used by the graphical difference check
*
@@ -72,7 +72,7 @@ public class GraphicalDifferenceCheck
// System.out.println("createReferences() InputPath: " + _sInputPath + " refpath: " + _sReferencePath);
showVersion();
File aInputPath = new File(_sInputPath);
-
+
// System.out.println("Inputpath in file: " + aInputPath.getAbsolutePath());
//!
// if (aInputPath.exists())
@@ -84,7 +84,7 @@ public class GraphicalDifferenceCheck
// System.out.println("Inputpath doesn't exists");
// return;
// }
-
+
if (aInputPath.isDirectory())
{
String fs = System.getProperty("file.separator");
@@ -139,7 +139,7 @@ public class GraphicalDifferenceCheck
{
return OfficePrint.isReferenceExists(_aGTA, _sReferencePath, _sInputFile);
}
-
+
/**
* Used for the comparance of graphical differences.
@@ -230,7 +230,7 @@ public class GraphicalDifferenceCheck
return checkOneFile( _sInputFile, _sOutputPath, _sReferencePath, null, _aGTA);
}
-
+
/**
* Used for the comparance of graphical differences.
* Method compares one document (_sInputFile) with an older document of the same name in the provided directory (_sReferencePath).
@@ -283,7 +283,7 @@ public class GraphicalDifferenceCheck
// one file
String sInputFile;
- sInputFile = createInputFile(xComponent, _sOutputPath, _resultDocName);
+ sInputFile = createInputFile(xComponent, _sOutputPath, _resultDocName);
sInputFile = FileHelper.getSystemPathFromFileURL(sInputFile);
return convwatch.ConvWatch.check(_aGTA, _sOutputPath, sInputFile, _sReferencePath);
}
@@ -296,26 +296,26 @@ public class GraphicalDifferenceCheck
// LLA: old! *
// LLA: old! * @param inputPath the original document name (possibly including path)
// LLA: old! * @param referencePath the directory where the reference document will be stored
-// LLA: old!
+// LLA: old!
// LLA: old! */
// LLA: old! public static boolean isReferencExistent(String inputDocumentPath, String referencePath)
// LLA: old! {
-// LLA: old! // isolate the document name
+// LLA: old! // isolate the document name
// LLA: old! if(inputDocumentPath.indexOf(File.separator) != -1)
// LLA: old! inputDocumentPath = inputDocumentPath.substring(inputDocumentPath.lastIndexOf(File.separator) + 1, inputDocumentPath.length());
-// LLA: old!
-// LLA: old! // exchange any arbitray suffix against the refence suffix (.prn)
+// LLA: old!
+// LLA: old! // exchange any arbitray suffix against the refence suffix (.prn)
// LLA: old! if(inputDocumentPath.indexOf('.') != -1)
// LLA: old! inputDocumentPath = inputDocumentPath.substring(0, inputDocumentPath.lastIndexOf('.'));
// LLA: old! inputDocumentPath = inputDocumentPath + ".prn";
-// LLA: old! System.out.println("GraphicalDifference CheckReferenceDocument: " + inputDocumentPath);
-// LLA: old!
+// LLA: old! System.out.println("GraphicalDifference CheckReferenceDocument: " + inputDocumentPath);
+// LLA: old!
// LLA: old! File refFile = new File(referencePath + inputDocumentPath);
// LLA: old! if(refFile.exists()){
// LLA: old! return true;
// LLA: old! }else
// LLA: old! return false;
-// LLA: old! }
+// LLA: old! }
private static String createInputFile(XComponent xComponent, String _sOutputPath, String resultDocName)
diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
index 72d732d3d8de..04080e3a8d0e 100644
--- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java
+++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -107,7 +107,7 @@ public class GraphicalTestArguments
String m_sDistinct = null;
boolean m_bCreateDefaultReference = false;
-
+
// CONSTRUCTOR
private GraphicalTestArguments(){}
@@ -116,7 +116,7 @@ public class GraphicalTestArguments
m_aCurrentParams = param;
// collect interesting information from the ComplexTestCase
// ....
-
+
// REFERENCE_TYPE ----------
String sReferenceType = (String)param.get( PropertyName.DOC_COMPARATOR_REFERENCE_TYPE );
if (sReferenceType == null || sReferenceType.length() == 0)
@@ -127,7 +127,7 @@ public class GraphicalTestArguments
// log.println("found REFERENCE_TYPE " + sReferenceType );
setReferenceType(sReferenceType);
}
-
+
// PRINTER_NAME ----------
String sPrinterName = (String)param.get( PropertyName.DOC_COMPARATOR_PRINTER_NAME );
if (sPrinterName == null || sPrinterName.length() == 0)
@@ -221,7 +221,7 @@ public class GraphicalTestArguments
{
m_bResuseOffice = false;
}
-
+
String sHTMLOutputPrefix = (String)param.get( PropertyName.DOC_COMPARATOR_HTML_OUTPUT_PREFIX);
if (sHTMLOutputPrefix == null)
@@ -255,19 +255,19 @@ public class GraphicalTestArguments
m_tWithBorderMove = TriState.FALSE;
// m_tWithBorderMove = TriState.UNSET;
}
-
+
String sLeaveOutNames = (String)param.get(PropertyName.DOC_COMPARATOR_LEAVE_OUT_FILES);
if (sLeaveOutNames != null)
{
m_sLeaveOutNames = sLeaveOutNames;
- }
-
+ }
+
String sDBInfoString = (String)param.get(PropertyName.DOC_COMPARATOR_DB_INFO_STRING);
if (sDBInfoString != null)
{
m_sDBInfoString = sDBInfoString;
}
-
+
// DISTINCT ----------
String sDistinct = (String)param.get( "DISTINCT" );
if (sDistinct == null || sDistinct.length() == 0)
@@ -306,7 +306,7 @@ public class GraphicalTestArguments
m_bCreateDefaultReference = false;
}
}
-
+
}
public boolean checkIfUsableDocumentType(String _sName)
@@ -322,18 +322,18 @@ public class GraphicalTestArguments
{
return false;
}
-
+
return true;
}
-
- static void showInternalFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
+
+ static void showInternalFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
{
if (_sFilterName.length() == 0)
{
// System.out.println("No FilterName set.");
return;
}
-
+
if (_xMSF == null)
{
GlobalLogWriter.get().println("MultiServiceFactory not set.");
@@ -355,7 +355,7 @@ public class GraphicalTestArguments
XNameAccess aNameAccess = (XNameAccess)UnoRuntime.queryInterface(XNameAccess.class, aObj);
if (aNameAccess != null)
{
-
+
if (_sFilterName.toLowerCase().equals("help"))
{
GlobalLogWriter.get().println("Show all possible ElementNames from current version." );
@@ -368,7 +368,7 @@ public class GraphicalTestArguments
}
}
}
-
+
/*
public GraphicalTestArguments(TestParameters param, Log xxx)
{
@@ -397,12 +397,12 @@ public class GraphicalTestArguments
public void setDefaultXMLFormatApp(String _sNameOfApp) {m_sDefaultXMLFormatApplication = _sNameOfApp;}
// get methods
- public XMultiServiceFactory getMultiServiceFactory()
+ public XMultiServiceFactory getMultiServiceFactory()
{
XMultiServiceFactory xMSF = (XMultiServiceFactory)m_aCurrentParams.getMSF();
-
+
// check if MultiServiceFactory is given
- if (getReferenceType().toLowerCase().equals("pdf") ||
+ if (getReferenceType().toLowerCase().equals("pdf") ||
getReferenceType().toLowerCase().equals("ooo"))
{
if (xMSF == null)
@@ -454,7 +454,7 @@ public class GraphicalTestArguments
}
return true;
}
-
+
/**
* @return integer value, which contain resolution in DPI.
*/
@@ -474,7 +474,7 @@ public class GraphicalTestArguments
}
}
}
-
+
/**
* @return the INPUT_PATH out of the TestParameters
@@ -528,7 +528,7 @@ public class GraphicalTestArguments
sReferenceInputPath = (String)m_aCurrentParams.get(PropertyName.DOC_COMPARATOR_REFERENCE_INPUT_PATH);
return sReferenceInputPath;
}
-
+
/**
* Helper function to get the buildid of the current used OpenOffice.org
* out of the AppExecutionCommand the build ID
@@ -537,7 +537,7 @@ public class GraphicalTestArguments
{
String sAPP = (String)m_aCurrentParams.get(util.PropertyName.APP_EXECUTION_COMMAND);
// return getBuildID(sAPP);
-// TODO: here we need the getBuildID(string) method
+// TODO: here we need the getBuildID(string) method
String sBuildID = convwatch.BuildID.getBuildID(sAPP);
return sBuildID;
}
@@ -554,7 +554,7 @@ public class GraphicalTestArguments
}
return true;
}
-
+
// Handle for Reference Build ID, is set in ConvWatch.createPostscriptStartCheck()
private String m_sRefBuildID;
@@ -566,7 +566,7 @@ public class GraphicalTestArguments
{
return m_sRefBuildID;
}
-
+
public void disallowStore()
{
m_bStoreFile = false;
@@ -583,7 +583,7 @@ public class GraphicalTestArguments
{
return m_bCreateDefaultReference;
}
-
+
// get/set for FilterName
// get the right Filtername (internal Name) from
@@ -626,13 +626,13 @@ public class GraphicalTestArguments
}
return false;
}
-
+
String m_sHTMLOutputPrefix = "";
public String getHTMLOutputPrefix()
{
return m_sHTMLOutputPrefix;
}
-
+
TriState m_tWithBorderMove = TriState.UNSET;
// public TriState isBorderMove()
// {
@@ -646,7 +646,7 @@ public class GraphicalTestArguments
{
m_tWithBorderMove = _tBorderMove;
}
-
+
String m_sDocumentType = "";
public void setDocumentType(String _sName)
{
@@ -656,7 +656,7 @@ public class GraphicalTestArguments
{
return m_sDocumentType;
}
-
+
/*
helper class for performance analyser features
*/
@@ -669,7 +669,7 @@ public class GraphicalTestArguments
}
return m_aPerformanceContainer;
}
-
+
private String m_aInputFile;
public void setInputFile(String _sInputFile)
{
@@ -690,10 +690,10 @@ public class GraphicalTestArguments
return null;
}
}
-
+
return m_sDBInfoString;
}
-
+
public boolean cancelRequest()
{
File aCancelFile = null;
@@ -703,15 +703,15 @@ public class GraphicalTestArguments
if (sTempPath != null)
{
String sGDC_Dir = sTempPath;
-
+
if (m_sDistinct.length() > 0)
{
sGDC_Dir = sGDC_Dir + fs + m_sDistinct;
}
-
+
String sCancelFile = sGDC_Dir + fs + "cancel_compare.txt";
aCancelFile = new File(sCancelFile);
-
+
if (aCancelFile.exists())
{
GlobalLogWriter.get().println("ATTENTION: Found file: '" + sCancelFile + "'.");
@@ -721,7 +721,7 @@ public class GraphicalTestArguments
}
return false;
}
-
+
}
diff --git a/qadevOOo/runner/convwatch/HTMLOutputter.java b/qadevOOo/runner/convwatch/HTMLOutputter.java
index 49edb2c25ac0..9801897c648c 100644
--- a/qadevOOo/runner/convwatch/HTMLOutputter.java
+++ b/qadevOOo/runner/convwatch/HTMLOutputter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,7 +36,7 @@ public class HTMLOutputter
FileWriter m_aOut;
String m_sFilename;
String m_sNamePrefix; // the HTML files used a suffix to build it's right name
-
+
/**
* ls is the current line separator (carridge return)
*/
@@ -67,7 +67,7 @@ public class HTMLOutputter
return a;
}
public String getFilename() {return m_sFilename;}
-
+
public void header(String _sTitle)
{
try
@@ -79,17 +79,17 @@ public class HTMLOutputter
m_aOut.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/style.css\" media=\"screen\" />" + ls);
m_aOut.write( "</head>" + ls);
m_aOut.write( "<body bgcolor=white>" + ls);
- m_aOut.flush();
+ m_aOut.flush();
}
catch (java.io.IOException e)
{
}
}
-
+
final static String TEST_TABLETITLE = "Test";
final static String VISUAL_STATUS_TABLETITLE = "Visual status";
final static String VISUAL_STATUS_MESSAGE_TABLETITLE = "Message";
-
+
public void indexSection(String _sOfficeInfo)
{
try
@@ -151,7 +151,7 @@ public class HTMLOutputter
// sbUNIXPath.append(_sHREF.substring(index + 2));
// String sUNIXPath = sbUNIXPath.toString();
// sUNIXPath = utils.replaceAll13(sUNIXPath, "\\", "/");
- //
+ //
// a.append("<A HREF=\"");
// a.append(sUNIXPath);
// a.append("\">");
@@ -162,7 +162,7 @@ public class HTMLOutputter
// {
// System.out.println("Path is '" + _sHREF + "'");
// }
-
+
}
return a.toString();
}
@@ -175,7 +175,7 @@ public class HTMLOutputter
a.append("</TD>");
return a.toString();
}
-
+
String tableHeaderCell(String _sValue)
{
StringBuffer a = new StringBuffer();
@@ -184,7 +184,7 @@ public class HTMLOutputter
a.append("</TH>");
return a.toString();
}
-
+
public void indexLine(String _sHTMLFile, String _sHTMLName, String _sHTMLFile2, String _sHTMLName2, String _sStatusRunThrough, String _sStatusMessage)
{
try
@@ -199,7 +199,7 @@ public class HTMLOutputter
{
m_aOut.write(tableDataCell( "" ) );
}
-
+
m_aOut.write( tableDataCell(_sStatusRunThrough) );
m_aOut.write( tableDataCell(_sStatusMessage) );
m_aOut.write( "</TR>" + ls);
@@ -210,7 +210,7 @@ public class HTMLOutputter
{
}
}
-
+
public void close()
{
try
@@ -224,7 +224,7 @@ public class HTMLOutputter
{
}
}
-
+
// -----------------------------------------------------------------------------
String stronghtml(String _sValue)
{
@@ -234,7 +234,7 @@ public class HTMLOutputter
a.append("</STRONG>");
return a.toString();
}
-
+
final static String FIRSTGFX_TABLETITLE = "Original print file as jpeg";
final static String SECONDGFX_TABLETITLE = "New print file as jpeg";
final static String DIFFER_TABLETITLE = "Difference file";
@@ -265,7 +265,7 @@ public class HTMLOutputter
m_aOut.write( "<table class=\"infotable\">" + ls);
- m_aOut.write( "<TR>" + ls);
+ m_aOut.write( "<TR>" + ls);
m_aOut.write( tableHeaderCell( FIRSTGFX_TABLETITLE) );
m_aOut.write( tableHeaderCell( SECONDGFX_TABLETITLE ) );
m_aOut.write( tableHeaderCell(DIFFER_TABLETITLE ) );
@@ -283,11 +283,11 @@ public class HTMLOutputter
{
}
}
-
+
public void checkLine(StatusHelper _aStatus, boolean _bCurrentResult)
{
try
- {
+ {
m_aOut.write( "<TR>" + ls);
String sLink = getHREF(FileHelper.getBasename(_aStatus.m_sOldGfx), FileHelper.getBasename(_aStatus.m_sOldGfx));
m_aOut.write( tableDataCell(sLink) );
@@ -297,14 +297,14 @@ public class HTMLOutputter
sLink = getHREF(FileHelper.getBasename(_aStatus.m_sDiffGfx), FileHelper.getBasename(_aStatus.m_sDiffGfx));
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 ) );
-
+
if (_aStatus.m_sDiff_BM_Gfx == null)
{
sLink = "No diffs, therefore no moves";
@@ -333,7 +333,7 @@ public class HTMLOutputter
{
m_aOut.write(tableDataCell( "NO" ) );
}
-
+
m_aOut.write( "</TR>" + ls);
}
catch (java.io.IOException e)
@@ -353,7 +353,7 @@ public class HTMLOutputter
m_aOut.write( "<table class=\"infotable\">" + ls);
- m_aOut.write( "<TR>" + ls);
+ m_aOut.write( "<TR>" + ls);
m_aOut.write( tableHeaderCell( "Source to actual difference" ) );
m_aOut.write( tableHeaderCell( "Actual difference" ) );
m_aOut.write( tableHeaderCell(DIFFER_TABLETITLE ) );
@@ -368,11 +368,11 @@ public class HTMLOutputter
{
}
}
-
+
public void checkDiffDiffLine(StatusHelper _aStatus, boolean _bCurrentResult)
{
try
- {
+ {
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));
@@ -380,7 +380,7 @@ public class HTMLOutputter
String sBasename = FileHelper.getBasename(m_sFilename);
String sNew = sBasename.substring(m_sNamePrefix.length());
-
+
String sLink;
sLink = getHREF(sNew, sNew);
m_aOut.write( tableDataCell(sLink) );
@@ -407,7 +407,7 @@ public class HTMLOutputter
{
m_aOut.write(tableDataCell( "NO" ) );
}
-
+
m_aOut.write( "</TR>" + ls);
}
catch (java.io.IOException e)
diff --git a/qadevOOo/runner/convwatch/INIOutputter.java b/qadevOOo/runner/convwatch/INIOutputter.java
index faa542a05cb8..3041033f8384 100644
--- a/qadevOOo/runner/convwatch/INIOutputter.java
+++ b/qadevOOo/runner/convwatch/INIOutputter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,7 +62,7 @@ public class INIOutputter
}
a.m_sFilename = sFilename;
a.m_sNamePrefix = _sNamePrefix;
-
+
return a;
}
public String getFilename() {return m_sFilename;}
@@ -83,7 +83,7 @@ public class INIOutputter
{
}
}
-
+
public void writeSection(String _sSectionName)
{
try
@@ -95,7 +95,7 @@ public class INIOutputter
{
}
}
-
+
public void writeValue(String _sName, String _sValue)
{
try
@@ -128,7 +128,7 @@ public class INIOutputter
public void checkLine(StatusHelper _aStatus, boolean _bCurrentResult)
{
try
- {
+ {
m_aOut.write( "oldgfx=" + _aStatus.m_sOldGfx + ls);
m_aOut.write( "newgfx=" + _aStatus.m_sNewGfx + ls);
m_aOut.write( "diffgfx=" + _aStatus.m_sDiffGfx + ls);
@@ -139,7 +139,7 @@ public class INIOutputter
sPercent += " (less 5% is ok)";
}
m_aOut.write("percent=" + sPercent + ls);
-
+
if (_aStatus.m_sDiff_BM_Gfx == null)
{
m_aOut.write("BM=false" + ls);
@@ -179,7 +179,7 @@ public class INIOutputter
m_aOut.write("result=NO" + ls);
}
}
-
+
public void checkDiffDiffLine(StatusHelper _aStatus, boolean _bCurrentResult)
{
try
diff --git a/qadevOOo/runner/convwatch/ImageHelper.java b/qadevOOo/runner/convwatch/ImageHelper.java
index 6eec5dee6b63..0c288a4362c1 100644
--- a/qadevOOo/runner/convwatch/ImageHelper.java
+++ b/qadevOOo/runner/convwatch/ImageHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@ class ImageHelper
int m_w = 0;
int m_h = 0;
boolean m_bGrabbed = false;
-
+
public ImageHelper(Image _aImage)
{
m_aImage = _aImage;
@@ -75,7 +75,7 @@ class ImageHelper
// Write down the current image to a file.
// public void storeImage(String _sFilename)
- // {
+ // {
// }
public static ImageHelper createImageHelper(String _sFilename)
@@ -110,7 +110,7 @@ class ImageHelper
"Cannot construct object with current Java version " +
javaVersion + ": " + ex.getMessage());
}
-// aImage = ImageIO.read(aFile);
+// aImage = ImageIO.read(aFile);
return new ImageHelper(aImage);
}
}
diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java
index fbcaaea0b33b..b41eac2fdb12 100644
--- a/qadevOOo/runner/convwatch/IniFile.java
+++ b/qadevOOo/runner/convwatch/IniFile.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -95,7 +95,7 @@ class IniFile
}
try
{
- aReader.close();
+ aReader.close();
}
catch (java.io.IOException ie)
{
@@ -115,18 +115,18 @@ class IniFile
}
// -----------------------------------------------------------------------------
-
+
boolean isRemark(String _sLine)
{
if ( ((_sLine.length() < 2) ) ||
- ( _sLine.startsWith("#")) ||
+ ( _sLine.startsWith("#")) ||
( _sLine.startsWith(";")) )
{
return true;
}
return false;
}
-
+
String getItem(int i)
{
return (String)m_aList.get(i);
@@ -141,7 +141,7 @@ class IniFile
{
return _sName.toLowerCase();
}
-
+
// return the number where this section starts
int findSection(String _sSection)
{
@@ -167,7 +167,7 @@ class IniFile
}
return -1;
}
-
+
// return the line number, where the key is found.
int findKey(String _sSection, String _sKey)
{
@@ -179,7 +179,7 @@ class IniFile
}
return findKeyFromKnownSection(i, _sKey);
}
-
+
// i must be the index in the list, where the well known section starts
int findKeyFromKnownSection(int _nSectionIndex, String _sKey)
{
@@ -187,18 +187,18 @@ class IniFile
for (int j=_nSectionIndex + 1; j<m_aList.size();j++)
{
String sLine = getItem(j).trim();
-
+
if (isRemark(sLine))
{
continue;
}
-
+
if (sLine.startsWith("[") /* && sLine.endsWith("]") */)
{
// found end.
break;
}
-
+
int nEqual = sLine.indexOf("=");
if (nEqual >= 0)
{
@@ -211,7 +211,7 @@ class IniFile
}
return -1;
}
-
+
// i must be the index in the list, where the well known section starts
int findLastKnownKeyIndex(int _nSectionIndex, String _sKey)
{
@@ -220,7 +220,7 @@ class IniFile
for (int j=i; j<m_aList.size();j++)
{
String sLine = getItem(j).trim();
-
+
if (isRemark(sLine))
{
continue;
@@ -231,7 +231,7 @@ class IniFile
// found end.
return j;
}
-
+
int nEqual = sLine.indexOf("=");
if (nEqual >= 0)
{
@@ -244,7 +244,7 @@ class IniFile
}
return i;
}
-
+
String getValue(int _nIndex)
{
String sLine = getItem(_nIndex).trim();
@@ -263,9 +263,9 @@ class IniFile
}
/**
- @param _sSection string
+ @param _sSection string
@param _sKey string
- @return the value found in the inifile which is given by the section and key parameter
+ @return the value found in the inifile which is given by the section and key parameter
*/
public String getValue(String _sSection, String _sKey)
{
@@ -278,21 +278,21 @@ class IniFile
}
sValue = getValue(i);
-
+
return sValue;
}
/**
write back the ini file to the disk, only if there exist changes
*/
- public void store()
+ public void store()
{
if (m_bListContainUnsavedChanges == false)
{
// nothing has changed, so no need to store
return;
}
-
+
File aFile = new File(m_sFilename);
if (aFile.exists())
{
@@ -321,7 +321,7 @@ class IniFile
}
aWriter.close();
}
-
+
catch (java.io.FileNotFoundException fne)
{
GlobalLogWriter.get().println("couldn't open file for writing " + m_sFilename);
@@ -335,9 +335,9 @@ class IniFile
// DebugHelper.exception(BasicErrorCode.SbERR_INTERNAL_ERROR, ie.getMessage());
}
}
-
-
-
+
+
+
/**
insert a value
there are 3 cases
@@ -345,7 +345,7 @@ class IniFile
2. section exist but key not, search section, search key, if key is -1 get last known key position and insert new key value pair there
3. section exist and key exist, remove the old key and insert the key value pair at the same position
*/
- public void insertValue(String _sSection, String _sKey, String _sValue)
+ public void insertValue(String _sSection, String _sKey, String _sValue)
{
int i = findSection(_sSection);
if (i == -1)
@@ -427,11 +427,11 @@ class IniFile
// }
// sLocalValue = replaceEvaluatedKey(_sSection, sLocalValue);
// sLocalValue = replaceEvaluatedKey("global", sLocalValue);
- //
+ //
// return sLocalValue;
// }
-
+
/**
* some tests for this class
*/
diff --git a/qadevOOo/runner/convwatch/LISTOutputter.java b/qadevOOo/runner/convwatch/LISTOutputter.java
index 87c13ea0477a..f8baf804f73e 100644
--- a/qadevOOo/runner/convwatch/LISTOutputter.java
+++ b/qadevOOo/runner/convwatch/LISTOutputter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,7 +60,7 @@ public class LISTOutputter
return null;
}
a.m_sFilename = sFilename;
-
+
return a;
}
public String getFilename() {return m_sFilename;}
@@ -76,7 +76,7 @@ public class LISTOutputter
{
}
}
-
+
public void writeValue(String _sValue)
{
try
diff --git a/qadevOOo/runner/convwatch/MSOfficePrint.java b/qadevOOo/runner/convwatch/MSOfficePrint.java
index 5be0cfe058ce..ccc6929c0233 100644
--- a/qadevOOo/runner/convwatch/MSOfficePrint.java
+++ b/qadevOOo/runner/convwatch/MSOfficePrint.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@ class ProcessHelper
public class MSOfficePrint
{
private String m_sPrinterName; // within Windows the tools need a printer name;
-
+
public void setPrinterName(String _s) {m_sPrinterName = _s;}
// -----------------------------------------------------------------------------
@@ -162,7 +162,7 @@ public class MSOfficePrint
realStartCommand(aStartCommand);
}
}
-
+
// -----------------------------------------------------------------------------
/**
* print the given file (_sInputFile) to the file name (_sPrintFile)
@@ -243,14 +243,14 @@ public class MSOfficePrint
OfficePrint.createInfoFile(_sPrintFilename, _aGTA, "msoffice");
TimeHelper.waitInSeconds(2, "Give Microsoft Office some time to print.");
}
-
+
public void realStartCommand(ArrayList _aStartCommand) throws ConvWatchCancelException
- {
+ {
if (_aStartCommand.isEmpty())
{
throw new ConvWatchCancelException/*WrongEnvironmentException*/("Given list is empty.");
- }
-
+ }
+
try
{
// Convert the StartCommand ArrayList to a String List
@@ -276,7 +276,7 @@ public class MSOfficePrint
// TODO: use a better Exception!!!
throw new ConvWatchCancelException/*WrongEnvironmentException*/("We doesn't work within windows environment.");
}
-
+
ProcessHandler aHandler = new ProcessHandler(aList);
boolean bBackValue = aHandler.executeSynchronously();
@@ -285,10 +285,10 @@ public class MSOfficePrint
{
throw new ConvWatchCancelException/*WrongEnvironmentException*/("Given list is too short.");
}
-
+
// return aHandler.getExitCode();
}
-
+
ArrayList createWordPrintHelper() throws java.io.IOException
{
@@ -304,7 +304,7 @@ public class MSOfficePrint
{
return aList;
}
-
+
String sName = sTmpPath + fs + sPrintViaWord;
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile.toString());
@@ -406,14 +406,14 @@ public class MSOfficePrint
{
GlobalLogWriter.get().println("Search for local existance of " + aPerlScript.getAbsolutePath());
}
-
+
if (aPerlScript.exists())
{
if (FileHelper.isDebugEnabled())
{
GlobalLogWriter.get().println("OK, found it, use this instead the internal one.");
}
-
+
String sName = aPerlScript.getAbsolutePath();
// String sCommand = "perl " + sName;
// System.out.println(sCommand);
@@ -423,14 +423,14 @@ public class MSOfficePrint
}
return aList;
}
-
+
ArrayList createWordStoreHelper() throws java.io.IOException
{
// create a program in tmp file
String sTmpPath = util.utils.getUsersTempDir();
String ls = System.getProperty("line.separator");
String fs = System.getProperty("file.separator");
-
+
// ArrayList aList = new ArrayList();
String sSaveViaWord = "saveViaWord.pl";
@@ -439,13 +439,13 @@ public class MSOfficePrint
{
return aList;
}
-
+
String sName = sTmpPath + fs + sSaveViaWord;
if (FileHelper.isDebugEnabled())
{
GlobalLogWriter.get().println("No local found, create a perl script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile.toString());
@@ -505,7 +505,7 @@ public class MSOfficePrint
aList.add(sName);
return aList;
}
-
+
ArrayList createExcelPrintHelper() throws java.io.IOException
{
@@ -526,7 +526,7 @@ public class MSOfficePrint
{
GlobalLogWriter.get().println("No local found, create a perl script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile.toString());
@@ -624,10 +624,10 @@ public class MSOfficePrint
{
GlobalLogWriter.get().println("No local found, create a script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile.toString());
-
+
out.write( "eval 'exec perl -wS $0 ${1+\"$@\"}' " + ls );
out.write( " if 0; " + ls );
out.write( "use strict; " + ls );
@@ -694,7 +694,7 @@ public class MSOfficePrint
aList.add(sName);
return aList;
}
-
+
ArrayList createPowerPointPrintHelper() throws java.io.IOException
{
// create a program in tmp file
@@ -703,7 +703,7 @@ public class MSOfficePrint
String fs = System.getProperty("file.separator");
String sPrintViaPowerPoint = "printViaPowerPoint.pl";
-
+
ArrayList aList = searchLocalFile(sPrintViaPowerPoint);
if (aList.isEmpty() == false)
{
@@ -714,7 +714,7 @@ public class MSOfficePrint
{
GlobalLogWriter.get().println("No local found, create a script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile.toString());
@@ -822,7 +822,7 @@ public class MSOfficePrint
{
aLine = aLine.trim();
if ( (! (aLine.length() < 2) ) &&
- (! aLine.startsWith("#")) &&
+ (! aLine.startsWith("#")) &&
(! aLine.startsWith(";")) )
{
int nIdx = aLine.indexOf("mso-application");
@@ -857,7 +857,7 @@ public class MSOfficePrint
}
try
{
- aReader.close();
+ aReader.close();
}
catch (java.io.IOException ie)
{
diff --git a/qadevOOo/runner/convwatch/NameHelper.java b/qadevOOo/runner/convwatch/NameHelper.java
index cddf3aca75f2..2df09d09c57d 100644
--- a/qadevOOo/runner/convwatch/NameHelper.java
+++ b/qadevOOo/runner/convwatch/NameHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -85,5 +85,5 @@ public class NameHelper
GlobalLogWriter.get().println(" Suffix: " + m_sSuffix);
}
-
+
}
diff --git a/qadevOOo/runner/convwatch/OSHelper.java b/qadevOOo/runner/convwatch/OSHelper.java
index 1fbf804831d7..204290bbd266 100644
--- a/qadevOOo/runner/convwatch/OSHelper.java
+++ b/qadevOOo/runner/convwatch/OSHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,7 +26,7 @@
************************************************************************/
package convwatch;
-//
+//
// class OSHelper
// {
// public static boolean isWindows()
@@ -37,7 +37,7 @@ package convwatch;
// return true;
// }
// return false;
-// }
+// }
// // not need
// // public static boolean isUnix()
// public static boolean isSolarisIntel()
@@ -69,7 +69,7 @@ package convwatch;
// }
// return false;
// }
-//
+//
// public static boolean isUnix()
// {
// if (isLinuxIntel() ||
@@ -80,5 +80,5 @@ package convwatch;
// }
// return false;
// }
-//
+//
// }
diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java
index c9a656ac84b4..3feebdfa5336 100644
--- a/qadevOOo/runner/convwatch/OfficePrint.java
+++ b/qadevOOo/runner/convwatch/OfficePrint.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,7 +66,7 @@ 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
// */
@@ -85,7 +85,7 @@ public class OfficePrint {
// // {
// // System.out.println("Forgotten to initialise start timer.");
// // return 0;
-// // }
+// // }
// // long m_nStopTime = m_aDateCache.getTime();
// if (m_nStartTime == 0)
// {
@@ -95,8 +95,8 @@ public class OfficePrint {
// long m_nStopTime = System.currentTimeMillis();
// return m_nStopTime - m_nStartTime;
// }
-
-
+
+
private static void showProperty(PropertyValue _aValue)
{
String sName = _aValue.Name;
@@ -112,8 +112,8 @@ public class OfficePrint {
GlobalLogWriter.get().println("Property " + sName + ":= a Object which can't convert by AnyConverter()");
}
}
-
- /**
+
+ /**
* shows the FilterName and MediaType from the given XComponent
*/
static String getDocumentType( XComponent _aDoc )
@@ -153,7 +153,7 @@ public class OfficePrint {
String _sInputURL)
{
XComponent aDoc = null;
- try
+ try
{
if (_aGTA.getMultiServiceFactory() == null)
{
@@ -162,7 +162,7 @@ public class OfficePrint {
}
Object oDsk = _aGTA.getMultiServiceFactory().createInstance("com.sun.star.frame.Desktop");
XDesktop aDesktop = UnoRuntime.queryInterface(XDesktop.class, oDsk);
-
+
if (aDesktop != null)
{
GlobalLogWriter.get().println("com.sun.star.frame.Desktop created.");
@@ -170,7 +170,7 @@ public class OfficePrint {
// 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
@@ -211,9 +211,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);
@@ -250,14 +250,14 @@ public class OfficePrint {
}
return aDoc;
}
-
+
static boolean exportToPDF(XComponent _xComponent, String _sDestinationName)
{
XServiceInfo xServiceInfo =
UnoRuntime.queryInterface(
XServiceInfo.class, _xComponent
);
-
+
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>();
PropertyValue aFiltername = new PropertyValue();
aFiltername.Name = "FilterName";
@@ -265,7 +265,7 @@ public class OfficePrint {
aPropertyList.add(aFiltername);
showProperty(aFiltername);
boolean bWorked = true;
-
+
try
{
XStorable store =
@@ -280,14 +280,14 @@ public class OfficePrint {
GlobalLogWriter.get().println("Message: " + e.getMessage());
bWorked = false;
}
-
+
return bWorked;
}
-
+
static String getFilterName_forPDF(XServiceInfo xServiceInfo)
{
String filterName = "";
-
+
if (xServiceInfo.supportsService("com.sun.star.text.TextDocument"))
{
//writer
@@ -323,9 +323,9 @@ public class OfficePrint {
//math document
filterName = "math_pdf_Export";
}
-
+
return filterName;
- }
+ }
// -----------------------------------------------------------------------------
@@ -335,7 +335,7 @@ public class OfficePrint {
{
boolean bBack = false;
XComponent aDoc = loadFromURL(_aGTA, _sInputURL);
-
+
if (aDoc == null)
{
GlobalLogWriter.get().println("Can't load document.");
@@ -348,7 +348,7 @@ public class OfficePrint {
aDoc.dispose();
return bBack;
}
-
+
public static boolean storeAsPDF(GraphicalTestArguments _aGTA,
XComponent _aDoc,
String _sOutputURL)
@@ -366,7 +366,7 @@ public class OfficePrint {
}
return bBack;
}
-
+
// -----------------------------------------------------------------------------
/**
@@ -390,7 +390,7 @@ public class OfficePrint {
{
// waitInSeconds(1);
boolean bBack = false;
-
+
XComponent aDoc = loadFromURL(_aGTA, _sInputURL);
if (aDoc != null)
{
@@ -402,7 +402,7 @@ public class OfficePrint {
_aGTA.disallowStore();
}
bBack = impl_printToFileWithOOo(_aGTA, aDoc, _sOutputURL, _sPrintFileURL);
-
+
GlobalLogWriter.get().println("Close document.");
aDoc.dispose();
}
@@ -418,7 +418,7 @@ public class OfficePrint {
{
createInfoFile(_sFile, _aGTA, "");
}
-
+
public static void createInfoFile(String _sFile, GraphicalTestArguments _aGTA, String _sSpecial)
{
String sFilename;
@@ -478,7 +478,7 @@ public class OfficePrint {
// 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);
out.write("os.name=" + System.getProperty("os.name") + ls);
@@ -491,7 +491,7 @@ public class OfficePrint {
out.write("# Performance output, values are given in milli sec." + ls);
_aGTA.getPerformance().print(out);
}
-
+
out.flush();
out.close();
}
@@ -500,13 +500,13 @@ public class OfficePrint {
GlobalLogWriter.get().println("can't create Info file.");
e.printStackTrace();
}
-
+
String sExtension = FileHelper.getSuffix(_aGTA.getInputFile());
if (sExtension.startsWith("."))
{
sExtension = sExtension.substring(1);
}
-
+
DB.writeToDB(_aGTA.getInputFile(),
sNameNoSuffix,
sExtension,
@@ -515,8 +515,8 @@ public class OfficePrint {
_aGTA.getResolutionInDPI()
);
}
-
-
+
+
// -----------------------------------------------------------------------------
private static boolean impl_printToFileWithOOo(GraphicalTestArguments _aGTA,
@@ -531,8 +531,8 @@ public class OfficePrint {
GlobalLogWriter.get().println("No document is given.");
return bBack;
}
-
- try
+
+ try
{
if (_sOutputURL != null)
{
@@ -543,7 +543,7 @@ public class OfficePrint {
if (aStorable != null)
{
PropertyValue [] szEmptyArgs = new PropertyValue [0];
-
+
GlobalLogWriter.get().println(DateHelper.getDateTimeForHumanreadableLog() + " Store document.");
_aGTA.getPerformance().startTime(PerformanceContainer.Store);
aStorable.storeAsURL(_sOutputURL, szEmptyArgs);
@@ -571,12 +571,12 @@ public class OfficePrint {
bBack = false;
}
- try
+ 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)
@@ -594,9 +594,9 @@ public class OfficePrint {
// aPrinterProps[nPropIndex].Value = com.sun.star.view.PaperFormat.A4;
// aPrintable.setPrinter(aPrinterProps);
// }
-
+
// configure Office to allow to execute macos
-
+
// TODO: We need a possiblity to set the printer name also for StarOffice/OpenOffice
if (OSHelper.isWindows())
{
@@ -613,7 +613,7 @@ public class OfficePrint {
aPrintable.setPrinter(PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList));
}
}
-
+
// set property values for XPrintable.print()
// more can be found at "http://api.openoffice.org/docs/common/ref/com/sun/star/view/PrintOptions.html"
@@ -624,7 +624,7 @@ public class OfficePrint {
// 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" ) )
@@ -638,7 +638,7 @@ public class OfficePrint {
GlobalLogWriter.get().println("PrintAllSheets := true");
}
}
-
+
ArrayList<PropertyValue> aPrintProps = new ArrayList<PropertyValue>();
// GlobalLogWriter.get().println("Property FileName:=" + _sPrintFileURL);
@@ -665,20 +665,20 @@ public class OfficePrint {
}
sPages += String.valueOf(_aGTA.getOnlyPages());
}
-
+
Arg = new PropertyValue();
Arg.Name = "Pages";
Arg.Value = sPages;
aPrintProps.add(Arg);
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.");
-
+
GlobalLogWriter.get().println("Wait until document is printed.");
boolean isBusy = true;
int nPrintCount = 0;
@@ -703,7 +703,7 @@ public class OfficePrint {
}
_aGTA.getPerformance().stopTime(PerformanceContainer.Print);
GlobalLogWriter.get().println(DateHelper.getDateTimeForHumanreadableLog() + " Print document done.");
-
+
// Create a .info file near the printed '.ps' or '.prn' file.
createInfoFile(_sPrintFileURL, _aGTA);
}
@@ -723,7 +723,7 @@ public class OfficePrint {
e.printStackTrace();
bBack = false;
}
-
+
if (bFailed == true)
{
GlobalLogWriter.get().println("convwatch.OfficePrint: FAILED");
@@ -735,7 +735,7 @@ public class OfficePrint {
return bBack;
}
-
+
/**
* @param _aGTA
* @param _sAbsoluteOutputPath
@@ -752,7 +752,7 @@ public class OfficePrint {
// throw new ConvWatchCancelException("Input file: " + _sAbsoluteInputFile + " does not exist.");
return false;
}
-
+
String fs = System.getProperty("file.separator");
// String sInputFileURL = URLHelper.getFileURLFromSystemPath(_sAbsoluteInputFile);
@@ -772,7 +772,7 @@ public class OfficePrint {
}
// sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename);
// sOutputFileURL = null;
-
+
String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
// String sPrintFileURL;
@@ -784,19 +784,19 @@ public class OfficePrint {
}
return false;
}
-
+
// -----------------------------------------------------------------------------
/**
* create a reference file
- * _sAbsoluteInputPath contains the source file, if not exists, return with failure.
+ * _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
* @param _sAbsoluteOutputPath
* @param _sAbsoluteInputFile
- * @return
+ * @return
* @throws ConvWatchCancelException
*/
public static boolean buildReference(GraphicalTestArguments _aGTA,
@@ -828,7 +828,7 @@ public class OfficePrint {
}
// sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename);
sOutputFileURL = null;
-
+
String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
String sPrintFileURL;
@@ -838,14 +838,14 @@ public class OfficePrint {
GlobalLogWriter.get().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
+// 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"))
@@ -859,7 +859,7 @@ public class OfficePrint {
}
return printToFile(_aGTA, sInputFileURL, sOutputFileURL, sPrintFileURL);
}
-
+
public static boolean printToFile(GraphicalTestArguments _aGTA,
String _sInputFileURL,
String _sOutputFileURL,
@@ -877,11 +877,11 @@ public class OfficePrint {
{
return false;
}
-
-
+
+
// 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);
@@ -938,7 +938,7 @@ public class OfficePrint {
{
return;
}
-
+
if (_xMSF == null)
{
GlobalLogWriter.get().println("MultiServiceFactory not set.");
@@ -964,14 +964,14 @@ public class OfficePrint {
// -----------------------------------------------------------------------------
- public static String getInternalFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
+ public static String getInternalFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
{
if (_sFilterName.length() == 0)
{
// System.out.println("No FilterName set.");
return null;
}
-
+
if (_xMSF == null)
{
GlobalLogWriter.get().println("MultiServiceFactory not set.");
@@ -993,7 +993,7 @@ public class OfficePrint {
XNameAccess aNameAccess = UnoRuntime.queryInterface(XNameAccess.class, aObj);
if (aNameAccess != null)
{
-
+
// if (_sFilterName.toLowerCase().equals("help"))
// {
// System.out.println("Show all possible ElementNames from current version." );
@@ -1005,13 +1005,13 @@ public class OfficePrint {
// System.out.println("Must quit.");
// System.out.exit(1);
// }
-
+
if (! aNameAccess.hasByName(_sFilterName))
{
GlobalLogWriter.get().println("FilterFactory.hasByName() says there exist no '" + _sFilterName + "'" );
return null;
}
-
+
Object[] aElements = null;
String[] aExtensions;
try
@@ -1052,17 +1052,17 @@ public class OfficePrint {
}
return null;
}
-
+
// -----------------------------------------------------------------------------
- static String getServiceNameFromFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
+ static String getServiceNameFromFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
{
if (_sFilterName.length() == 0)
{
// System.out.println("No FilterName set.");
return null;
}
-
+
if (_xMSF == null)
{
GlobalLogWriter.get().println("MultiServiceFactory not set.");
@@ -1083,13 +1083,13 @@ public class OfficePrint {
{
XNameAccess aNameAccess = UnoRuntime.queryInterface(XNameAccess.class, aObj);
if (aNameAccess != null)
- {
+ {
if (! aNameAccess.hasByName(_sFilterName))
{
GlobalLogWriter.get().println("FilterFactory.hasByName() says there exist no '" + _sFilterName + "'" );
return null;
}
-
+
Object[] aElements = null;
String[] aExtensions;
try
@@ -1132,14 +1132,14 @@ public class OfficePrint {
}
// -----------------------------------------------------------------------------
- public static String getFileExtension(String _sInternalFilterName, XMultiServiceFactory _xMSF)
+ public static String getFileExtension(String _sInternalFilterName, XMultiServiceFactory _xMSF)
{
if (_sInternalFilterName.length() == 0)
{
// System.out.println("No FilterName set.");
return null;
}
-
+
if (_xMSF == null)
{
GlobalLogWriter.get().println("MultiServiceFactory not set.");
@@ -1161,20 +1161,20 @@ public class OfficePrint {
XNameAccess aNameAccess = UnoRuntime.queryInterface(XNameAccess.class, aTypeDetection);
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 + "'" );
return null;
}
-
+
Object[] aElements = null;
String[] aExtensions;
try
@@ -1223,7 +1223,7 @@ public class OfficePrint {
}
return null;
}
-
+
// -----------------------------------------------------------------------------
public static void convertDocument(String _sInputFile, String _sOutputPath, GraphicalTestArguments _aGTA) throws ConvWatchCancelException
{
@@ -1233,7 +1233,7 @@ public class OfficePrint {
GlobalLogWriter.get().println("MultiServiceFactory in GraphicalTestArgument not set.");
return;
}
-
+
String sInputURL = URLHelper.getFileURLFromSystemPath(_sInputFile);
// showType(sInputURL, xMSF);
XComponent aDoc = loadFromURL( _aGTA, sInputURL);
@@ -1242,13 +1242,13 @@ public class OfficePrint {
GlobalLogWriter.get().println("Can't load document '"+ sInputURL + "'");
return;
}
-
+
if (_sOutputPath == null)
{
GlobalLogWriter.get().println("Outputpath not set.");
return;
}
-
+
if (! _aGTA.isStoreAllowed())
{
GlobalLogWriter.get().println("It's not allowed to store, check Input/Output path.");
@@ -1268,7 +1268,7 @@ public class OfficePrint {
GlobalLogWriter.get().println("com.sun.star.frame.XStorable is null");
return;
}
-
+
String sFilterName = _aGTA.getExportFilterName();
// check how many Properties should initialize
@@ -1277,19 +1277,19 @@ public class OfficePrint {
// {
// nPropertyCount ++;
// }
-
+
// initialize PropertyArray
// PropertyValue [] aStoreProps = new PropertyValue[ nPropertyCount ];
// int nPropertyIndex = 0;
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>();
-
+
String sExtension = "";
if (sFilterName != null && sFilterName.length() > 0)
{
String sInternalFilterName = getInternalFilterName(sFilterName, xMSF);
String sServiceName = getServiceNameFromFilterName(sFilterName, xMSF);
-
+
GlobalLogWriter.get().println("Filter detection:");
// check if service name from file filter is the same as from the loaded document
boolean bServiceFailed = false;
@@ -1328,7 +1328,7 @@ public class OfficePrint {
showProperty(Arg);
GlobalLogWriter.get().println("FilterName is set to: " + sFilterName);
}
-
+
String sOutputURL = "";
try
{
@@ -1351,7 +1351,7 @@ public class OfficePrint {
{
sOutputFile += sInputFileBasename;
}
-
+
if (FileHelper.exists(sOutputFile) && _aGTA.getOverwrite() == false)
{
GlobalLogWriter.get().println("File already exist, don't overwrite. Set " + PropertyName.DOC_COMPARATOR_OVERWRITE_REFERENCE + "=true to force overwrite.");
@@ -1359,7 +1359,7 @@ public class OfficePrint {
}
sOutputURL = URLHelper.getFileURLFromSystemPath(sOutputFile);
-
+
GlobalLogWriter.get().println("Store document as '" + sOutputURL + "'");
xStorable.storeAsURL(sOutputURL, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList));
GlobalLogWriter.get().println("Document stored.");
@@ -1370,8 +1370,8 @@ public class OfficePrint {
}
// TODO: Do we need to wait?
TimeHelper.waitInSeconds(1, "unknown in OfficePrint.convertDocument()");
-
+
}
-
+
}
-
+
diff --git a/qadevOOo/runner/convwatch/PRNCompare.java b/qadevOOo/runner/convwatch/PRNCompare.java
index 1d0503299d67..5c3f3f15dd82 100644
--- a/qadevOOo/runner/convwatch/PRNCompare.java
+++ b/qadevOOo/runner/convwatch/PRNCompare.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,13 +44,13 @@ import util.utils;
// {
// 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;
-// }
+// }
// }
// -----------------------------------------------------------------------------
@@ -63,7 +63,7 @@ public class PRNCompare
{
// m_aHelper = new OSHelper();
fs = System.getProperty("file.separator");
- }
+ }
String executeSynchronously(String _sCommand)
{
@@ -73,7 +73,7 @@ public class PRNCompare
boolean bBackValue = aHandler.executeSynchronously();
String sText = aHandler.getOutputText();
-
+
GlobalLogWriter.get().println("Exitcode: " + String.valueOf(aHandler.getExitCode()));
return sText;
}
@@ -81,7 +81,7 @@ public class PRNCompare
int getMaxNumOfFileEntry(String _sDirectory, String _sBasename)
{
-// TODO: check if directory exist should be done earlier
+// TODO: check if directory exist should be done earlier
File aDirectory = new File(_sDirectory);
File[] aDirList = aDirectory.listFiles(
/*
@@ -94,7 +94,7 @@ public class PRNCompare
}
} */
);
-
+
int nMaxNumber = 0;
for(int n = 0; n<aDirList.length ; n++)
{
@@ -102,7 +102,7 @@ public class PRNCompare
if (sDirEntry.endsWith(".jpg"))
{
int nNum = nMaxNumber;
-
+
if (sDirEntry.startsWith(_sBasename))
{
// System.out.println(sDirEntry);
@@ -116,11 +116,11 @@ public class PRNCompare
catch(java.lang.NumberFormatException e)
{
}
-
+
// System.out.println(nValue);
nNum = nValue;
}
-
+
if (nNum > nMaxNumber)
{
nMaxNumber = nNum;
@@ -129,7 +129,7 @@ public class PRNCompare
}
return nMaxNumber;
}
-
+
String m_sInputPath;
String m_sReferencePath;
String m_sOutputPath;
@@ -143,9 +143,9 @@ public class PRNCompare
String m_sDocumentType;
public void setInputPath(String _sInputPath) { m_sInputPath = _sInputPath; }
-
+
public void setReferencePath(String _sReferencePath) { m_sReferencePath = _sReferencePath; }
-
+
public void setOutputPath(String _sOutPath) { m_sOutputPath = _sOutPath; }
public void setDocFile(String _sDocFile) { m_sDocFile = _sDocFile;}
@@ -170,15 +170,15 @@ public class PRNCompare
{
m_sDocumentType = _sTypeName;
}
-
+
// -----------------------------------------------------------------------------
-
+
public StatusHelper[] compare()
{
createJPEGFromPostscript(m_sOutputPath, m_sReferencePath, m_sReferenceFile, getResolutionInDPI());
-// TODO: Assume, that Postscript is already in the OutputPath, this may change.
+// TODO: Assume, that Postscript is already in the OutputPath, this may change.
createJPEGFromPostscript(m_sOutputPath, m_sOutputPath, m_sPostScriptFile, getResolutionInDPI());
- StatusHelper[] aList = createDiffs(m_sOutputPath,
+ StatusHelper[] aList = createDiffs(m_sOutputPath,
m_sOutputPath, m_sReferenceFile,
m_sOutputPath, m_sPostScriptFile,
getMaxPages(), m_tUseBorderMove);
@@ -191,9 +191,9 @@ public class PRNCompare
public StatusHelper[] compare_new()
{
String[] aRefList = createJPEGFromPostscript(m_sOutputPath, m_sReferencePath, m_sReferenceFile, getResolutionInDPI());
-// TODO: Assume, that Postscript is already in the OutputPath, this may change.
+// TODO: Assume, that Postscript is already in the OutputPath, this may change.
String[] aPSList = createJPEGFromPostscript(m_sOutputPath, m_sOutputPath, m_sPostScriptFile, getResolutionInDPI());
- StatusHelper[] aList = createDiffs(m_sOutputPath,
+ StatusHelper[] aList = createDiffs(m_sOutputPath,
aRefList,
aPSList,
getMaxPages(), m_tUseBorderMove);
@@ -204,15 +204,15 @@ public class PRNCompare
static String getJPEGName(String _sOutputPath, String _sBasename, String _sGS_PageOutput)
{
String fs = System.getProperty("file.separator");
-
+
String sJPEGName = _sOutputPath + fs + _sBasename + _sGS_PageOutput + ".jpg";
return sJPEGName;
}
-
+
/**
* Create via ghostscript (gs) from the reference file for every page a JPEG file
*
- * MUST set:
+ * MUST set:
* m_sOutputPath, m_sReferenceFile, m_sReferencePath
*
* return exit code from gs command
@@ -224,7 +224,7 @@ public class PRNCompare
// {
// sGS_PageOutput = "%%d";
// }
-
+
FileHelper.makeDirectories("", _sOutputPath);
// create a jpeg from original prn
@@ -238,9 +238,9 @@ public class PRNCompare
{
sGS = "gswin32c.exe";
}
-
+
sCommand = sGS + " -dNOPROMPT -dBATCH -sDEVICE=jpeg -r" + String.valueOf(_nResolutionInDPI) + " -dNOPAUSE -sOutputFile=" + StringHelper.doubleQuoteIfNeed(sJPGFilename) + " " + StringHelper.doubleQuoteIfNeed(sOriginalFile);
- String[] sCommandArray =
+ String[] sCommandArray =
{
sGS,
"-dNOPROMPT",
@@ -259,11 +259,11 @@ public class PRNCompare
// System.out.println("FAILED");
// }
// System.out.println("done");
-
+
ProcessHandler aHandler = new ProcessHandler(sCommandArray);
boolean bBackValue = aHandler.executeSynchronously();
- // TODO: return a real filename, due to the fact we don't know how much files are created, maybe better to return a list
+ // TODO: return a real filename, due to the fact we don't know how much files are created, maybe better to return a list
ArrayList m_aFileList = new ArrayList();
for (int i=1;i<9999;i++)
@@ -282,7 +282,7 @@ public class PRNCompare
aList = (String[])m_aFileList.toArray(aList);
return aList; // sNewJPEGFilename;
}
-
+
/**
* Create Difference Files from the JPEGs
* parameter, how much difference files should create
@@ -297,10 +297,10 @@ public class PRNCompare
{
_nMaxDiffs = 1;
}
-
+
String sS1Basename = FileHelper.getBasename(_sSourceFile1);
String sS2Basename = FileHelper.getBasename(_sSourceFile2);
-
+
// count, from which file (jpegs) exist more, take the less one
// more are not compareable
int nS1_Files = getMaxNumOfFileEntry(_sSourcePath1, sS1Basename);
@@ -314,8 +314,8 @@ public class PRNCompare
nMin = Math.min(nMin, _nMaxDiffs);
StatusHelper[] aList = new StatusHelper[nMin];
-
-// TODO: if both document do not have same page count, produce an error
+
+// 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;
@@ -325,10 +325,10 @@ public class PRNCompare
String sNewGfx = getJPEGName(_sSourcePath2, sS2Basename, StringHelper.createValueString(i, 4));
String sDiffGfx_ = getJPEGName(_sOutputPath, sS1Basename + ".diff", StringHelper.createValueString(i, 4));
-
+
String sDiffGfx = compareJPEGs(sOldGfx, sNewGfx, sDiffGfx_);
StatusHelper aStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx);
-
+
// if (FileHelper.exists(sDiffGfx))
if (sDiffGfx.length() > 0)
{
@@ -340,7 +340,7 @@ public class PRNCompare
else
{
try
- {
+ {
int nPercent = estimateGfx(sOldGfx, sNewGfx, sDiffGfx);
aStatus.nDiffStatus = StatusHelper.DIFF_DIFFERENCES_FOUND;
aStatus.nPercent = nPercent;
@@ -348,15 +348,15 @@ public class PRNCompare
// 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 &&
+ if (nPercent > 75 &&
((_tUseBorderMove == TriState.TRUE ) ||
((_tUseBorderMove == TriState.UNSET) &&
m_sDocumentType.indexOf("MS PowerPoint") > 0)))
{
setBorderMove(TriState.TRUE);
-
+
String sOld_BM_Gfx = getJPEGName(_sSourcePath1, sS1Basename + ".BM", StringHelper.createValueString(i, 4));
String sNew_BM_Gfx = getJPEGName(_sSourcePath2, sS2Basename + ".BM", StringHelper.createValueString(i, 4));
String sDiff_BM_Gfx_ = getJPEGName(_sOutputPath, sS1Basename + ".diff.BM", StringHelper.createValueString(i, 4));
@@ -366,9 +366,9 @@ public class PRNCompare
BorderRemover a = new BorderRemover();
a.createNewImageWithoutBorder(sOldGfx, sOld_BM_Gfx);
a.createNewImageWithoutBorder(sNewGfx, sNew_BM_Gfx);
-
+
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)
{
@@ -394,7 +394,7 @@ public class PRNCompare
GlobalLogWriter.get().println("Exception caught. At border remove: " + e.getMessage());
}
}
-
+
}
catch (java.io.IOException e)
@@ -402,9 +402,9 @@ public class PRNCompare
GlobalLogWriter.get().println(e.getMessage());
}
}
-
+
// checkDiff(sOldGfx, sNewGfx, sDiffGfx);
- // if (i >= _nMaxDiffs)
+ // if (i >= _nMaxDiffs)
// {
// break;
// }
@@ -413,7 +413,7 @@ public class PRNCompare
}
return aList;
}
-
+
public StatusHelper[] createDiffs(String _sOutputPath, String[] _aRefList, String[] _aPSList, int _nMaxDiffs, TriState _tUseBorderMove)
{
@@ -421,7 +421,7 @@ public class PRNCompare
{
_nMaxDiffs = 1;
}
-
+
// count, from which file (jpegs) exist more, take the less one
// more are not compareable
@@ -430,8 +430,8 @@ public class PRNCompare
nMin = Math.min(nMin, _nMaxDiffs);
StatusHelper[] aList = new StatusHelper[nMin];
-
-// TODO: if both document do not have same page count, produce an error
+
+// 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;
@@ -444,7 +444,7 @@ public class PRNCompare
String sDiffGfx = compareJPEGs(sOldGfx, sNewGfx );
StatusHelper aStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx);
-
+
// if (FileHelper.exists(sDiffGfx))
if (sDiffGfx.length() > 0)
{
@@ -456,28 +456,28 @@ public class PRNCompare
else
{
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;
-
- if (nPercent > 75 &&
+
+ if (nPercent > 75 &&
((_tUseBorderMove == TriState.TRUE ) ||
((_tUseBorderMove == TriState.UNSET) &&
m_sDocumentType.indexOf("MS PowerPoint") > 0)))
{
_tUseBorderMove = TriState.TRUE;
-// TODO: problem is here, that we have to create some new names.
+// TODO: problem is here, that we have to create some new names.
String sBasename1 = FileHelper.getBasename(sOldGfx);
String sNameNoSuffix1 = FileHelper.getNameNoSuffix(sBasename1);
String sBasename2 = FileHelper.getBasename(sNewGfx);
String sNameNoSuffix2 = FileHelper.getNameNoSuffix(sBasename2);
-
+
String sTmpDir = util.utils.getUsersTempDir();
String fs = System.getProperty("file.separator");
@@ -488,11 +488,11 @@ public class PRNCompare
BorderRemover a = new BorderRemover();
a.createNewImageWithoutBorder(sOldGfx, sOld_BM_Gfx);
a.createNewImageWithoutBorder(sNewGfx, sNew_BM_Gfx);
-
+
String sDiff_BM_Gfx = compareJPEGs( sOld_BM_Gfx, sNew_BM_Gfx );
-
+
aStatus.setFilesForBorderMove(sOld_BM_Gfx, sNew_BM_Gfx, sDiff_BM_Gfx);
-
+
// if (FileHelper.exists(sDiff_BM_Gfx))
if (sDiff_BM_Gfx.length() > 0)
{
@@ -524,9 +524,9 @@ public class PRNCompare
GlobalLogWriter.get().println(e.getMessage());
}
}
-
+
// checkDiff(sOldGfx, sNewGfx, sDiffGfx);
- // if (i >= _nMaxDiffs)
+ // if (i >= _nMaxDiffs)
// {
// break;
// }
@@ -535,7 +535,7 @@ public class PRNCompare
}
return aList;
}
-
+
public static String compareJPEGs(String _sOldGfx, String _sNewGfx)
{
String sBasename1 = FileHelper.getBasename(_sOldGfx);
@@ -547,10 +547,10 @@ public class PRNCompare
String fs = System.getProperty("file.separator");
String sDiffName = sTmpDir + fs + sNameNoSuffix1 + "-" + sNameNoSuffix2 + "-diff.jpg";
-
+
return compareJPEGs(_sOldGfx, _sNewGfx, sDiffName);
}
-
+
public static String compareJPEGs(String _sOldGfx, String _sNewGfx, String _sDiffGfx)
{
String sComposite = "composite";
@@ -558,13 +558,13 @@ public class PRNCompare
{
sComposite = "composite.exe";
}
-
- // String sCommand = sComposite + " -compose difference " +
+
+ // String sCommand = sComposite + " -compose difference " +
// StringHelper.doubleQuoteIfNeed(_sOldGfx) + " " +
// StringHelper.doubleQuoteIfNeed(_sNewGfx) + " " +
// StringHelper.doubleQuoteIfNeed(_sDiffGfx);
- String[] sCommandArray =
+ String[] sCommandArray =
{
sComposite,
"-compose",
@@ -573,9 +573,9 @@ public class PRNCompare
_sNewGfx,
_sDiffGfx
};
-
+
ProcessHandler aHandler = new ProcessHandler(sCommandArray);
- boolean bBackValue = aHandler.executeSynchronously();
+ boolean bBackValue = aHandler.executeSynchronously();
String sBack = aHandler.getOutputText();
GlobalLogWriter.get().println("'" + sBack + "'");
@@ -587,7 +587,7 @@ public class PRNCompare
}
return "";
}
-
+
/**
* wrapper for ImageMagick identify,
* function checks how many different colors a picture contains.
@@ -602,13 +602,13 @@ public class PRNCompare
// {
// sIM_Format = "%%k";
// }
-
+
String sIdentify = "identify";
if (OSHelper.isWindows())
{
sIdentify = "identify.exe";
}
-
+
// String sCommand = sIdentify + " " + sIM_Format + " " + StringHelper.doubleQuoteIfNeed(_sDiffGfx);
String[] sCommandArray =
@@ -631,7 +631,7 @@ public class PRNCompare
{
sBack = sBack.substring(0, nIdx);
}
-
+
nResult = Integer.valueOf(sBack).intValue();
}
catch(java.lang.NumberFormatException e)
@@ -641,22 +641,22 @@ public class PRNCompare
}
return nResult;
}
-
+
/*
* Check 2 different differ files
* return 1 if there is no difference between both diff files.
*/
-// TODO: Maybe a StatusHelper is a better return value
+// TODO: Maybe a StatusHelper is a better return value
public StatusHelper checkDiffDiff(String _sOutputPath, String _sSourcePath1, String _sSourceFile1, String _sSourcePath2, String _sSourceFile2)
{
String sNewGfx = _sSourcePath1 + fs + _sSourceFile1;
String sOldGfx = _sSourcePath2 + fs + _sSourceFile2;
-
+
int nNumber = 1;
String sDiffGfx;
sDiffGfx = getJPEGName(_sOutputPath, _sSourceFile1 + ".diff", StringHelper.createValueString(nNumber, 4));
-
+
StatusHelper aCurrentStatus = new StatusHelper(sOldGfx, sNewGfx, sDiffGfx);
// String sComposite = "composite";
@@ -664,20 +664,20 @@ public class PRNCompare
// {
// sComposite = "composite.exe";
// }
- //
- // String sCommand = sComposite +" -compose difference " +
+ //
+ // 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))
{
int nResult = identify(sDiffGfx);
@@ -709,7 +709,7 @@ public class PRNCompare
return aCurrentStatus;
}
-
+
// -----------------------------------------------------------------------------
/**
* count how much pixel differ and between Old or New and the Difference graphics
@@ -727,9 +727,9 @@ public class PRNCompare
* text like outlined or the text is little bit move left, right up or down.
*
* >100% Yes it's possible that there is a difference more then 100%, maybe a font problem
- * between old and new graphics. The font of the new graphics is little bit bigger,
+ * between old and new graphics. The font of the new graphics is little bit bigger,
* so the pixel count between old graphics and new graphics is twice the more.
- *
+ *
*/
public int estimateGfx(String _sOldGfx, String _sNewGfx, String _sDiffGfx)
throws java.io.IOException
@@ -738,9 +738,9 @@ public class PRNCompare
int nNotWhiteCount_OldGraphic = PixelCounter.countNotWhitePixelsFromImage(_sOldGfx);
int nNotWhiteCount_NewGraphic = PixelCounter.countNotWhitePixelsFromImage(_sNewGfx);
int nNotBlackCount_DiffGraphic = PixelCounter.countNotBlackPixelsFromImage(_sDiffGfx);
-
+
int nMinNotWhiteCount = Math.min(nNotWhiteCount_NewGraphic, nNotWhiteCount_OldGraphic);
-
+
// check if not zero
if (nMinNotWhiteCount == 0)
{
@@ -750,15 +750,15 @@ public class PRNCompare
nMinNotWhiteCount = 1;
}
}
-
+
int nPercent = Math.abs(nNotBlackCount_DiffGraphic * 100 / nMinNotWhiteCount);
GlobalLogWriter.get().println( "Graphics check, pixel based:" + String.valueOf(nPercent) + "% pixel differ ");
return nPercent;
}
+
-
-
-/*
+
+/*
* Some selftest functionallity
*/
// public static void main(String[] args)
@@ -781,10 +781,10 @@ public class PRNCompare
// 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",
@@ -799,7 +799,7 @@ public class PRNCompare
// {
// 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 d0c1e0fb5ed1..002813235034 100644
--- a/qadevOOo/runner/convwatch/PerformanceContainer.java
+++ b/qadevOOo/runner/convwatch/PerformanceContainer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@ public class PerformanceContainer /* extends *//* implements */ {
{
m_nStartTime = _nStartTime;
}
-
+
/*
return the time, which is done until last startTime()
*/
@@ -61,7 +61,7 @@ public class PerformanceContainer /* extends *//* implements */ {
long nMeanTime = System.currentTimeMillis();
return nMeanTime - _nCurrentTimer;
}
-
+
/*
public long stopTimer()
{
@@ -80,10 +80,10 @@ public class PerformanceContainer /* extends *//* implements */ {
final static int Print = 2;
final static int OfficeStart = 3;
final static int StoreAsPDF = 4;
-
+
private long m_nTime[];
private String m_sMSOfficeVersion;
-
+
public PerformanceContainer()
{
m_nTime = new long[5];
@@ -93,7 +93,7 @@ public class PerformanceContainer /* extends *//* implements */ {
m_nTime[i] = 0;
}
}
-
+
public void setTime(int _nIndex, long _nValue)
{
m_nTime[_nIndex] = _nValue;
@@ -102,12 +102,12 @@ public class PerformanceContainer /* extends *//* implements */ {
{
return m_nTime[_nIndex];
}
-
+
public void startTime(int _nIndex)
{
m_nTime[_nIndex] = getStartTime();
}
-
+
public void stopTime(int _nIndex)
{
m_nTime[_nIndex] = meanTime(m_nTime[_nIndex]);
@@ -141,12 +141,12 @@ public class PerformanceContainer /* extends *//* implements */ {
}
return nValue;
}
-
+
public static long secondsToMilliSeconds(double _nSeconds)
{
return (long)(_nSeconds * 1000.0);
}
-
+
/*
Helper function, which read some values from a given file
@@ -192,7 +192,7 @@ public class PerformanceContainer /* extends *//* implements */ {
{
String sTime = sLine.substring(14);
m_nTime[Print] = secondsToMilliSeconds(stringToDouble(sTime));
- }
+ }
else if (sLine.startsWith("WordVersion="))
{
String sMSOfficeVersion = sLine.substring(12);
@@ -223,7 +223,7 @@ public class PerformanceContainer /* extends *//* implements */ {
}
try
{
- aRandomAccessFile.close();
+ aRandomAccessFile.close();
}
catch (java.io.IOException ie)
{
diff --git a/qadevOOo/runner/convwatch/PixelCounter.java b/qadevOOo/runner/convwatch/PixelCounter.java
index 116b07e48d8e..9df41f540083 100644
--- a/qadevOOo/runner/convwatch/PixelCounter.java
+++ b/qadevOOo/runner/convwatch/PixelCounter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,14 @@ class CountNotWhite extends CountPixel
{
// System.out.println("CountWhite()");
}
-
+
public void count(int pixel)
{
int alpha = (pixel >> 24) & 0xff;
int red = (pixel >> 16) & 0xff;
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)
{
@@ -69,14 +69,14 @@ class CountNotBlack extends CountPixel
{
// System.out.println("CountBlack()");
}
-
+
public void count(int pixel)
{
int alpha = (pixel >> 24) & 0xff;
int red = (pixel >> 16) & 0xff;
int green = (pixel >> 8) & 0xff;
int blue = (pixel ) & 0xff;
-
+
if (red == 0x00 && green == 0x00 && blue == 0x00)
{
return;
@@ -97,7 +97,7 @@ class graphics_stuff
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
+// 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
@@ -105,7 +105,7 @@ class graphics_stuff
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;
@@ -133,7 +133,7 @@ class graphics_stuff
countPixel(_aImage, 0, 0, w, h, aCountNotWhite);
return aCountNotWhite.getCount();
}
-
+
public static int countNotBlackPixel(ImageHelper _aImage)
{
int w = _aImage.getWidth();
@@ -150,8 +150,8 @@ class graphics_stuff
public class PixelCounter {
// private Image m_aImage;
ImageHelper m_aImage;
-
-
+
+
public int countNotWhitePixel(String _sFile)
throws java.io.IOException
{
@@ -167,14 +167,14 @@ public class PixelCounter {
int nw = graphics_stuff.countNotBlackPixel(m_aImage);
return nw;
}
-
+
public static int countNotWhitePixelsFromImage(String _sFile)
throws java.io.IOException
{
PixelCounter a = new PixelCounter();
return a.countNotWhitePixel(_sFile);
}
-
+
public static int countNotBlackPixelsFromImage(String _sFile)
throws java.io.IOException
{
@@ -202,5 +202,5 @@ public class PixelCounter {
// }
}
-
+
diff --git a/qadevOOo/runner/convwatch/PropertyName.java b/qadevOOo/runner/convwatch/PropertyName.java
index 00130faf50e3..36e06b9670a9 100644
--- a/qadevOOo/runner/convwatch/PropertyName.java
+++ b/qadevOOo/runner/convwatch/PropertyName.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/convwatch/ReferenceBuilder.java b/qadevOOo/runner/convwatch/ReferenceBuilder.java
index 076d5f5804f4..11c5377f181b 100644
--- a/qadevOOo/runner/convwatch/ReferenceBuilder.java
+++ b/qadevOOo/runner/convwatch/ReferenceBuilder.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -109,7 +109,7 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
log.println("found " + PropertyName.DOC_COMPARATOR_INPUT_PATH + " " + sINPATH);
m_sInputPath = sINPATH;
}
-
+
// REFERENCE_PATH ----------
String sREF = (String)param.get( PropertyName.DOC_COMPARATOR_REFERENCE_PATH );
if (sREF == null || sREF.length() == 0)
@@ -122,21 +122,21 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
log.println("found " + PropertyName.DOC_COMPARATOR_REFERENCE_PATH + " " + sREF);
m_sReferencePath = sREF;
}
-
+
if (bQuit == true)
{
// log.println("must quit.");
assure("Must quit, Parameter problems.", false);
}
-
+
if (m_sInputPath.startsWith("file:") ||
m_sReferencePath.startsWith("file:"))
{
assure("We can't handle file: URL right, use system path instead.", false);
}
-
+
}
-
+
/**
* Function returns a List of software which must accessable as an external executable
*/
@@ -148,7 +148,7 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
}
// the test ======================================================================
- public void buildreference()
+ public void buildreference()
{
GlobalLogWriter.set(log);
String sDBConnection = (String)param.get( PropertyName.DB_CONNECTION_STRING );
@@ -168,7 +168,7 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
{
return;
}
-
+
initMember();
DB.init(aGTA.getDBInfoString() + "," + sDBConnection);
File aInputPath = new File(m_sInputPath);
@@ -182,18 +182,18 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
Object[] aList = DirectoryHelper.traverse(m_sInputPath, aFileFilter, aGTA.includeSubDirectories());
// fill into DB
- // DB.filesRemove(aGTA.getDBInfoString());
+ // 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++)
{
String sEntry = (String)aList[i];
-
+
String sNewReferencePath = m_sReferencePath + fs + FileHelper.removeFirstDirectorysAndBasenameFrom(sEntry, m_sInputPath);
log.println("- next file is: ------------------------------");
log.println(sEntry);
@@ -247,7 +247,7 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
aGTA = getGraphicalTestArguments();
aGTA.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
// internal counter increase and at a given point (300 seconds) the office is killed.
@@ -278,7 +278,7 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
assure(e.getMessage(), false, true);
DB.source_failed(e.getMessage());
}
-
+
// Office shutdown
if (aProvider != null)
{
diff --git a/qadevOOo/runner/convwatch/ReportDesignerTest.java b/qadevOOo/runner/convwatch/ReportDesignerTest.java
index 703a2b2f3073..fe144ef3330c 100755
--- a/qadevOOo/runner/convwatch/ReportDesignerTest.java
+++ b/qadevOOo/runner/convwatch/ReportDesignerTest.java
@@ -2,7 +2,7 @@
************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,15 +63,15 @@ import helper.OfficeWatcher;
// 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;
@@ -87,7 +87,7 @@ class PropertySetHelper
{
m_xPropertySet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, _aObj);
}
-
+
/**
get a property and don't convert it
@param _sName the string name of the property
@@ -154,14 +154,14 @@ class PropertyHelper
}
public class ReportDesignerTest extends ComplexTestCase {
-
+
String mTestDocumentPath;
-
+
/**
* This method returns a list of Strings, each string must be a function name in this class.
* @return
*/
- public String[] getTestMethodNames()
+ public String[] getTestMethodNames()
{
return new String[] {"ReportDesignTest"}; // MAIN
}
@@ -182,7 +182,7 @@ public class ReportDesignerTest extends ComplexTestCase {
sOfficePath = _sOfficePathWithTrash.substring(0, nIndex + 7);
}
}
-
+
// if (sOfficePath.startsWith("\"") ||
// sOfficePath.startsWith("'"))
// {
@@ -198,20 +198,20 @@ public class ReportDesignerTest extends ComplexTestCase {
System.exit(0);
}
}
-
-
+
+
private static XDesktop m_xDesktop = null;
public static XDesktop getXDesktop()
{
- if (m_xDesktop == null)
+ if (m_xDesktop == null)
{
- try
+ try
{
XInterface xInterface = (XInterface) m_xXMultiServiceFactory.createInstance( "com.sun.star.frame.Desktop" );
m_xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, xInterface);
}
- catch (com.sun.star.uno.Exception e)
+ catch (com.sun.star.uno.Exception e)
{
log.println("ERROR: uno.Exception caught");
log.println("Message: " + e.getMessage());
@@ -219,7 +219,7 @@ public class ReportDesignerTest extends ComplexTestCase {
}
return m_xDesktop;
}
-
+
private void showElements(XNameAccess _xNameAccess)
{
if (_xNameAccess != null)
@@ -235,8 +235,8 @@ public class ReportDesignerTest extends ComplexTestCase {
System.out.println("Warning: Given object is null.");
}
}
-
-
+
+
private OfficeProvider m_aProvider = null;
private static XMultiServiceFactory m_xXMultiServiceFactory = null;
private void startOffice()
@@ -261,7 +261,7 @@ public class ReportDesignerTest extends ComplexTestCase {
}
TimeHelper.waitInSeconds(2, "Give close Office some time.");
}
-
+
private String m_sMailAddress = null;
private String m_sParentDistinct = null;
@@ -279,7 +279,7 @@ public class ReportDesignerTest extends ComplexTestCase {
/**
* This is the main test Function of current ReportDesignerTest
*/
- public void ReportDesignTest()
+ public void ReportDesignTest()
{
convwatch.GlobalLogWriter.set(log);
@@ -289,15 +289,15 @@ public class ReportDesignerTest extends ComplexTestCase {
try
{
-
+
// -------------------- preconditions, try to find an office --------------------
-
+
String sAppExecutionCommand = (String) param.get("AppExecutionCommand");
log.println("sAppExecutionCommand='" + sAppExecutionCommand + "'");
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";
@@ -319,24 +319,24 @@ public class ReportDesignerTest extends ComplexTestCase {
System.out.println("Error, Sourceversion is null.");
System.exit(1);
}
-
+
sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser);
log.println("sAppExecutionCommand='" + sAppExecutionCommand + "'");
-
+
// an other way to replace strings
// sAppExecutionCommand = utils.replaceAll13(sAppExecutionCommand, "${USERNAME}", sUser);
-
+
checkIfOfficeExists(sAppExecutionCommand);
param.put("AppExecutionCommand", new String(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);
@@ -360,57 +360,57 @@ public class ReportDesignerTest extends ComplexTestCase {
stopOffice();
throw new AssureException(e.getMessage());
}
-
+
// ------------------------------ Office shutdown ------------------------------
stopOffice();
}
-
+
// -----------------------------------------------------------------------------
private void startTestForFile(String _sDocument /*, int _nType*/)
{
File aFile = new File(_sDocument);
assure("Test File '" + _sDocument + "' doesn't exist.", aFile.exists());
-
+
String sFileURL = URLHelper.getFileURLFromSystemPath(_sDocument);
log.println("File URL: " + sFileURL);
-
+
XComponent xDocComponent = loadComponent(sFileURL, getXDesktop(), null);
log.println("Load done");
-// context = createUnoService("com.sun.star.sdb.DatabaseContext")
+// 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()
+//
+// 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
{
XInterface x = (XInterface)m_xXMultiServiceFactory.createInstance("com.sun.star.sdb.DatabaseContext");
assure("can't create instance of com.sun.star.sdb.DatabaseContext", x != null);
log.println("createInstance com.sun.star.sdb.DatabaseContext done");
-
+
XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, x);
showElements(xNameAccess);
Object aObj = xNameAccess.getByName(sFileURL);
// log.println("1");
-
+
// PropertySetHelper aHelper = new PropertySetHelper(aObj);
XDocumentDataSource xDataSource = (XDocumentDataSource)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 = (XModel)UnoRuntime.queryInterface(XModel.class, xOfficeDBDoc);
Object aController = xDBSource.getCurrentController();
assure("Controller of xOfficeDatabaseDocument is empty!", aController != null);
// log.println("3");
-
+
XDatabaseDocumentUI aDBDocUI = (XDatabaseDocumentUI)UnoRuntime.queryInterface(XDatabaseDocumentUI.class, aController);
aDBDocUI.connect();
// if (aDBDocUI.isConnected())
@@ -422,28 +422,28 @@ public class ReportDesignerTest extends ComplexTestCase {
// System.out.println("false");
// }
// log.println("4");
-
+
// aHelper = new PropertySetHelper(aController);
-
+
// Object aActiveConnectionObj = aHelper.getPropertyValueAsObject("ActiveConnection");
- Object aActiveConnectionObj = aDBDocUI.getActiveConnection();
+ Object aActiveConnectionObj = aDBDocUI.getActiveConnection();
assure("ActiveConnection is empty", aActiveConnectionObj != null);
// log.println("5");
-
+
XReportDocumentsSupplier xSupplier = (XReportDocumentsSupplier)UnoRuntime.queryInterface(XReportDocumentsSupplier.class, xOfficeDBDoc);
xNameAccess = xSupplier.getReportDocuments();
assure("xOfficeDatabaseDocument returns no Report Document", xNameAccess != null);
// log.println("5");
-
+
showElements(xNameAccess);
-
+
ArrayList aPropertyList = new ArrayList();
-
+
PropertyValue aActiveConnection = new PropertyValue();
aActiveConnection.Name = "ActiveConnection";
aActiveConnection.Value = aActiveConnectionObj;
aPropertyList.add(aActiveConnection);
-
+
loadAndStoreReports(xNameAccess, aPropertyList /*, _nType*/ );
createDBEntry(/*_nType*/);
}
@@ -452,12 +452,12 @@ public class ReportDesignerTest extends ComplexTestCase {
log.println("ERROR: Exception caught");
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);
}
@@ -467,7 +467,7 @@ public class ReportDesignerTest extends ComplexTestCase {
return "AutogenReportDesignTest";
// return getFileFormat(_nType);
}
-
+
// -----------------------------------------------------------------------------
private void createDBEntry(/*int _nType*/)
{
@@ -503,7 +503,7 @@ public class ReportDesignerTest extends ComplexTestCase {
// DB.test();
// System.exit(1);
}
-
+
private void loadAndStoreReports(XNameAccess _xNameAccess, ArrayList _aPropertyList /*, int _nType*/ )
{
if (_xNameAccess != null)
@@ -540,7 +540,7 @@ public class ReportDesignerTest extends ComplexTestCase {
}
return sExtension;
}
-
+
// switch(_nType)
// {
// case WRITER:
@@ -570,7 +570,7 @@ public class ReportDesignerTest extends ComplexTestCase {
// }
// return sFileType;
// }
-
+
private String m_sOutputPath = null;
private String getOutputPath(/*int _nType*/)
@@ -588,17 +588,17 @@ public class ReportDesignerTest extends ComplexTestCase {
// 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;
}
return m_sOutputPath;
}
-
+
/*
store given _xComponent under the given Name in DOC_COMPARATOR_INPUTPATH
*/
@@ -615,7 +615,7 @@ public class ReportDesignerTest extends ComplexTestCase {
sOutputPath += _sName;
sOutputPath += getFormatExtension(_xComponent /*_nType*/);
-
+
String sOutputURL = URLHelper.getFileURLFromSystemPath(sOutputPath);
ArrayList aPropertyList = new ArrayList(); // set some properties for storeAsURL
@@ -647,7 +647,7 @@ public class ReportDesignerTest extends ComplexTestCase {
}
}
}
-
+
private XComponent loadComponent(String _sName, Object _xComponent, ArrayList _aPropertyList)
{
XComponent xDocComponent = null;
@@ -690,5 +690,5 @@ public class ReportDesignerTest extends ComplexTestCase {
log.println("Message: " + e.getMessage());
}
}
-
+
}
diff --git a/qadevOOo/runner/convwatch/SimpleFileSemaphore.java b/qadevOOo/runner/convwatch/SimpleFileSemaphore.java
index 9d608bdb332b..cbcf2468af2b 100644
--- a/qadevOOo/runner/convwatch/SimpleFileSemaphore.java
+++ b/qadevOOo/runner/convwatch/SimpleFileSemaphore.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,7 +36,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
String m_sInternSemaphoreFile;
File m_aInternSemaphoreFile;
GlobalLogWriter m_aLog;
-
+
public static void sleep( int _nSeconds)
{
// wait a second here
@@ -48,7 +48,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
{
}
}
-
+
public SimpleFileSemaphore() throws IllegalArgumentException
{
String sInternFileName;
@@ -65,7 +65,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
m_sInternSemaphoreFile = null;
throw new IllegalArgumentException("Unknown System, can't initialise SimpleFileSemaphore");
}
-
+
m_sInternSemaphoreFile = sInternFileName;
m_aInternSemaphoreFile = new File(sInternFileName);
}
@@ -80,7 +80,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
{
int nCount = 0;
int nCheckLoop = 1;
-
+
while ( nCheckLoop == 1)
{
// check if resource is available, if not, wait.
@@ -104,7 +104,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
}
}
}
-
+
// block resource by ourself
try
{
@@ -112,7 +112,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
aWriter.writeByte((int)1);
aWriter.close();
}
-
+
catch (java.io.FileNotFoundException fne)
{
m_aLog.get().println( "caught: FileNotFoundException");
@@ -156,7 +156,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
System.out.println("FAILED");
}
}
-
+
private static void testSemaphoreFile(SimpleFileSemaphore a, boolean _bShouldFileExists)
{
System.out.println("Check if semaphore file exists.");
@@ -171,8 +171,8 @@ public class SimpleFileSemaphore /* extends *//* implements */
assure(_bShouldFileExists == SEMAPHORE_SHOULD_NOT_EXIST, "Semaphore should not exist!");
}
}
-
- public static void main( String[] argv )
+
+ public static void main( String[] argv )
{
SimpleFileSemaphore a = new SimpleFileSemaphore();
diff --git a/qadevOOo/runner/convwatch/StatusHelper.java b/qadevOOo/runner/convwatch/StatusHelper.java
index d37fa4a79af4..797c683c6a51 100644
--- a/qadevOOo/runner/convwatch/StatusHelper.java
+++ b/qadevOOo/runner/convwatch/StatusHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,7 +34,7 @@ public class StatusHelper
final static public int DIFF_DIFFERENCES_FOUND = 3;
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;
@@ -61,9 +61,9 @@ public class StatusHelper
m_sOld_BM_Gfx = _sOldGfx;
m_sNew_BM_Gfx = _sNewGfx;
m_sDiff_BM_Gfx = _sDiffGfx;
-
+
}
-
+
public void printStatus()
{
GlobalLogWriter.get().println(" Original file: " + m_sOldGfx);
@@ -96,10 +96,10 @@ public class StatusHelper
}
+
-
-// TODO: stream output
+// TODO: stream output
// public stream& statusline(stream)
// {
// stream << name << "PASS" << nDiff==0?"PASS":"FAIL" << endl;
diff --git a/qadevOOo/runner/convwatch/StringHelper.java b/qadevOOo/runner/convwatch/StringHelper.java
index b20e3b6bea01..671c0a2eeeaa 100644
--- a/qadevOOo/runner/convwatch/StringHelper.java
+++ b/qadevOOo/runner/convwatch/StringHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,30 +26,30 @@
************************************************************************/
// LLA: moved to helper.StringHelper package convwatch;
-// LLA: moved to helper.StringHelper
+// LLA: moved to helper.StringHelper
// LLA: moved to helper.StringHelper public class StringHelper {
-// LLA: moved to helper.StringHelper
+// LLA: moved to helper.StringHelper
// LLA: moved to helper.StringHelper public static String doubleQuote(String _sStr)
// LLA: moved to helper.StringHelper {
// LLA: moved to helper.StringHelper return "\"" + _sStr + "\"";
-// LLA: moved to helper.StringHelper }
-// LLA: moved to helper.StringHelper
+// LLA: moved to helper.StringHelper }
+// LLA: moved to helper.StringHelper
// LLA: moved to helper.StringHelper public static String singleQuote(String _sStr)
// LLA: moved to helper.StringHelper {
// LLA: moved to helper.StringHelper return "'" + _sStr + "'";
// LLA: moved to helper.StringHelper }
-// LLA: moved to helper.StringHelper
+// LLA: moved to helper.StringHelper
// LLA: moved to helper.StringHelper public static String removeQuoteIfNeed(String _sPath)
// LLA: moved to helper.StringHelper {
// LLA: moved to helper.StringHelper String sNewPath = _sPath;
-// LLA: moved to helper.StringHelper
+// LLA: moved to helper.StringHelper
// LLA: moved to helper.StringHelper if (_sPath.startsWith("\"") ||
// LLA: moved to helper.StringHelper _sPath.startsWith("'"))
// LLA: moved to helper.StringHelper {
// LLA: moved to helper.StringHelper // remove trailing quotes, if exists
// LLA: moved to helper.StringHelper sNewPath = sNewPath.substring(1);
// LLA: moved to helper.StringHelper }
-// LLA: moved to helper.StringHelper
+// LLA: moved to helper.StringHelper
// LLA: moved to helper.StringHelper if (_sPath.endsWith("\"") ||
// LLA: moved to helper.StringHelper _sPath.endsWith("'"))
// LLA: moved to helper.StringHelper {
@@ -58,7 +58,7 @@
// LLA: moved to helper.StringHelper }
// LLA: moved to helper.StringHelper return sNewPath;
// LLA: moved to helper.StringHelper }
-// LLA: moved to helper.StringHelper
+// LLA: moved to helper.StringHelper
// LLA: moved to helper.StringHelper public static String doubleQuoteIfNeed(String _sStr)
// LLA: moved to helper.StringHelper {
// LLA: moved to helper.StringHelper if (_sStr.startsWith("\"") && _sStr.endsWith("\""))
@@ -75,17 +75,17 @@
// LLA: moved to helper.StringHelper {
// LLA: moved to helper.StringHelper return singleQuote(_sStr);
// LLA: moved to helper.StringHelper }
-// LLA: moved to helper.StringHelper
+// LLA: moved to helper.StringHelper
// LLA: moved to helper.StringHelper return doubleQuote(_sStr);
// LLA: moved to helper.StringHelper }
-// LLA: moved to helper.StringHelper
+// LLA: moved to helper.StringHelper
// LLA: moved to helper.StringHelper /**
// LLA: moved to helper.StringHelper * Convert a value to a string with a given length, if the len is greater the len of the value string representation
// LLA: moved to helper.StringHelper * fill it's front with '0'
// LLA: moved to helper.StringHelper * So ("5", 4) will result in a string "0005"
// LLA: moved to helper.StringHelper * @param _nValue
// LLA: moved to helper.StringHelper * @param _nLen
-// LLA: moved to helper.StringHelper * @return
+// LLA: moved to helper.StringHelper * @return
// LLA: moved to helper.StringHelper */
// LLA: moved to helper.StringHelper public static String createValueString(int _nValue, int _nLen)
// LLA: moved to helper.StringHelper {
@@ -99,5 +99,5 @@
// LLA: moved to helper.StringHelper a.append(sValue);
// LLA: moved to helper.StringHelper return a.toString();
// LLA: moved to helper.StringHelper }
-// LLA: moved to helper.StringHelper
+// LLA: moved to helper.StringHelper
// LLA: moved to helper.StringHelper }
diff --git a/qadevOOo/runner/convwatch/TimeHelper.java b/qadevOOo/runner/convwatch/TimeHelper.java
index 923568db51c8..4ca320a9a66f 100755
--- a/qadevOOo/runner/convwatch/TimeHelper.java
+++ b/qadevOOo/runner/convwatch/TimeHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/qadevOOo/runner/convwatch/TriState.java b/qadevOOo/runner/convwatch/TriState.java
index 7a9e9312c6bb..1d713b9bd12c 100644
--- a/qadevOOo/runner/convwatch/TriState.java
+++ b/qadevOOo/runner/convwatch/TriState.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,9 +36,9 @@ public class TriState
int m_nValue;
/**
- Allocates a <code>TriState</code> object representing the
- <code>value</code> argument.
-
+ Allocates a <code>TriState</code> object representing the
+ <code>value</code> argument.
+
@param value the value of the <code>TriState</code>.
*/
public TriState(int value)
@@ -55,22 +55,22 @@ public class TriState
return m_nValue;
}
/**
- Returns <code>true</code> if and only if the argument is not
- <code>null</code> and is a <code>TriState</code> object that
- contains the same <code>int</code> value as this object.
-
+ Returns <code>true</code> if and only if the argument is not
+ <code>null</code> and is a <code>TriState</code> object that
+ contains the same <code>int</code> value as this object.
+
@param obj the object to compare with.
@return <code>true</code> if the objects are the same;
<code>false</code> otherwise.
*/
-
- public boolean equals(Object obj)
+
+ public boolean equals(Object obj)
{
if ((obj != null) &&
(obj instanceof TriState))
{
return m_nValue == ((TriState)obj).intValue();
- }
+ }
return false;
}
}
diff --git a/qadevOOo/runner/convwatch/ValueNotFoundException.java b/qadevOOo/runner/convwatch/ValueNotFoundException.java
index 04957187d126..9ee7c9365ee7 100644
--- a/qadevOOo/runner/convwatch/ValueNotFoundException.java
+++ b/qadevOOo/runner/convwatch/ValueNotFoundException.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite