summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/graphical
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/graphical')
-rw-r--r--qadevOOo/runner/graphical/BuildID.java8
-rw-r--r--qadevOOo/runner/graphical/DateHelper.java6
-rw-r--r--qadevOOo/runner/graphical/DirectoryHelper.java30
-rw-r--r--qadevOOo/runner/graphical/EnhancedComplexTestCase.java50
-rw-r--r--qadevOOo/runner/graphical/FileHelper.java86
-rw-r--r--qadevOOo/runner/graphical/GlobalLogWriter.java8
-rw-r--r--qadevOOo/runner/graphical/GraphicalComparator.java4
-rw-r--r--qadevOOo/runner/graphical/HTMLResult.java28
-rw-r--r--qadevOOo/runner/graphical/IDocument.java6
-rw-r--r--qadevOOo/runner/graphical/IOffice.java8
-rw-r--r--qadevOOo/runner/graphical/ImageHelper.java8
-rw-r--r--qadevOOo/runner/graphical/IniFile.java4
-rw-r--r--qadevOOo/runner/graphical/JPEGComparator.java18
-rw-r--r--qadevOOo/runner/graphical/JPEGCreator.java48
-rw-r--r--qadevOOo/runner/graphical/JPEGEvaluator.java32
-rw-r--r--qadevOOo/runner/graphical/MSOfficePostscriptCreator.java54
-rw-r--r--qadevOOo/runner/graphical/Office.java12
-rw-r--r--qadevOOo/runner/graphical/OfficeException.java6
-rw-r--r--qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java104
-rw-r--r--qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java188
-rw-r--r--qadevOOo/runner/graphical/ParameterHelper.java48
-rw-r--r--qadevOOo/runner/graphical/PerformanceContainer.java22
-rw-r--r--qadevOOo/runner/graphical/PixelCounter.java26
-rw-r--r--qadevOOo/runner/graphical/PostscriptCreator.java18
-rw-r--r--qadevOOo/runner/graphical/PropertyName.java4
-rw-r--r--qadevOOo/runner/graphical/TimeHelper.java8
-rw-r--r--qadevOOo/runner/graphical/WrongEnvironmentException.java6
-rw-r--r--qadevOOo/runner/graphical/WrongSuffixException.java6
28 files changed, 423 insertions, 423 deletions
diff --git a/qadevOOo/runner/graphical/BuildID.java b/qadevOOo/runner/graphical/BuildID.java
index cf9188d84a47..ed6ebaba6ec2 100644
--- a/qadevOOo/runner/graphical/BuildID.java
+++ b/qadevOOo/runner/graphical/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
@@ -95,7 +95,7 @@ public class BuildID
{
GlobalLogWriter.println("soffice executable not found.");
}
-
+
// int dummy = 0;
return sBuildID;
}
@@ -164,10 +164,10 @@ public class BuildID
// // sApp = "/opt/staroffice8_net/program/soffice";
// // sBuildID = getBuildID(sApp);
// // System.out.println("BuildID is: " + sBuildID);
-// //
+// //
// // sApp = "\"/opt/staroffice8_net/program/soffice\" test blah";
// // sBuildID = getBuildID(sApp);
-// //
+// //
// // System.out.println("BuildID is: " + sBuildID);
// System.exit(1);
// }
diff --git a/qadevOOo/runner/graphical/DateHelper.java b/qadevOOo/runner/graphical/DateHelper.java
index 07a5c5844099..1be49e1701a1 100644
--- a/qadevOOo/runner/graphical/DateHelper.java
+++ b/qadevOOo/runner/graphical/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/graphical/DirectoryHelper.java b/qadevOOo/runner/graphical/DirectoryHelper.java
index 46930d19425f..83d47103592c 100644
--- a/qadevOOo/runner/graphical/DirectoryHelper.java
+++ b/qadevOOo/runner/graphical/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 lla@openoffice.org
*/
public class DirectoryHelper
-{
+{
ArrayList<String> m_aFileList = new ArrayList<String>();
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,16 +65,16 @@ 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);
* }
- *
- * @param _sDirectory
- * @param _aFileFilter
+ *
+ * @param _sDirectory
+ * @param _aFileFilter
* @param _bRecursiveIsAllowed
* @return list of directories
*/
@@ -85,7 +85,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();
@@ -93,8 +93,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
@@ -102,7 +102,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)
@@ -113,7 +113,7 @@ public class DirectoryHelper
{
aDirEntries = fileDirectory.listFiles();
}
-
+
// Iterating for each file and directory
for ( int i = 0; i < aDirEntries.length; ++i )
{
@@ -125,7 +125,7 @@ public class DirectoryHelper
traverse_impl( aDirEntries[ i ].getAbsolutePath(), _aFileFilter );
}
}
- else
+ else
{
// adding file to List
try
@@ -149,7 +149,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/graphical/EnhancedComplexTestCase.java b/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
index c3ec2b3e8336..020016111bfa 100644
--- a/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/graphical/EnhancedComplexTestCase.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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 @@ import java.util.ArrayList;
abstract public class EnhancedComplexTestCase extends ComplexTestCase implements IDocument
{
-
+
private void callEntry(String _sEntry, ParameterHelper _aParam)
{
// log.println("- next file is: ------------------------------");
@@ -96,7 +96,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
}
}
-
+
/**
* Run through all documents found in Inputpath.
* Call the IDocument interface function call(...);
@@ -200,7 +200,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
else
{
String sInputPathWithPS = sInputPath + ".ps";
-
+
File aInputPathWithPS = new File(sInputPathWithPS);
if (aInputPathWithPS.exists())
{
@@ -237,7 +237,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
for (int i=0;i<nFileCount;i++)
{
String sValue = aIniFile.getValue(_sBasename, "report" + i);
-
+
String sPSorPDFName = getPSorPDFNameFromIniFile(aIniFile, sValue);
if (sPSorPDFName.length() > 0)
{
@@ -250,12 +250,12 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
int nOkStatus = 0;
String sStatusRunThrough = "";
String sStatusInfo = "";
- // get the bad status and store it into the
+ // get the bad status and store it into the
for (int i=0;i<aList.size();i++)
{
String sEntry = aList.get(i);
callEntry(sEntry, _aParam);
-
+
// we want to know the current status of the run through
// if the status is greater (more bad) then the current,
// we will remember this. Only the very bad status will
@@ -278,7 +278,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
{
// runThroughOneFileInIndex();
String sPSorPDFName = getPSorPDFNameFromIniFile(aIniFile, _sBasename);
-
+
aIniFile.close();
if (sPSorPDFName.length() > 0)
@@ -293,7 +293,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
assure("File '" + sIndexFile + "' doesn't exists.", aIndexFile.exists(), true);
}
}
-
+
private String getPSorPDFNameFromIniFile(IniFile _aIniFile, String _sName)
{
boolean bHasPostscriptOrPDF = false;
@@ -316,10 +316,10 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
}
return "";
}
-
+
public void runThroughOneFileInIndex(String _sPath, String _sBasename, ParameterHelper _aParam)
{
-
+
}
/**
* Run through a given index.ini or run through a given directory,
@@ -371,26 +371,26 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
else
{
// check if there exists a ini file
- String sPath = FileHelper.getPath(sInputPath);
+ String sPath = FileHelper.getPath(sInputPath);
String sBasename = FileHelper.getBasename(sInputPath);
runThroughEveryReportInIndex(sPath, sBasename, _aParam);
-
+
String sStatusRunThrough = (String)_aParam.getTestParameters().get("last_state");
String sStatusInfo = (String)_aParam.getTestParameters().get("last_info");
if (sStatusRunThrough != null &&
sStatusInfo != null )
{
- // store the bad status in the <Name>.odb.ps.ini file
+ // store the bad status in the <Name>.odb.ps.ini file
String sOutputPath = _aParam.getOutputPath();
String sBasenameIni = FileHelper.appendPath(sOutputPath, sBasename + ".ps.ini");
IniFile aBasenameIni = new IniFile(sBasenameIni);
aBasenameIni.insertValue("global", "state", sStatusRunThrough);
- aBasenameIni.insertValue("global", "info", sStatusInfo);
+ aBasenameIni.insertValue("global", "info", sStatusInfo);
aBasenameIni.close();
}
-
+
}
}
catch (OfficeException e)
@@ -402,7 +402,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
}
}
}
-
+
/**
* Run through a given index.ini or run through a given directory,
@@ -429,18 +429,18 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
else
{
// check if there exists an ini file
- String sPath = FileHelper.getPath(sInputPath);
+ String sPath = FileHelper.getPath(sInputPath);
String sBasename = FileHelper.getBasename(sInputPath);
runThroughEveryReportInIndex(sPath, sBasename, _aParam);
-
+
// Create a HTML page which shows locally to all files in .odb
if (sInputPath.toLowerCase().endsWith(".odb"))
{
String sIndexFile = FileHelper.appendPath(sPath, "index.ini");
File aIndexFile = new File(sIndexFile);
if (aIndexFile.exists())
- {
+ {
IniFile aIniFile = new IniFile(sIndexFile);
if (aIniFile.hasSection(sBasename))
@@ -464,7 +464,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
HTMLResult aOutputter = new HTMLResult(sPath, sBasename + ".ps.html" );
aOutputter.header("content of DB file: " + sBasename);
aOutputter.indexSection(sBasename);
-
+
for (int i=0;i<aList.size();i++)
{
String sPSFile = aList.get(i);
@@ -504,7 +504,7 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
// }
// catch (java.io.IOException e)
// {
-//
+//
// }
}
}
@@ -514,6 +514,6 @@ private void callEntry(String _sEntry, ParameterHelper _aParam)
}
}
}
-
-
+
+
}
diff --git a/qadevOOo/runner/graphical/FileHelper.java b/qadevOOo/runner/graphical/FileHelper.java
index 892f652567c1..9599e6190c1a 100644
--- a/qadevOOo/runner/graphical/FileHelper.java
+++ b/qadevOOo/runner/graphical/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
@@ -49,13 +49,13 @@ public class FileHelper
String sOSName = System.getProperty("os.name");
String sOSArch = System.getProperty("os.arch");
String sOSVersion = System.getProperty("os.version");
-
+
GlobalLogWriter.println(sOSName);
GlobalLogWriter.println(sOSArch);
GlobalLogWriter.println(sOSVersion);
}
-
+
public static void MessageBox(String _sStr)
{
String sVersion = System.getProperty("java.version");
@@ -83,17 +83,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)
@@ -115,7 +115,7 @@ public class FileHelper
}
return false;
}
-
+
public static String getBasename(String _sFilename)
{
if (_sFilename == null)
@@ -149,7 +149,7 @@ public class FileHelper
}
return _sFilename;
}
-
+
public static String getSuffix(String _sFilename)
{
if (_sFilename == null)
@@ -163,7 +163,7 @@ public class FileHelper
}
return "";
}
-
+
public static String getPath(String _sFilename)
{
if (_sFilename == null)
@@ -186,19 +186,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 )
{
@@ -237,7 +237,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;
@@ -249,7 +249,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
@@ -268,7 +268,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()});
}
@@ -305,7 +305,7 @@ public class FileHelper
sSubDirs = sSubDirs.substring(1);
}
}
-
+
return sSubDirs;
}
@@ -380,11 +380,11 @@ public class FileHelper
}
}
- public static void copy(String _sSource, String _sDestination)
+ public static void copy(String _sSource, String _sDestination)
{
FileInputStream aFIS = null;
FileOutputStream aFOS = null;
-
+
try
{
aFIS = new FileInputStream(_sSource);
@@ -416,11 +416,11 @@ public class FileHelper
}
catch (java.io.IOException e)
{
- System.out.println("Error: caught Exception: " + e.getMessage());
+ System.out.println("Error: caught Exception: " + e.getMessage());
}
}
}
-
+
// try
// {
// File inputFile = new File(_sSource);
@@ -429,12 +429,12 @@ 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();
// }
@@ -445,12 +445,12 @@ public class FileHelper
// }
}
-
+
/**
* 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()
{
@@ -462,7 +462,7 @@ public class FileHelper
if (pathname.getName().startsWith("~$"))
{
return false;
- }
+ }
// leave out files starts with '.~lock.' these are OpenOffice.org lock files
if (pathname.getName().startsWith(".~lock."))
{
@@ -490,7 +490,7 @@ public class FileHelper
if (pathname.getName().endsWith("_"))
{
return false;
- }
+ }
return true;
}
};
@@ -500,7 +500,7 @@ public class FileHelper
* 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 getFileFilterPSorPDF()
{
@@ -511,7 +511,7 @@ public class FileHelper
if (pathname.getName().endsWith(".ps"))
{
return true;
- }
+ }
if (pathname.getName().endsWith(".pdf"))
{
return true;
@@ -525,7 +525,7 @@ public class FileHelper
* 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 getFileFilterJPEG()
{
@@ -536,7 +536,7 @@ public class FileHelper
if (pathname.getName().toLowerCase().endsWith(".jpg"))
{
return true;
- }
+ }
if (pathname.getName().toLowerCase().endsWith(".jpeg"))
{
return true;
@@ -550,7 +550,7 @@ public class FileHelper
* Within the directory run through, it's possible to say which file extension types should not
* consider like '*.ini' because it's not a document.
*
- * @return a FileFilter function
+ * @return a FileFilter function
*/
public static FileFilter getFileFilterINI()
{
@@ -567,7 +567,7 @@ public class FileHelper
if (sPathname.endsWith(".ini"))
{
return true;
- }
+ }
return false;
}
};
@@ -595,7 +595,7 @@ public class FileHelper
{
createInfoFile(_sFile, _aGTA, "");
}
-
+
public static void createInfoFile(String _sFile, ParameterHelper _aGTA, String _sSpecial)
{
String sFilename;
@@ -616,7 +616,7 @@ public class FileHelper
IniFile aIniFile = new IniFile(sIniFile);
// OLD INFO FILE
-
+
// String fs = System.getProperty("file.separator");
String ls = System.getProperty("line.separator");
String sInfoFilename = FileHelper.appendPath(sFileDir, sNameNoSuffix + ".info");
@@ -628,7 +628,7 @@ public class FileHelper
{
FileOutputStream out2 = new FileOutputStream(aInfoFile.toString());
PrintStream out = new PrintStream(out2);
-
+
out.println("# automatically created file by graphical compare");
if (_aGTA != null)
{
@@ -645,7 +645,7 @@ public class FileHelper
out.println("buildid=" + sBuildID);
}
aIniFile.insertValue("global", "buildid", sBuildID);
-
+
// if (_sSpecial != null && _sSpecial.length() > 0)
// {
// out.write("special=" + _sSpecial + ls);
@@ -667,7 +667,7 @@ public class FileHelper
// out.write("# time is given in milli seconds" + ls);
// out.write("time=" + nTime + ls);
// }
-
+
out.println();
out.println("# Values out of System.getProperty(...)");
out.println("os.name=" + System.getProperty("os.name"));
@@ -685,7 +685,7 @@ public class FileHelper
_aGTA.getPerformance().print(out);
_aGTA.getPerformance().print(aIniFile, "global");
}
-
+
out.flush();
out.close();
out2.close();
@@ -696,13 +696,13 @@ public class FileHelper
e.printStackTrace();
}
aIniFile.close();
-
+
// String sExtension = FileHelper.getSuffix(_aGTA.getInputFile());
// if (sExtension.startsWith("."))
// {
// sExtension = sExtension.substring(1);
// }
-//
+//
// DB.writeToDB(_aGTA.getInputFile(),
// sNameNoSuffix,
// sExtension,
@@ -711,7 +711,7 @@ public class FileHelper
// _aGTA.getResolutionInDPI()
// );
}
-
+
public static void addBasenameToFile(String _sIndexFilename, String _sBasename, String _sCreator, String _sType, String _sSource)
{
// String sOutputDir = FileHelper.getPath(_sOutputFilename);
@@ -762,6 +762,6 @@ public class FileHelper
// String sBasename = FileHelper.getBasename(_sOutputFilename);
addBasenameToFile(sIndexFilename, _sBasename, _sCreator, _sType, _sSource);
}
-
+
}
diff --git a/qadevOOo/runner/graphical/GlobalLogWriter.java b/qadevOOo/runner/graphical/GlobalLogWriter.java
index 478d3323abda..75f61e92ed02 100644
--- a/qadevOOo/runner/graphical/GlobalLogWriter.java
+++ b/qadevOOo/runner/graphical/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
@@ -57,16 +57,16 @@ public class GlobalLogWriter
}
return m_aGlobalLogWriter;
}
-
+
// public static synchronized void initialize()
// {
// get().initialize(null, true);
// }
-
+
protected static synchronized void set(LogWriter _aLog)
{
m_aGlobalLogWriter = _aLog;
}
-
+
}
diff --git a/qadevOOo/runner/graphical/GraphicalComparator.java b/qadevOOo/runner/graphical/GraphicalComparator.java
index c10bbff8b49e..cba02f78b819 100644
--- a/qadevOOo/runner/graphical/GraphicalComparator.java
+++ b/qadevOOo/runner/graphical/GraphicalComparator.java
@@ -11,7 +11,7 @@ package graphical;
*
* @author ll93751
*/
-public class GraphicalComparator extends EnhancedComplexTestCase
+public class GraphicalComparator extends EnhancedComplexTestCase
{
// @Override
@@ -22,7 +22,7 @@ public class GraphicalComparator extends EnhancedComplexTestCase
public void check()
{
}
-
+
public void checkOneFile(String _sDocument, String _sResult, ParameterHelper _aParams) throws OfficeException {
throw new UnsupportedOperationException("Not supported yet.");
}
diff --git a/qadevOOo/runner/graphical/HTMLResult.java b/qadevOOo/runner/graphical/HTMLResult.java
index af2a31a308ea..6bb78afd8e25 100644
--- a/qadevOOo/runner/graphical/HTMLResult.java
+++ b/qadevOOo/runner/graphical/HTMLResult.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
@@ -38,7 +38,7 @@ public class HTMLResult
private FileWriter m_aOut;
// private String m_sFilename;
// private String m_sNamePrefix; // the HTML files used a suffix to build it's right name
-
+
/**
* ls is the current line separator (carridge return)
*/
@@ -66,9 +66,9 @@ public class HTMLResult
// a.m_sNamePrefix = _sNamePrefix;
// return a;
}
-
+
// public String getFilename() {return m_sFilename;}
-
+
private void writeln(String _sStr)
{
try
@@ -91,7 +91,7 @@ public class HTMLResult
}
}
-
+
/**
* create the HTML header
* @param _sTitle
@@ -105,14 +105,14 @@ public class HTMLResult
writeln( "<LINK rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/style.css\" media=\"screen\" />");
writeln( "</HEAD>");
writeln( "<BODY bgcolor=white>");
- flush();
+ flush();
}
-
+
final static String TEST_TABLETITLE = "Document";
final static String VISUAL_STATUS_TABLETITLE = "Visual status";
final static String VISUAL_STATUS_MESSAGE_TABLETITLE = "Message";
final static String FIRSTGFX_TABLETITLE = "Original print file as jpeg";
-
+
public void indexSection(String _sOfficeInfo)
{
writeln( "<H2>Results for " + _sOfficeInfo + "</H2>");
@@ -160,7 +160,7 @@ public class HTMLResult
a.append("</TD>");
return a.toString();
}
-
+
/**
* Returns the given _sValue as a HTML Table header cell with _sValue as content
* @param _sValue
@@ -174,18 +174,18 @@ public class HTMLResult
a.append("</TH>");
return a.toString();
}
-
+
public void indexLine(String _sHTMLFile, String _sHTMLName, String _sStatusRunThrough, String _sStatusMessage)
{
writeln( "<TR>");
writeln(tableDataCell( getHREF(_sHTMLFile, _sHTMLName) ) );
- writeln(tableDataCell( "" ) );
+ writeln(tableDataCell( "" ) );
writeln( tableDataCell(_sStatusRunThrough) );
writeln( tableDataCell(_sStatusMessage) );
writeln( "</TR>");
flush();
}
-
+
public void close()
{
writeln( "</TABLE>");
@@ -198,7 +198,7 @@ public class HTMLResult
{
}
}
-
+
// -----------------------------------------------------------------------------
private String stronghtml(String _sValue)
{
@@ -208,5 +208,5 @@ public class HTMLResult
a.append("</STRONG>");
return a.toString();
}
-
+
}
diff --git a/qadevOOo/runner/graphical/IDocument.java b/qadevOOo/runner/graphical/IDocument.java
index e23ddd4b91a1..da6135559154 100644
--- a/qadevOOo/runner/graphical/IDocument.java
+++ b/qadevOOo/runner/graphical/IDocument.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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
@@ -40,7 +40,7 @@ public interface IDocument
* @param _sDocument
* @param _sResult
* @param _aParams
- * @throws OfficeException
+ * @throws OfficeException
*/
public void checkOneFile(String _sDocument, String _sResult, ParameterHelper _aParams) throws OfficeException;
}
diff --git a/qadevOOo/runner/graphical/IOffice.java b/qadevOOo/runner/graphical/IOffice.java
index ec1dc3b7371f..6d2d316aac12 100644
--- a/qadevOOo/runner/graphical/IOffice.java
+++ b/qadevOOo/runner/graphical/IOffice.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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
@@ -40,10 +40,10 @@ public interface IOffice
* @throws graphical.OfficeException
*/
public void start() throws OfficeException;
-
+
/**
* Load a document by it's Name
- * @param Name
+ * @param Name
* @throws graphical.OfficeException
*/
public void load(String Name) throws OfficeException;
diff --git a/qadevOOo/runner/graphical/ImageHelper.java b/qadevOOo/runner/graphical/ImageHelper.java
index e016e08f0df1..4aa77224c7e2 100644
--- a/qadevOOo/runner/graphical/ImageHelper.java
+++ b/qadevOOo/runner/graphical/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;
-
+
private ImageHelper(Image _aImage)
{
m_aImage = _aImage;
@@ -79,7 +79,7 @@ class ImageHelper
// Write down the current image to a file.
// public void storeImage(String _sFilename)
- // {
+ // {
// }
public static ImageHelper createImageHelper(String _sFilename)
@@ -114,7 +114,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/graphical/IniFile.java b/qadevOOo/runner/graphical/IniFile.java
index bd54a66b65fd..397f457569f5 100644
--- a/qadevOOo/runner/graphical/IniFile.java
+++ b/qadevOOo/runner/graphical/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
@@ -562,7 +562,7 @@ public class IniFile implements Enumeration
// }
// sLocalValue = replaceEvaluatedKey(_sSection, sLocalValue);
// sLocalValue = replaceEvaluatedKey("global", sLocalValue);
- //
+ //
// return sLocalValue;
// }
public void removeSection(String _sSectionToRemove)
diff --git a/qadevOOo/runner/graphical/JPEGComparator.java b/qadevOOo/runner/graphical/JPEGComparator.java
index a643b2b333c3..3e872281ef82 100644
--- a/qadevOOo/runner/graphical/JPEGComparator.java
+++ b/qadevOOo/runner/graphical/JPEGComparator.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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
@@ -309,7 +309,7 @@ public class JPEGComparator extends EnhancedComplexTestCase
// Failure matrix
// 0 1
// ugly OK FAILED
- // bad OK
+ // bad OK
// good OK
if (ugly > 0)
@@ -425,7 +425,7 @@ public class JPEGComparator extends EnhancedComplexTestCase
String sDestination = FileHelper.appendPath(sDestinationPath, sNewSourceBasename);
FileHelper.copy(sSource, sDestination);
sSourceBasename = sNewSourceBasename;
- //
+ //
JPEGCreator.convertToNearSameFileWithWidth340(sDestination);
}
String sDifferenceBasename = "Difference_between_" + FileHelper.getNameNoSuffix(sSourceBasename) + "_and_" + FileHelper.getNameNoSuffix(sDestinationBasename) + ".jpg";
@@ -530,14 +530,14 @@ public class JPEGComparator extends EnhancedComplexTestCase
//// 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));
@@ -551,7 +551,7 @@ public class JPEGComparator extends EnhancedComplexTestCase
// {
// 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;
@@ -605,9 +605,9 @@ public class JPEGComparator extends EnhancedComplexTestCase
* text like outlined or the text is little bit move left, right up or down.
*
* &gt;>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.
- *
+ *
* @param _sOldGfx path & name to the jpeg file (1)
* @param _sNewGfx path & name to the other jpeg file (2)
* @param _sDiffGfx path & name to the new difference file which shows the difference between (1) and (2)
diff --git a/qadevOOo/runner/graphical/JPEGCreator.java b/qadevOOo/runner/graphical/JPEGCreator.java
index a4336229e448..922af500e7f1 100644
--- a/qadevOOo/runner/graphical/JPEGCreator.java
+++ b/qadevOOo/runner/graphical/JPEGCreator.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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 @@ import java.io.File;
*
* @author ll93751
*/
-public class JPEGCreator extends EnhancedComplexTestCase
+public class JPEGCreator extends EnhancedComplexTestCase
{
// @Override
public String[] getTestMethodNames()
@@ -53,11 +53,11 @@ public class JPEGCreator extends EnhancedComplexTestCase
{
GlobalLogWriter.set(log);
ParameterHelper aParam = new ParameterHelper(param);
-
+
// run through all documents found in Inputpath
foreachPSorPDFinInputPath(aParam);
}
-
+
public void checkOneFile(String _sDocumentName, String _sResult, ParameterHelper _aParams) throws OfficeException
{
@@ -68,7 +68,7 @@ public class JPEGCreator extends EnhancedComplexTestCase
// aOffice.storeAsPostscript();
// aOffice.close();
String sJPEGNameSchema = createJPEG(_sDocumentName, "", _aParams);
-
+
// store information only if jpeg files exists
int nPages = countPages(sJPEGNameSchema);
if (nPages > 0)
@@ -263,20 +263,20 @@ private static void convertToWidth340(String _sFrom, String _To)
String sFileDir = FileHelper.getPath(_sFile);
String sBasename = FileHelper.getBasename(_sFile);
// String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
-
+
String sTmpDir = util.utils.getUsersTempDir();
if (_aParam.getOutputPath() != null)
{
sTmpDir = _aParam.getOutputPath();
}
-
+
String sJPEGNameSchema = "";
if (_sFile.toLowerCase().endsWith("ps") ||
_sFile.toLowerCase().endsWith("prn") ||
_sFile.toLowerCase().endsWith("pdf"))
{
// seems to be a Postscript of PDF file
-
+
sJPEGNameSchema = createJPEGsFromPostscript(sTmpDir, sFileDir, sBasename, _aParam.getResolutionInDPI());
}
else if (_sFile.toLowerCase().endsWith("jpg") ||
@@ -292,11 +292,11 @@ private static void convertToWidth340(String _sFrom, String _To)
}
return sJPEGNameSchema;
}
-
+
private String getJPEGName(String _sOutputPath, String _sBasename, int _nResolutionInDPI, String _sGS_PageOutput)
{
// String fs = System.getProperty("file.separator");
- String sName = _sBasename + "_" + String.valueOf(_nResolutionInDPI) + "DPI_" + _sGS_PageOutput + ".jpg";
+ String sName = _sBasename + "_" + String.valueOf(_nResolutionInDPI) + "DPI_" + _sGS_PageOutput + ".jpg";
String sJPEGName = FileHelper.appendPath(_sOutputPath, sName);
return sJPEGName;
}
@@ -304,16 +304,16 @@ private static void convertToWidth340(String _sFrom, String _To)
/**
* 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
*/
private static final String m_sGS_PageOutput = "%04d";
-
+
private String createJPEGsFromPostscript(String _sOutputPath, String _sSourcePath, String _sSourceFile, int _nResolutionInDPI)
- {
+ {
FileHelper.makeDirectories("", _sOutputPath);
// create a jpeg from original prn
@@ -336,9 +336,9 @@ private static void convertToWidth340(String _sFrom, String _To)
sGhostscriptEXE = FileHelper.appendPath(sGhostscriptPath, sGhostscriptEXE);
}
}
-
+
// String sCommand = sGhostscriptEXE + " -dNOPROMPT -dBATCH -sDEVICE=jpeg -r" + String.valueOf(_nResolutionInDPI) + " -dNOPAUSE -sOutputFile=" + StringHelper.doubleQuoteIfNeed(sJPGFilename) + " " + StringHelper.doubleQuoteIfNeed(sOriginalFile);
- String[] sCommandArray =
+ String[] sCommandArray =
{
sGhostscriptEXE,
"-dNOPROMPT",
@@ -347,10 +347,10 @@ private static void convertToWidth340(String _sFrom, String _To)
"-r" + String.valueOf(_nResolutionInDPI),
"-dNOPAUSE",
"-sOutputFile=" + sJPEGNameSchema,
- sPostscriptOrPDFFile
-
-
-
+ sPostscriptOrPDFFile
+
+
+
};
// System.out.println("Start Command array");
// try
@@ -360,7 +360,7 @@ private static void convertToWidth340(String _sFrom, String _To)
// System.out.println("FAILED");
// }
// System.out.println("done");
-
+
// TODO: gives ghostscript an error we can handle?
ProcessHandler aHandler = new ProcessHandler(sCommandArray);
boolean bBackValue = aHandler.executeSynchronously();
@@ -371,7 +371,7 @@ private static void convertToWidth340(String _sFrom, String _To)
// String sJPEGNameSchema = "";
if (nExitCode == 0)
{
- // 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
int nPages = countPages(sJPEGNameSchema);
if (nPages == 0)
{
@@ -389,7 +389,7 @@ private static void convertToWidth340(String _sFrom, String _To)
// aList = (String[])m_aFileList.toArray(aList);
return sJPEGNameSchema; // sNewJPEGFilename;
}
-
+
public static String getFilenameForJPEGSchema(String _sJPEGSchema, int _nPage)
{
if (_nPage < 1 || _nPage > 9999)
@@ -429,7 +429,7 @@ private static void convertToWidth340(String _sFrom, String _To)
}
return nPages;
}
-
+
// public static void main(String [] _args)
// {
//// DONE: give an index.ini file ok
diff --git a/qadevOOo/runner/graphical/JPEGEvaluator.java b/qadevOOo/runner/graphical/JPEGEvaluator.java
index 07b265b62355..c7de83cc0ce7 100644
--- a/qadevOOo/runner/graphical/JPEGEvaluator.java
+++ b/qadevOOo/runner/graphical/JPEGEvaluator.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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
@@ -35,7 +35,7 @@ package graphical;
*
* @author ll93751
*/
-public class JPEGEvaluator extends EnhancedComplexTestCase
+public class JPEGEvaluator extends EnhancedComplexTestCase
{
// @Override
public String[] getTestMethodNames()
@@ -50,7 +50,7 @@ public class JPEGEvaluator extends EnhancedComplexTestCase
{
GlobalLogWriter.set(log);
ParameterHelper aParam = new ParameterHelper(param);
-
+
// run through all documents found in Inputpath
foreachResultCreateHTML(aParam);
}
@@ -59,16 +59,16 @@ public class JPEGEvaluator extends EnhancedComplexTestCase
{
// throw new UnsupportedOperationException("Not supported yet.");
// int dummy = 0;
-
+
String sBasename = FileHelper.getBasename(_sDocument);
String sResultIniFile = _sDocument + ".ini";
// File aFile = new File(sResultIniFile);
// assure("Result file doesn't exists " + sResultIniFile, aFile.exists());
-//
+//
// int good = 0;
// int bad = 0;
// int ugly = 0;
-//
+//
// IniFile aResultIniFile = new IniFile(sResultIniFile);
// int nPages = aResultIniFile.getIntValue("global", "pages", 0);
// for (int i=0;i<nPages;i++)
@@ -90,11 +90,11 @@ public class JPEGEvaluator extends EnhancedComplexTestCase
// }
//
// assure("Error: document doesn't contains pages", nPages > 0);
-
+
HTMLResult aOutputter = new HTMLResult(_sResult, sBasename + ".html" );
aOutputter.header(_sResult);
aOutputter.indexSection(sBasename);
-
+
IniFile aResultIniFile = new IniFile(sResultIniFile);
String sStatusRunThrough = aResultIniFile.getValue("global", "state");
String sStatusMessage = aResultIniFile.getValue("global", "info");
@@ -102,12 +102,12 @@ public class JPEGEvaluator extends EnhancedComplexTestCase
// // TODO: this information has to come out of the ini files
// String sStatusRunThrough = "PASSED, ";
// String sPassed = "OK";
-//
+//
// String sStatusMessage = "From " + nPages + " page(s) are: ";
// String sGood = "";
// String sBad = "";
// String sUgly = "";
-//
+//
// if (good > 0)
// {
// sGood = " good:=" + good;
@@ -123,13 +123,13 @@ public class JPEGEvaluator extends EnhancedComplexTestCase
// sUgly = " ugly:=" + ugly;
// sStatusMessage += sUgly;
// }
-//
+//
// // Failure matrix
// // 0 1
// // ugly OK FAILED
-// // bad OK
+// // bad OK
// // good OK
-//
+//
// if (ugly > 0)
// {
// sPassed = "FAILED";
@@ -149,14 +149,14 @@ public class JPEGEvaluator extends EnhancedComplexTestCase
// aResultIniFile.insertValue("global", "state", sStatusRunThrough);
// aResultIniFile.insertValue("global", "info", sStatusMessage);
// aResultIniFile.close();
-
+
String sHTMLFile = _aParams.getHTMLPrefix(); // "http://so-gfxcmp-lin/gfxcmp_ui/cw.php?inifile=";
sHTMLFile += _sDocument + ".ini";
aOutputter.indexLine(sHTMLFile, sBasename, sStatusRunThrough, sStatusMessage);
aOutputter.close();
// IniFile aIniFile = new IniFile(_sDocument);
// aIniFile.
-
+
}
diff --git a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
index 86eb28143ed2..8a07436ac502 100644
--- a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.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
@@ -54,7 +54,7 @@ import org.w3c.dom.Node;
public class MSOfficePostscriptCreator implements IOffice
{
private String m_sPrinterName; // within Windows the tools need a printer name;
-
+
public void setPrinterName(String _s)
{
m_sPrinterName = _s;
@@ -63,7 +63,7 @@ public class MSOfficePostscriptCreator implements IOffice
private ParameterHelper m_aParameterHelper;
private String m_sDocumentName;
private String m_sResult;
-
+
// CTor
public MSOfficePostscriptCreator(ParameterHelper _aParam, String _sResult)
{
@@ -245,7 +245,7 @@ public class MSOfficePostscriptCreator implements IOffice
realStartCommand(aStartCommand);
}
}
-
+
// -----------------------------------------------------------------------------
/**
* print the given file (_sInputFile) to the file name (_sPrintFile)
@@ -326,14 +326,14 @@ public class MSOfficePostscriptCreator implements IOffice
FileHelper.createInfoFile(_sPrintFilename, _aGTA, "msoffice");
TimeHelper.waitInSeconds(2, "Give Microsoft Office some time to print.");
}
-
+
public void realStartCommand(ArrayList _aStartCommand) throws OfficeException
- {
+ {
if (_aStartCommand.isEmpty())
{
throw new OfficeException/*WrongEnvironmentException*/("Given list is empty.");
- }
-
+ }
+
try
{
// Convert the StartCommand ArrayList to a String List
@@ -359,7 +359,7 @@ public class MSOfficePostscriptCreator implements IOffice
// TODO: use a better Exception!!!
throw new WrongEnvironmentException("We doesn't work within windows environment.");
}
-
+
ProcessHandler aHandler = new ProcessHandler(aList);
boolean bBackValue = aHandler.executeSynchronously();
@@ -368,10 +368,10 @@ public class MSOfficePostscriptCreator implements IOffice
{
throw new WrongEnvironmentException("Given list is too short.");
}
-
+
// return aHandler.getExitCode();
}
-
+
private String getPerlExe()
{
@@ -392,7 +392,7 @@ public class MSOfficePostscriptCreator implements IOffice
{
return aList;
}
-
+
String sFileName = FileHelper.appendPath(sTmpPath, sPrintViaWord);
File aFile = new File(sFileName);
FileWriter out = new FileWriter(aFile);
@@ -494,14 +494,14 @@ public class MSOfficePostscriptCreator implements IOffice
{
GlobalLogWriter.println("Search for local existance of " + aPerlScript.getAbsolutePath());
}
-
+
if (aPerlScript.exists())
{
if (FileHelper.isDebugEnabled())
{
GlobalLogWriter.println("OK, found it, use this instead the internal one.");
}
-
+
String sName = aPerlScript.getAbsolutePath();
// String sCommand = "perl " + sName;
// System.out.println(sCommand);
@@ -511,13 +511,13 @@ public class MSOfficePostscriptCreator implements IOffice
}
return aList;
}
-
+
ArrayList<String> createWordStoreHelper() throws java.io.IOException
{
// create a program in tmp file
String sTmpPath = util.utils.getUsersTempDir();
String ls = System.getProperty("line.separator");
-
+
// ArrayList aList = new ArrayList();
String sSaveViaWord = "saveViaWord.pl";
@@ -526,13 +526,13 @@ public class MSOfficePostscriptCreator implements IOffice
{
return aList;
}
-
+
String sName = FileHelper.appendPath(sTmpPath, sSaveViaWord);
if (FileHelper.isDebugEnabled())
{
GlobalLogWriter.println("No local found, create a perl script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile);
@@ -592,7 +592,7 @@ public class MSOfficePostscriptCreator implements IOffice
aList.add(sName);
return aList;
}
-
+
ArrayList<String> createExcelPrintHelper() throws java.io.IOException
{
@@ -612,7 +612,7 @@ public class MSOfficePostscriptCreator implements IOffice
{
GlobalLogWriter.println("No local found, create a perl script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile);
@@ -715,10 +715,10 @@ public class MSOfficePostscriptCreator implements IOffice
{
GlobalLogWriter.println("No local found, create a script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile);
-
+
out.write( "eval 'exec perl -wS $0 ${1+\"$@\"}' " + ls );
out.write( " if 0; " + ls );
out.write( "use strict; " + ls );
@@ -785,7 +785,7 @@ public class MSOfficePostscriptCreator implements IOffice
aList.add(sName);
return aList;
}
-
+
ArrayList<String> createPowerPointPrintHelper() throws java.io.IOException
{
// create a program in tmp file
@@ -793,7 +793,7 @@ public class MSOfficePostscriptCreator implements IOffice
String ls = System.getProperty("line.separator");
String sPrintViaPowerPoint = "printViaPowerPoint.pl";
-
+
ArrayList<String> aList = searchLocalFile(sPrintViaPowerPoint);
if (aList.isEmpty() == false)
{
@@ -804,7 +804,7 @@ public class MSOfficePostscriptCreator implements IOffice
{
GlobalLogWriter.println("No local found, create a script: " + sName);
}
-
+
File aFile = new File(sName);
FileWriter out = new FileWriter(aFile);
@@ -912,7 +912,7 @@ public class MSOfficePostscriptCreator implements IOffice
{
aLine = aLine.trim();
if ( (! (aLine.length() < 2) ) &&
- (! aLine.startsWith("#")) &&
+ (! aLine.startsWith("#")) &&
(! aLine.startsWith(";")) )
{
int nIdx = aLine.indexOf("mso-application");
@@ -947,7 +947,7 @@ public class MSOfficePostscriptCreator implements IOffice
}
try
{
- aReader.close();
+ aReader.close();
}
catch (java.io.IOException ie)
{
diff --git a/qadevOOo/runner/graphical/Office.java b/qadevOOo/runner/graphical/Office.java
index 8ecee36cc742..23bd040cf4bb 100644
--- a/qadevOOo/runner/graphical/Office.java
+++ b/qadevOOo/runner/graphical/Office.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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 class Office implements IOffice
private String m_sDocumentName;
private String m_sResult;
private IOffice m_aOffice = null;
-
+
public Office(ParameterHelper _aParam, String _sResult)
{
m_aParameterHelper = _aParam;
@@ -76,8 +76,8 @@ public class Office implements IOffice
sDocumentSuffix.toLowerCase().endsWith(".bmp"))
{
throw new OfficeException("The given document is not a document type.");
- }
-
+ }
+
// TODO: we should start the office after we know if we really need an Office.
if (m_aOffice != null)
{
@@ -106,7 +106,7 @@ public class Office implements IOffice
String sDocumentName = (String)aList.get(i);
m_aOffice.load(sDocumentName);
m_aOffice.storeAsPostscript();
-
+
// foreach Report found in the .odb file, create an entry 'report'<number> in the original <name>.odb Section
// so it is possible to run through all reports by the given .odb name
diff --git a/qadevOOo/runner/graphical/OfficeException.java b/qadevOOo/runner/graphical/OfficeException.java
index bc5a24fd5b97..49895ed39f3f 100644
--- a/qadevOOo/runner/graphical/OfficeException.java
+++ b/qadevOOo/runner/graphical/OfficeException.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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
@@ -35,7 +35,7 @@ package graphical;
* Exception which occur if something goes wrong at load document.
*/
-public class OfficeException extends Exception
+public class OfficeException extends Exception
{
public OfficeException(String _aMessage)
{
diff --git a/qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java b/qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java
index a0592d5ce143..f347af3245e6 100644
--- a/qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java
+++ b/qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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 @@ class PropertySetHelper
{
m_xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, _aObj);
}
-
+
/**
get a property and don't convert it
@param _sName the string name of the property
@@ -100,24 +100,24 @@ class PropertySetHelper
public class OpenOfficeDatabaseReportExtractor extends Assurance
{
private ParameterHelper m_aParameterHelper;
-
+
public OpenOfficeDatabaseReportExtractor(ParameterHelper _aParameter)
{
m_aParameterHelper = _aParameter;
}
-
+
private XDesktop m_xDesktop = null;
private XDesktop getXDesktop()
{
- if (m_xDesktop == null)
+ if (m_xDesktop == null)
{
- try
+ try
{
XInterface xInterface = (XInterface) getMultiServiceFactory().createInstance( "com.sun.star.frame.Desktop" );
m_xDesktop = UnoRuntime.queryInterface(XDesktop.class, xInterface);
}
- catch (com.sun.star.uno.Exception e)
+ catch (com.sun.star.uno.Exception e)
{
GlobalLogWriter.println("ERROR: uno.Exception caught");
GlobalLogWriter.println("Message: " + e.getMessage());
@@ -125,7 +125,7 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
}
return m_xDesktop;
}
-
+
private void showElements(XNameAccess _xNameAccess)
{
if (_xNameAccess != null)
@@ -141,8 +141,8 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
System.out.println("Warning: Given object is null.");
}
}
-
-
+
+
private OfficeProvider m_aProvider = null;
private XMultiServiceFactory m_xMultiServiceFactory = null;
private XMultiServiceFactory getMultiServiceFactory()
@@ -175,7 +175,7 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
// }
// TimeHelper.waitInSeconds(2, "Give close Office some time.");
// }
-
+
private String m_sMailAddress = null;
private String m_sParentDistinct = null;
@@ -192,10 +192,10 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
/**
* This is the main test Function of current ReportDesignerTest
- * @param _sDocument
+ * @param _sDocument
* @return
*/
-
+
public ArrayList<String> load(String _sDocument /*, int _nType*/)
{
// We need to copy the database file to a place where we have write access, NEVER use the docpool for this
@@ -206,13 +206,13 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
String sFilename = FileHelper.getBasename(_sDocument);
String sDestinationFile = FileHelper.appendPath(sOutputPath, sFilename);
FileHelper.copy(_sDocument, sDestinationFile);
-
+
// now the fix reference of the AbsoluteReferenceFile should exist.
assure("There exists no file: " + sDestinationFile, FileHelper.exists(sDestinationFile));
String sFileURL = URLHelper.getFileURLFromSystemPath(sDestinationFile);
GlobalLogWriter.println("File URL: " + sFileURL);
-
+
ArrayList<PropertyValue> aPropertyList = new ArrayList<PropertyValue>();
// FYI: it is not allowed to open the document read only
@@ -222,46 +222,46 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
// aPropertyList.add(aReadOnly);
XComponent xDocComponent = loadComponent(sFileURL, getXDesktop(), aPropertyList);
-
+
GlobalLogWriter.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)
-
+
ArrayList<String> aList = null;
try
{
// XInterface x = (XInterface)getMultiServiceFactory().createInstance("com.sun.star.sdb.DatabaseContext");
// assure("can't create instance of com.sun.star.sdb.DatabaseContext", x != null);
// GlobalLogWriter.println("createInstance com.sun.star.sdb.DatabaseContext done");
-
+
// XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, x);
// showElements(xNameAccess);
// Object aObj = xNameAccess.getByName(sFileURL);
// GlobalLogWriter.println("1");
-
+
// PropertySetHelper aHelper = new PropertySetHelper(aObj);
// XDocumentDataSource xDataSource = (XDocumentDataSource)UnoRuntime.queryInterface(XDocumentDataSource.class, aObj);
// Object aDatabaseDocument = aHelper.getPropertyValueAsObject("DatabaseDocument");
// XOfficeDatabaseDocument xOfficeDBDoc = xDataSource.getDatabaseDocument();
-
+
XOfficeDatabaseDocument xOfficeDBDoc = UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, xDocComponent);
-
+
// XOfficeDatabaseDocument xOfficeDBDoc = (XOfficeDatabaseDocument)UnoRuntime.queryInterface(XOfficeDatabaseDocument.class, xDataSource);
assure("can't access DatabaseDocument", xOfficeDBDoc != null);
// GlobalLogWriter.println("2");
-
+
XModel xDBSource = UnoRuntime.queryInterface(XModel.class, xOfficeDBDoc);
Object aController = xDBSource.getCurrentController();
assure("Controller of xOfficeDatabaseDocument is empty!", aController != null);
// GlobalLogWriter.println("3");
-
+
XDatabaseDocumentUI aDBDocUI = UnoRuntime.queryInterface(XDatabaseDocumentUI.class, aController);
aDBDocUI.connect();
boolean isConnect = aDBDocUI.isConnected();
@@ -273,28 +273,28 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
{
GlobalLogWriter.println("Connection is false");
}
-
- // aHelper = new PropertySetHelper(aController);
-
+
+ // aHelper = new PropertySetHelper(aController);
+
XReportDocumentsSupplier xSupplier = UnoRuntime.queryInterface(XReportDocumentsSupplier.class, xOfficeDBDoc);
XNameAccess xNameAccess = xSupplier.getReportDocuments();
assure("xOfficeDatabaseDocument returns no Report Document", xNameAccess != null);
// GlobalLogWriter.println("5");
-
+
showElements(xNameAccess);
-
+
// Object aActiveConnectionObj = aHelper.getPropertyValueAsObject("ActiveConnection");
- Object aActiveConnectionObj = aDBDocUI.getActiveConnection();
+ Object aActiveConnectionObj = aDBDocUI.getActiveConnection();
assure("ActiveConnection is empty", aActiveConnectionObj != null);
// GlobalLogWriter.println("5");
ArrayList<PropertyValue> aPropertyList2 = new ArrayList<PropertyValue>();
-
+
PropertyValue aActiveConnection = new PropertyValue();
aActiveConnection.Name = "ActiveConnection";
aActiveConnection.Value = aActiveConnectionObj;
aPropertyList2.add(aActiveConnection);
-
+
aList = loadAndStoreReports(xNameAccess, aPropertyList2 /*, _nType*/ );
createDBEntry(/*_nType*/);
}
@@ -303,12 +303,12 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
GlobalLogWriter.println("ERROR: Exception caught");
GlobalLogWriter.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
// util.utils.shortWait(2000);
@@ -321,14 +321,14 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
return "AutogenReportDesignTest";
// return getFileFormat(_nType);
}
-
+
// -----------------------------------------------------------------------------
private void createDBEntry(/*int _nType*/)
{
// try to connect the database
String sDBConnection = (String)m_aParameterHelper.getTestParameters().get( convwatch.PropertyName.DB_CONNECTION_STRING );
if (sDBConnection != null && sDBConnection.length() > 0)
- {
+ {
GlobalLogWriter.println("DBConnection: " + sDBConnection);
// TODO: DB
// DB.init(sDBConnection);
@@ -362,7 +362,7 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
// System.exit(1);
}
}
-
+
private ArrayList<String> loadAndStoreReports(XNameAccess _xNameAccess, ArrayList<PropertyValue> _aPropertyList /*, int _nType*/ )
{
ArrayList<String> aList = new ArrayList<String>();
@@ -406,7 +406,7 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
}
return sExtension;
}
-
+
// switch(_nType)
// {
// case WRITER:
@@ -436,7 +436,7 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
// }
// return sFileType;
// }
-
+
private String m_sOutputPath = null;
private String getOutputPath(/*int _nType*/)
@@ -449,17 +449,17 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
// sOutputPath += "tmp_123";
sOutputPath = FileHelper.appendPath(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
*/
@@ -474,10 +474,10 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
// File aOutputFile = new File(sOutputPath); // create the directory of the given output path
// aOutputFile.mkdirs();
-
+
String sName = _sName + getFormatExtension(_xComponent /*_nType*/);
sOutputPath = FileHelper.appendPath(sOutputPath, sName);
-
+
// we need the name and path
String sBackPathName = sOutputPath;
@@ -513,7 +513,7 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
}
return sBackPathName;
}
-
+
private XComponent loadComponent(String _sName, Object _xComponent, ArrayList _aPropertyList)
{
XComponent xDocComponent = null;
@@ -556,5 +556,5 @@ public class OpenOfficeDatabaseReportExtractor extends Assurance
GlobalLogWriter.println("Message: " + e.getMessage());
}
}
-
+
}
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index d918634f8d30..077ee4bd0134 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.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
@@ -80,11 +80,11 @@ public class OpenOfficePostscriptCreator implements IOffice
m_aDocument = null;
}
-
+
public void load(String _sDocumentName) throws OfficeException
{
m_sDocumentName = _sDocumentName;
-
+
String sInputFileURL = URLHelper.getFileURLFromSystemPath(m_sDocumentName);
m_aDocument = loadFromURL(m_aParameterHelper, sInputFileURL);
if (m_aDocument == null)
@@ -92,7 +92,7 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("loadDocumentFromURL() failed with document: " + sInputFileURL);
throw new OfficeException("load(): failed with document" + sInputFileURL);
}
-
+
m_sBasename = FileHelper.getBasename(m_sDocumentName);
}
@@ -137,10 +137,10 @@ public class OpenOfficePostscriptCreator implements IOffice
stopOffice();
}
-
-
-
-
+
+
+
+
private void showProperty(PropertyValue _aValue)
{
String sName = _aValue.Name;
@@ -155,8 +155,8 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("showProperty: can't convert a object to string. " + e.getMessage());
}
}
-
- /**
+
+ /**
* shows the FilterName and MediaType from the given XComponent
*/
private String getDocumentType( XComponent _aDoc )
@@ -193,7 +193,7 @@ public class OpenOfficePostscriptCreator implements IOffice
String _sInputURL)
{
XComponent aDoc = null;
- try
+ try
{
if (_aGTA.getMultiServiceFactory() == null)
{
@@ -202,7 +202,7 @@ public class OpenOfficePostscriptCreator implements IOffice
}
Object oDsk = _aGTA.getMultiServiceFactory().createInstance("com.sun.star.frame.Desktop");
XDesktop aDesktop = UnoRuntime.queryInterface(XDesktop.class, oDsk);
-
+
if (aDesktop != null)
{
GlobalLogWriter.println("com.sun.star.frame.Desktop created.");
@@ -210,7 +210,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// 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
@@ -253,12 +253,12 @@ public class OpenOfficePostscriptCreator implements IOffice
ReadOnly.Value = Boolean.TRUE;
aPropertyList.add(ReadOnly);
showProperty(ReadOnly);
-
+
GlobalLogWriter.println(DateHelper.getDateTimeForHumanreadableLog() + " Load document");
// GlobalLogWriter.flush();
-
+
XComponentLoader aCompLoader = UnoRuntime.queryInterface( XComponentLoader.class, aDesktop);
-
+
// XComponent aDoc = null;
_aGTA.getPerformance().startTime(PerformanceContainer.Load);
@@ -296,14 +296,14 @@ public class OpenOfficePostscriptCreator implements IOffice
}
return aDoc;
}
-
+
private 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";
@@ -311,7 +311,7 @@ public class OpenOfficePostscriptCreator implements IOffice
aPropertyList.add(aFiltername);
showProperty(aFiltername);
boolean bWorked = true;
-
+
// TODO: TimeHelper.waitInSeconds(20, "Wait before storeToURL. Maybe helps due to layouting problems.");
try
{
@@ -327,15 +327,15 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("Message: " + e.getMessage());
bWorked = false;
}
-
+
return bWorked;
}
-
+
private String getFilterName_forPDF(XServiceInfo xServiceInfo)
{
String filterName = "";
-
+
if (xServiceInfo.supportsService("com.sun.star.text.TextDocument"))
{
//writer
@@ -371,9 +371,9 @@ public class OpenOfficePostscriptCreator implements IOffice
//math document
filterName = "math_pdf_Export";
}
-
+
return filterName;
- }
+ }
// -----------------------------------------------------------------------------
@@ -396,7 +396,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// aDoc.dispose();
// return bBack;
// }
-
+
public boolean storeAsPDF(ParameterHelper _aGTA,
XComponent _aDoc,
String _sOutputURL) throws OfficeException
@@ -419,7 +419,7 @@ public class OpenOfficePostscriptCreator implements IOffice
}
return bBack;
}
-
+
// -----------------------------------------------------------------------------
/**
@@ -439,7 +439,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// {
// // waitInSeconds(1);
// boolean bBack = false;
-//
+//
// XComponent aDoc = loadFromURL(_aGTA, _sInputURL);
// if (aDoc != null)
// {
@@ -451,7 +451,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// disallowStore();
// }
// bBack = impl_printToFileWithOOo(_aGTA, aDoc, _sOutputURL, _sPrintFileURL);
-//
+//
// GlobalLogWriter.println("Close document.");
// aDoc.dispose();
// }
@@ -462,7 +462,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// return bBack;
// }
-
+
// -----------------------------------------------------------------------------
private boolean impl_printToFileWithOOo(ParameterHelper _aGTA,
@@ -477,8 +477,8 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("No document is given.");
return bBack;
}
-
- try
+
+ try
{
if (_sOutputURL != null)
{
@@ -489,7 +489,7 @@ public class OpenOfficePostscriptCreator implements IOffice
if (aStorable != null)
{
PropertyValue [] szEmptyArgs = new PropertyValue [0];
-
+
GlobalLogWriter.println(DateHelper.getDateTimeForHumanreadableLog() + " Store document.");
_aGTA.getPerformance().startTime(PerformanceContainer.Store);
aStorable.storeAsURL(_sOutputURL, szEmptyArgs);
@@ -520,7 +520,7 @@ public class OpenOfficePostscriptCreator implements IOffice
}
else
{
- // make sure to create the directory in
+ // make sure to create the directory in
String sOutputFilename = FileHelper.getSystemPathFromFileURL(_sOutputURL);
String sOutputPath = FileHelper.getPath(sOutputFilename);
File aFile = new File(sOutputPath);
@@ -538,12 +538,12 @@ public class OpenOfficePostscriptCreator implements IOffice
bBack = false;
}
- try
+ try
{
-
+
// System.out.println("Document loaded.");
// Change Pagesettings to DIN A4
-
+
GlobalLogWriter.println(DateHelper.getDateTimeForHumanreadableLog() + " Print document.");
XPrintable aPrintable = UnoRuntime.queryInterface( XPrintable.class, _aDoc);
if (aPrintable != null)
@@ -561,9 +561,9 @@ public class OpenOfficePostscriptCreator implements IOffice
// 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())
{
@@ -580,7 +580,7 @@ public class OpenOfficePostscriptCreator implements IOffice
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"
@@ -591,7 +591,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// 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" ) )
@@ -605,7 +605,7 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("PrintAllSheets := true");
}
}
-
+
ArrayList<PropertyValue> aPrintProps = new ArrayList<PropertyValue>();
// GlobalLogWriter.println("Property FileName:=" + _sPrintFileURL);
@@ -617,7 +617,7 @@ public class OpenOfficePostscriptCreator implements IOffice
aPrintProps.add(Arg);
showProperty(Arg);
-
+
// generate pages string
if (_aGTA.printAllPages() == false)
{
@@ -634,20 +634,20 @@ public class OpenOfficePostscriptCreator implements IOffice
}
sPages += String.valueOf(_aGTA.getOnlyPages());
}
-
+
Arg = new PropertyValue();
Arg.Name = "Pages";
Arg.Value = sPages;
aPrintProps.add(Arg);
showProperty(Arg);
}
-
+
// GlobalLogWriter.println("Start printing.");
_aGTA.getPerformance().startTime(PerformanceContainer.Print);
aPrintable.print(PropertyHelper.createPropertyValueArrayFormArrayList(aPrintProps));
TimeHelper.waitInSeconds(1, "Start waiting for print ready.");
-
+
GlobalLogWriter.println("Wait until document is printed.");
boolean isBusy = true;
int nPrintCount = 0;
@@ -675,7 +675,7 @@ public class OpenOfficePostscriptCreator implements IOffice
_aGTA.getPerformance().stopTime(PerformanceContainer.Print);
GlobalLogWriter.println(DateHelper.getDateTimeForHumanreadableLog() + " Print document done.");
-
+
// Create a .info file near the printed '.ps' or '.prn' file.
FileHelper.createInfoFile(_sPrintFileURL, _aGTA);
}
@@ -695,7 +695,7 @@ public class OpenOfficePostscriptCreator implements IOffice
e.printStackTrace();
bBack = false;
}
-
+
if (bFailed == true)
{
GlobalLogWriter.println("convwatch.OfficePrint: FAILED");
@@ -707,7 +707,7 @@ public class OpenOfficePostscriptCreator implements IOffice
return bBack;
}
-
+
/**
* @param _aGTA
* @param _sAbsoluteOutputPath
@@ -724,7 +724,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// throw new ConvWatchCancelException("Input file: " + _sAbsoluteInputFile + " does not exist.");
return false;
}
-
+
// String fs = System.getProperty("file.separator");
// String sInputFileURL = URLHelper.getFileURLFromSystemPath(_sAbsoluteInputFile);
@@ -744,7 +744,7 @@ public class OpenOfficePostscriptCreator implements IOffice
}
// sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename);
// sOutputFileURL = null;
-
+
String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
// String sPrintFileURL;
@@ -756,17 +756,17 @@ public class OpenOfficePostscriptCreator implements IOffice
}
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
- * @return
+ * @return
*/
// public static boolean buildReference(ParameterHelper _aGTA,
// String _sAbsoluteOutputPath,
@@ -797,7 +797,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// }
// // sOutputFileURL = URLHelper.getFileURLFromSystemPath(sOutputPath + fs + sInputFileBasename);
// sOutputFileURL = null;
-//
+//
// String sPrintFilename = FileHelper.getNameNoSuffix(sInputFileBasename);
// String sPrintFileURL;
//
@@ -807,14 +807,14 @@ public class OpenOfficePostscriptCreator implements IOffice
// GlobalLogWriter.println("Reference already exist, don't overwrite. Set " + PropertyName.DOC_COMPARATOR_OVERWRITE_REFERENCE + "=true to force overwrite.");
// return true;
// }
-//
+//
// if (_aGTA.getReferenceType().toLowerCase().equals("msoffice"))
// {
// sPrintFileURL = URLHelper.getFileURLFromSystemPath(sAbsolutePrintFilename);
// }
// else if (_aGTA.getReferenceType().toLowerCase().equals("pdf"))
// {
-//// TODO: If we rename the stored file to *.pdf, we have to be sure that we use *.pdf also as a available reference
+//// 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"))
@@ -828,12 +828,12 @@ public class OpenOfficePostscriptCreator implements IOffice
// }
// return printToFile(_aGTA, sInputFileURL, sOutputFileURL, sPrintFileURL);
// }
+
-
-
+
// TODO: Das Teil muss hier raus!
-
-
+
+
// public static boolean printToFile(ParameterHelper _aGTA,
// String _sInputFileURL,
// String _sOutputFileURL,
@@ -842,10 +842,10 @@ public class OpenOfficePostscriptCreator implements IOffice
// boolean bBack = false;
// String sPrintFileURL = null;
//
-//
+//
// // remember the current timer, to know how long a print process need.
// // startTimer();
-//
+//
// if (_aGTA.getReferenceType().toLowerCase().equals("ooo"))
// {
// bBack = printToFileWithOOo(_aGTA, _sInputFileURL, _sOutputFileURL, _sPrintFileURL);
@@ -892,7 +892,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// }
// return bBack;
// }
-
+
// -----------------------------------------------------------------------------
// TODO: move this away!
// -----------------------------------------------------------------------------
@@ -902,7 +902,7 @@ public class OpenOfficePostscriptCreator implements IOffice
{
return;
}
-
+
if (_xMSF == null)
{
GlobalLogWriter.println("MultiServiceFactory not set.");
@@ -928,14 +928,14 @@ public class OpenOfficePostscriptCreator implements IOffice
// -----------------------------------------------------------------------------
- public String getInternalFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
+ public String getInternalFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
{
if (_sFilterName.length() == 0)
{
// System.out.println("No FilterName set.");
return null;
}
-
+
if (_xMSF == null)
{
GlobalLogWriter.println("MultiServiceFactory not set.");
@@ -957,7 +957,7 @@ public class OpenOfficePostscriptCreator implements IOffice
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." );
@@ -969,13 +969,13 @@ public class OpenOfficePostscriptCreator implements IOffice
// System.out.println("Must quit.");
// System.out.exit(1);
// }
-
+
if (! aNameAccess.hasByName(_sFilterName))
{
GlobalLogWriter.println("FilterFactory.hasByName() says there exist no '" + _sFilterName + "'" );
return null;
}
-
+
Object[] aElements = null;
String[] aExtensions;
try
@@ -1016,17 +1016,17 @@ public class OpenOfficePostscriptCreator implements IOffice
}
return null;
}
-
+
// -----------------------------------------------------------------------------
- String getServiceNameFromFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
+ String getServiceNameFromFilterName(String _sFilterName, XMultiServiceFactory _xMSF)
{
if (_sFilterName.length() == 0)
{
// System.out.println("No FilterName set.");
return null;
}
-
+
if (_xMSF == null)
{
GlobalLogWriter.println("MultiServiceFactory not set.");
@@ -1047,13 +1047,13 @@ public class OpenOfficePostscriptCreator implements IOffice
{
XNameAccess aNameAccess = UnoRuntime.queryInterface(XNameAccess.class, aObj);
if (aNameAccess != null)
- {
+ {
if (! aNameAccess.hasByName(_sFilterName))
{
GlobalLogWriter.println("FilterFactory.hasByName() says there exist no '" + _sFilterName + "'" );
return null;
}
-
+
Object[] aElements = null;
String[] aExtensions;
try
@@ -1096,14 +1096,14 @@ public class OpenOfficePostscriptCreator implements IOffice
}
// -----------------------------------------------------------------------------
- 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.println("MultiServiceFactory not set.");
@@ -1125,20 +1125,20 @@ public class OpenOfficePostscriptCreator implements IOffice
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.println("TypeDetection.hasByName() says there exist no '" + _sInternalFilterName + "'" );
return null;
}
-
+
Object[] aElements = null;
String[] aExtensions;
try
@@ -1187,7 +1187,7 @@ public class OpenOfficePostscriptCreator implements IOffice
}
return null;
}
-
+
// -----------------------------------------------------------------------------
public void convertDocument(String _sInputFile, String _sOutputPath, ParameterHelper _aGTA) throws OfficeException
{
@@ -1197,7 +1197,7 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("MultiServiceFactory in GraphicalTestArgument not set.");
return;
}
-
+
String sInputURL = URLHelper.getFileURLFromSystemPath(_sInputFile);
// showType(sInputURL, xMSF);
XComponent aDoc = loadFromURL( _aGTA, sInputURL);
@@ -1206,13 +1206,13 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("Can't load document '"+ sInputURL + "'");
return;
}
-
+
if (_sOutputPath == null)
{
GlobalLogWriter.println("Outputpath not set.");
return;
}
-
+
if (! isStoreAllowed())
{
GlobalLogWriter.println("It's not allowed to store, check Input/Output path.");
@@ -1232,7 +1232,7 @@ public class OpenOfficePostscriptCreator implements IOffice
GlobalLogWriter.println("com.sun.star.frame.XStorable is null");
return;
}
-
+
String sFilterName = _aGTA.getExportFilterName();
// check how many Properties should initialize
@@ -1241,19 +1241,19 @@ public class OpenOfficePostscriptCreator implements IOffice
// {
// 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.println("Filter detection:");
// check if service name from file filter is the same as from the loaded document
boolean bServiceFailed = false;
@@ -1292,7 +1292,7 @@ public class OpenOfficePostscriptCreator implements IOffice
showProperty(Arg);
GlobalLogWriter.println("FilterName is set to: " + sFilterName);
}
-
+
String sOutputURL = "";
try
{
@@ -1315,7 +1315,7 @@ public class OpenOfficePostscriptCreator implements IOffice
{
sOutputFile += sInputFileBasename;
}
-
+
if (FileHelper.exists(sOutputFile) && _aGTA.getOverwrite() == false)
{
GlobalLogWriter.println("File already exist, don't overwrite. Set " + PropertyName.DOC_COMPARATOR_OVERWRITE_REFERENCE + "=true to force overwrite.");
@@ -1323,7 +1323,7 @@ public class OpenOfficePostscriptCreator implements IOffice
}
sOutputURL = URLHelper.getFileURLFromSystemPath(sOutputFile);
-
+
GlobalLogWriter.println("Store document as '" + sOutputURL + "'");
xStorable.storeAsURL(sOutputURL, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList));
GlobalLogWriter.println("Document stored.");
@@ -1334,7 +1334,7 @@ public class OpenOfficePostscriptCreator implements IOffice
}
// TODO: Do we need to wait?
// TimeHelper.waitInSeconds(1, "unknown in OfficePrint.convertDocument()");
-
+
}
/**
@@ -1365,7 +1365,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// aSemaphore.P(aSemaphore.getSemaphoreFile());
// }
m_aParameterHelper.getTestParameters().put(util.PropertyName.DONT_BACKUP_USERLAYER, Boolean.TRUE);
-
+
m_aParameterHelper.getPerformance().startTime(PerformanceContainer.OfficeStart);
m_aProvider = new OfficeProvider();
XMultiServiceFactory xMSF = (XMultiServiceFactory) m_aProvider.getManager(m_aParameterHelper.getTestParameters());
@@ -1424,4 +1424,4 @@ public class OpenOfficePostscriptCreator implements IOffice
}
}
-
+
diff --git a/qadevOOo/runner/graphical/ParameterHelper.java b/qadevOOo/runner/graphical/ParameterHelper.java
index 598ee6c53007..2450ce97cce3 100644
--- a/qadevOOo/runner/graphical/ParameterHelper.java
+++ b/qadevOOo/runner/graphical/ParameterHelper.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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
@@ -87,11 +87,11 @@ public class ParameterHelper
private String m_sInputPath = null;
private String m_sOutputPath = null;
// private String m_sReferencePath = null;
-
+
private TestParameters m_aCurrentParams;
// private GlobalLogWriter m_aLog;
-
+
// CONSTRUCTOR
private ParameterHelper(){}
@@ -100,10 +100,10 @@ public class ParameterHelper
m_aCurrentParams = param;
// m_aLog = log;
// interpretReferenceType();
- // interpretPrinterName();
+ // interpretPrinterName();
}
-
+
protected TestParameters getTestParameters()
{
return m_aCurrentParams;
@@ -120,7 +120,7 @@ public class ParameterHelper
String sInputPath = (String)getTestParameters().get( PropertyName.DOC_COMPARATOR_INPUT_PATH );
if (sInputPath == null || sInputPath.length() == 0)
{
- GlobalLogWriter.println("Please set input path (path to documents) " + PropertyName.DOC_COMPARATOR_INPUT_PATH + "=path.");
+ GlobalLogWriter.println("Please set input path (path to documents) " + PropertyName.DOC_COMPARATOR_INPUT_PATH + "=path.");
}
else
{
@@ -129,7 +129,7 @@ public class ParameterHelper
}
return m_sInputPath;
}
-
+
public String getOutputPath()
{
if (m_sOutputPath == null)
@@ -137,7 +137,7 @@ public class ParameterHelper
String sOutputPath = (String)getTestParameters().get( PropertyName.DOC_COMPARATOR_OUTPUT_PATH );
if (sOutputPath == null || sOutputPath.length() == 0)
{
- GlobalLogWriter.println("Please set output path (path where to store document results) " + PropertyName.DOC_COMPARATOR_OUTPUT_PATH + "=path.");
+ GlobalLogWriter.println("Please set output path (path where to store document results) " + PropertyName.DOC_COMPARATOR_OUTPUT_PATH + "=path.");
}
else
{
@@ -163,7 +163,7 @@ public class ParameterHelper
// }
// return m_sReferencePath;
// }
-
+
public boolean isIncludeSubDirectories()
{
@@ -189,7 +189,7 @@ public class ParameterHelper
if (m_sReferenceType == null)
{
// REFERENCE_TYPE ----------
-
+
String sReferenceType = (String)getTestParameters().get( PropertyName.DOC_COMPARATOR_REFERENCE_TYPE );
if (sReferenceType == null || sReferenceType.length() == 0)
{
@@ -209,7 +209,7 @@ public class ParameterHelper
if (m_sPrinterName == null)
{
// PRINTER_NAME ----------
-
+
String sPrinterName = (String)getTestParameters().get( PropertyName.DOC_COMPARATOR_PRINTER_NAME );
if (sPrinterName == null || sPrinterName.length() == 0)
{
@@ -223,11 +223,11 @@ public class ParameterHelper
}
return m_sPrinterName;
}
-
+
PerformanceContainer m_aPerformanceContainer = null;
/**
* helper class for performance analyser features
- * @return
+ * @return
*/
public PerformanceContainer getPerformance()
{
@@ -237,17 +237,17 @@ public class ParameterHelper
}
return m_aPerformanceContainer;
}
-
+
/**
* Helper function to get the buildid of the current used OpenOffice.org
* out of the AppExecutionCommand the build ID
- * @return
+ * @return
*/
public String getBuildID()
{
String sAPP = (String)m_aCurrentParams.get(util.PropertyName.APP_EXECUTION_COMMAND);
// return getBuildID(sAPP);
-// TODO: here we need the getBuildID(string) method
+// TODO: here we need the getBuildID(string) method
String sBuildID = BuildID.getBuildID(sAPP);
return sBuildID;
}
@@ -260,10 +260,10 @@ public class ParameterHelper
return m_nResolutionInDPI;
}
// get methods
- public XMultiServiceFactory getMultiServiceFactory()
+ public XMultiServiceFactory getMultiServiceFactory()
{
XMultiServiceFactory xMSF = (XMultiServiceFactory)m_aCurrentParams.getMSF();
-
+
// check if MultiServiceFactory is given
if (getReferenceType().toLowerCase().equals("pdf") ||
getReferenceType().toLowerCase().equals("ps") ||
@@ -285,7 +285,7 @@ public class ParameterHelper
public boolean isHidden()
{
// HIDDEN
-
+
String sOfficeViewable = (String)m_aCurrentParams.get(PropertyName.OFFICE_VIEWABLE);
if (sOfficeViewable != null)
{
@@ -341,7 +341,7 @@ public class ParameterHelper
// if (m_sDefaultXMLFormatApplication == null)
// {
// // DEFAULT_XML_FORMAT_APP ------
-//
+//
// String sDefaultXMLFormatApp = (String)m_aCurrentParams.get( PropertyName.DOC_COMPARATOR_DEFAULT_XML_FORMAT_APP );
// if (sDefaultXMLFormatApp == null || sDefaultXMLFormatApp.length() == 0)
// {
@@ -355,7 +355,7 @@ public class ParameterHelper
// return m_sDefaultXMLFormatApplication;
// }
-
+
// Pages -------------------------------------------------------------------
/**
@@ -394,7 +394,7 @@ public class ParameterHelper
}
return true;
}
-
+
public boolean getOverwrite()
{
boolean bOverwrite = m_aCurrentParams.getBool( PropertyName.DOC_COMPARATOR_OVERWRITE_REFERENCE);
@@ -409,7 +409,7 @@ public class ParameterHelper
String sPrefix = (String)getTestParameters().get( PropertyName.DOC_COMPARATOR_HTML_OUTPUT_PREFIX );
if (sPrefix == null || sPrefix.length() == 0)
{
- GlobalLogWriter.println("Please set html prefix " + PropertyName.DOC_COMPARATOR_HTML_OUTPUT_PREFIX + "=prefix.");
+ GlobalLogWriter.println("Please set html prefix " + PropertyName.DOC_COMPARATOR_HTML_OUTPUT_PREFIX + "=prefix.");
}
else
{
diff --git a/qadevOOo/runner/graphical/PerformanceContainer.java b/qadevOOo/runner/graphical/PerformanceContainer.java
index ab3b292926e5..2b6fc4047408 100644
--- a/qadevOOo/runner/graphical/PerformanceContainer.java
+++ b/qadevOOo/runner/graphical/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
@@ -51,7 +51,7 @@ public class PerformanceContainer /* extends *//* implements */ {
{
m_nStartTime = _nStartTime;
}
-
+
/*
return the time, which is done until last startTime()
*/
@@ -65,7 +65,7 @@ public class PerformanceContainer /* extends *//* implements */ {
long nMeanTime = System.currentTimeMillis();
return nMeanTime - _nCurrentTimer;
}
-
+
/*
public long stopTimer()
{
@@ -90,7 +90,7 @@ public class PerformanceContainer /* extends *//* implements */ {
private long m_nTime[];
private String m_sMSOfficeVersion;
-
+
public PerformanceContainer()
{
m_nTime = new long[LAST_VALUE];
@@ -100,7 +100,7 @@ public class PerformanceContainer /* extends *//* implements */ {
m_nTime[i] = 0;
}
}
-
+
public void setTime(int _nIndex, long _nValue)
{
m_nTime[_nIndex] = _nValue;
@@ -109,12 +109,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]);
@@ -164,12 +164,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
@@ -215,7 +215,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);
@@ -246,7 +246,7 @@ public class PerformanceContainer /* extends *//* implements */ {
}
try
{
- aRandomAccessFile.close();
+ aRandomAccessFile.close();
}
catch (java.io.IOException ie)
{
diff --git a/qadevOOo/runner/graphical/PixelCounter.java b/qadevOOo/runner/graphical/PixelCounter.java
index e625c2a75b12..b18c9d89d9a6 100644
--- a/qadevOOo/runner/graphical/PixelCounter.java
+++ b/qadevOOo/runner/graphical/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
@@ -43,14 +43,14 @@ class CountNotWhite extends CountPixel
{
// System.out.println("CountWhite()");
}
-
+
public void countold(final int pixel)
{
// final int alpha = (pixel >> 24) & 0xff;
final int red = (pixel >> 16) & 0xff;
final int green = (pixel >> 8) & 0xff;
final int blue = (pixel ) & 0xff;
-
+
// System.out.println(String.valueOf(red) + ":" + String.valueOf(green) + ":" + String.valueOf(blue));
if (red == 0xff && green == 0xff && blue == 0xff)
{
@@ -89,14 +89,14 @@ class CountNotBlack extends CountPixel
{
// System.out.println("CountBlack()");
}
-
+
public void countold(final int pixel)
{
// final int alpha = (pixel >> 24) & 0xff;
final int red = (pixel >> 16) & 0xff;
final int green = (pixel >> 8) & 0xff;
final int blue = (pixel ) & 0xff;
-
+
if (red == 0x00 && green == 0x00 && blue == 0x00)
{
return;
@@ -139,7 +139,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
@@ -147,7 +147,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;
@@ -175,7 +175,7 @@ class graphics_stuff
countPixel(_aImage, 0, 0, w, h, aCountNotWhite);
return aCountNotWhite.getCount();
}
-
+
public static int countNotBlackPixel(ImageHelper _aImage)
{
final int w = _aImage.getWidth();
@@ -192,8 +192,8 @@ class graphics_stuff
public class PixelCounter {
// private Image m_aImage;
// ImageHelper m_aImage;
-
-
+
+
public int countNotWhitePixel(String _sFile)
throws java.io.IOException
{
@@ -209,14 +209,14 @@ public class PixelCounter {
final int nw = graphics_stuff.countNotBlackPixel(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
{
@@ -243,5 +243,5 @@ public class PixelCounter {
// */
// }
}
-
+
diff --git a/qadevOOo/runner/graphical/PostscriptCreator.java b/qadevOOo/runner/graphical/PostscriptCreator.java
index ab7ad4536fa6..33511df1e6b1 100644
--- a/qadevOOo/runner/graphical/PostscriptCreator.java
+++ b/qadevOOo/runner/graphical/PostscriptCreator.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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
@@ -50,12 +50,12 @@ public class PostscriptCreator extends EnhancedComplexTestCase
{
GlobalLogWriter.set(log);
ParameterHelper aParam = new ParameterHelper(param);
-
+
param.put(util.PropertyName.OFFICE_CLOSE_TIME_OUT, 2000);
// run through all documents found in Inputpath
foreachDocumentinInputPath(aParam);
}
-
+
public void checkOneFile(String _sDocumentName, String _sResult, ParameterHelper _aParams) throws OfficeException
{
@@ -69,9 +69,9 @@ public class PostscriptCreator extends EnhancedComplexTestCase
a.startTime(PerformanceContainer.OfficeStart);
aOffice.start();
a.stopTime(PerformanceContainer.OfficeStart);
-
+
// _aParams.getTestParameters().put(util.PropertyName.DEBUG_IS_ACTIVE, Boolean.FALSE);
-
+
// This force an error! _sDocumentName = helper.StringHelper.doubleQuote(_sDocumentName);
try
{
@@ -95,9 +95,9 @@ public class PostscriptCreator extends EnhancedComplexTestCase
}
}
-
-
-
+
+
+
// public static void main(String [] _args)
// {
// String args[] = {
diff --git a/qadevOOo/runner/graphical/PropertyName.java b/qadevOOo/runner/graphical/PropertyName.java
index 729fd0c33c38..3bad8536c8ed 100644
--- a/qadevOOo/runner/graphical/PropertyName.java
+++ b/qadevOOo/runner/graphical/PropertyName.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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/graphical/TimeHelper.java b/qadevOOo/runner/graphical/TimeHelper.java
index 057f9cd19494..016cd3154a2c 100644
--- a/qadevOOo/runner/graphical/TimeHelper.java
+++ b/qadevOOo/runner/graphical/TimeHelper.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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
@@ -58,7 +58,7 @@ public class TimeHelper
public TimeHelper()
{}
-
+
public void start()
{
m_bIsStopped = false;
@@ -77,7 +77,7 @@ public class TimeHelper
// add a minute
m_nSeconds += 60;
}
-
+
int nMilliSeconds = cal.get(Calendar.MILLISECOND);
m_nMilliSeconds = nMilliSeconds - m_nMilliSeconds;
m_nRealMilliSeconds = m_nSeconds * 1000 + m_nMilliSeconds;
diff --git a/qadevOOo/runner/graphical/WrongEnvironmentException.java b/qadevOOo/runner/graphical/WrongEnvironmentException.java
index 24ab5532b2e7..49ba0afca098 100644
--- a/qadevOOo/runner/graphical/WrongEnvironmentException.java
+++ b/qadevOOo/runner/graphical/WrongEnvironmentException.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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
@@ -33,7 +33,7 @@ package graphical;
*
* @author ll93751
*/
-public class WrongEnvironmentException extends OfficeException
+public class WrongEnvironmentException extends OfficeException
{
public WrongEnvironmentException(String _aMessage)
{
diff --git a/qadevOOo/runner/graphical/WrongSuffixException.java b/qadevOOo/runner/graphical/WrongSuffixException.java
index d8632ea50e72..e99ce9bcd972 100644
--- a/qadevOOo/runner/graphical/WrongSuffixException.java
+++ b/qadevOOo/runner/graphical/WrongSuffixException.java
@@ -1,8 +1,8 @@
/*
* ************************************************************************
- *
+ *
* 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
@@ -33,7 +33,7 @@ package graphical;
*
* @author ll93751
*/
-public class WrongSuffixException extends OfficeException
+public class WrongSuffixException extends OfficeException
{
public WrongSuffixException(String _aMessage)
{