summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/convwatch
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/convwatch')
-rw-r--r--qadevOOo/runner/convwatch/BorderRemover.java5
-rw-r--r--qadevOOo/runner/convwatch/BuildID.java1
-rw-r--r--qadevOOo/runner/convwatch/ConvWatch.java12
-rw-r--r--qadevOOo/runner/convwatch/DB.java7
-rw-r--r--qadevOOo/runner/convwatch/DBHelper.java1
-rw-r--r--qadevOOo/runner/convwatch/DocumentConverter.java5
-rw-r--r--qadevOOo/runner/convwatch/EnhancedComplexTestCase.java3
-rw-r--r--qadevOOo/runner/convwatch/FileHelper.java9
-rw-r--r--qadevOOo/runner/convwatch/FilenameHelper.java10
-rw-r--r--qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java3
-rw-r--r--qadevOOo/runner/convwatch/IniFile.java2
-rw-r--r--qadevOOo/runner/convwatch/MSOfficePrint.java2
-rw-r--r--qadevOOo/runner/convwatch/OfficePrint.java11
-rw-r--r--qadevOOo/runner/convwatch/PRNCompare.java10
-rw-r--r--qadevOOo/runner/convwatch/PerformanceContainer.java3
-rw-r--r--qadevOOo/runner/convwatch/PixelCounter.java7
-rw-r--r--qadevOOo/runner/convwatch/ReferenceBuilder.java5
-rw-r--r--qadevOOo/runner/convwatch/ReportDesignerTest.java7
18 files changed, 24 insertions, 79 deletions
diff --git a/qadevOOo/runner/convwatch/BorderRemover.java b/qadevOOo/runner/convwatch/BorderRemover.java
index e9a81c93bcb6..c3290fc47713 100644
--- a/qadevOOo/runner/convwatch/BorderRemover.java
+++ b/qadevOOo/runner/convwatch/BorderRemover.java
@@ -160,10 +160,7 @@ class BorderRemover
Method getWriterMIMETypesMethod = imageIOClass.getDeclaredMethod("getWriterMIMETypes", new Class[]{ });
// GlobalLogWriter.get().println("Hello World: get Methode");
- Object aObj = getWriterMIMETypesMethod.invoke(imageIOClass, new Object[]{ });
- String[] types = (String[])aObj;
- // GlobalLogWriter.get().println("Hello World: types: " + Arrays.asList(types) );
-
+ getWriterMIMETypesMethod.invoke(imageIOClass, new Object[]{ });
Method writeMethod = imageIOClass.getDeclaredMethod("write", new Class[]{ java.awt.image.RenderedImage.class,
java.lang.String.class,
java.io.File.class});
diff --git a/qadevOOo/runner/convwatch/BuildID.java b/qadevOOo/runner/convwatch/BuildID.java
index f1e3b46a7443..bca1d869ac02 100644
--- a/qadevOOo/runner/convwatch/BuildID.java
+++ b/qadevOOo/runner/convwatch/BuildID.java
@@ -74,7 +74,6 @@ public class BuildID
GlobalLogWriter.get().println("soffice executable not found.");
}
- int dummy = 0;
return sBuildID;
}
diff --git a/qadevOOo/runner/convwatch/ConvWatch.java b/qadevOOo/runner/convwatch/ConvWatch.java
index a846e4b739fc..b117d5749803 100644
--- a/qadevOOo/runner/convwatch/ConvWatch.java
+++ b/qadevOOo/runner/convwatch/ConvWatch.java
@@ -131,8 +131,7 @@ public class ConvWatch
String sInputFile = FileHelper.getBasename(_sAbsoluteInputFile);
// System.out.println("InputFile: " + sInputFile);
- String sInputFileNoSuffix = FileHelper.getNameNoSuffix(sInputFile);
- // System.out.println("BasenameNoSuffix: " + sInputFileNoSuffix);
+ FileHelper.getNameNoSuffix(sInputFile);
String sAbsoluteOutputFile = _sOutputPath + fs + sInputFile;
@@ -219,8 +218,7 @@ public class ConvWatch
// This creates a status for exact on document
static boolean createINIStatus(StatusHelper[] aList, String _sFilenamePrefix, String _sOutputPath, String _sAbsoluteInputFile, String _sBuildID, String _sRefBuildID)
{
- // Status
- String fs = System.getProperty("file.separator");
+ System.getProperty("file.separator");
String sBasename = FileHelper.getBasename(_sAbsoluteInputFile);
String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
// String sHTMLFile = _sFilenamePrefix + sNameNoSuffix + ".html";
@@ -290,8 +288,7 @@ public class ConvWatch
static void createINIStatus_DiffDiff(StatusHelper[] aDiffDiffList, String _sFilenamePrefix, String _sOutputPath, String _sAbsoluteInputFile, String _sBuildID)
{
- // Status
- String fs = System.getProperty("file.separator");
+ System.getProperty("file.separator");
String sBasename = FileHelper.getBasename(_sAbsoluteInputFile);
String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini";
@@ -357,8 +354,7 @@ public class ConvWatch
_aGTA.setBorderMove(TriState.FALSE);
StatusHelper[] aList = a.createPostscriptStartCheck(_aGTA, _sOutputPath, _sAbsoluteInputFile, _sAbsoluteReferenceFile);
- // Status
- boolean bResultIsOk = createINIStatus(aList, "", _sOutputPath, _sAbsoluteInputFile, _aGTA.getBuildID(), _aGTA.getRefBuildID());
+ createINIStatus(aList, "", _sOutputPath, _sAbsoluteInputFile, _aGTA.getBuildID(), _aGTA.getRefBuildID());
StatusHelper[] aDiffDiffList = new StatusHelper[aList.length];
diff --git a/qadevOOo/runner/convwatch/DB.java b/qadevOOo/runner/convwatch/DB.java
index 57d831c0b7a7..c4f68e76c502 100644
--- a/qadevOOo/runner/convwatch/DB.java
+++ b/qadevOOo/runner/convwatch/DB.java
@@ -46,7 +46,6 @@ public class DB extends DBHelper
private String m_sSourceVersion;
private String m_sDestinationVersion;
private String m_sDocumentPool;
- private String m_sEnvironment;
private String m_sDocID;
private String m_sDBDistinct;
@@ -154,7 +153,7 @@ public class DB extends DBHelper
private void fillVariables(String _sInfo)
{
fillDBConnection(_sInfo);
- m_sEnvironment = getEnvironment();
+ getEnvironment();
StringTokenizer aTokenizer = new StringTokenizer(_sInfo,",",false);
while (aTokenizer.hasMoreTokens())
@@ -257,7 +256,6 @@ public class DB extends DBHelper
public ArrayList<String> QuerySQL(Connection _aCon, String _sSQL)
{
java.sql.Statement oStmt = null;
- Connection oCon = null;
ArrayList<String> aResultList = new ArrayList<String>();
try
{
@@ -278,9 +276,6 @@ public class DB extends DBHelper
StringBuffer aResult = new StringBuffer();
try
{
- Object aObj = null;
-
-
aResult.append("sqlresult: ");
for (int i=1;i<=nColumnCount;i++)
{
diff --git a/qadevOOo/runner/convwatch/DBHelper.java b/qadevOOo/runner/convwatch/DBHelper.java
index be86e77317d3..9dc9b253a8de 100644
--- a/qadevOOo/runner/convwatch/DBHelper.java
+++ b/qadevOOo/runner/convwatch/DBHelper.java
@@ -201,7 +201,6 @@ public class DBHelper
throws ValueNotFoundException
{
Statement oStmt = null;
- Connection oCon = null;
int nValue = 0;
try
{
diff --git a/qadevOOo/runner/convwatch/DocumentConverter.java b/qadevOOo/runner/convwatch/DocumentConverter.java
index fce3456b57a8..32cbbca8f8ee 100644
--- a/qadevOOo/runner/convwatch/DocumentConverter.java
+++ b/qadevOOo/runner/convwatch/DocumentConverter.java
@@ -81,15 +81,12 @@ public class DocumentConverter extends EnhancedComplexTestCase
// The test method itself.
private String m_sInputPath = "";
private String m_sReferencePath = "";
- private boolean m_bIncludeSubdirectories = true;
-
void initMember()
{
// MUST PARAMETER
// INPUT_PATH ----------
String sINPATH = (String)param.get( PropertyName.DOC_COMPARATOR_INPUT_PATH );
boolean bQuit = false;
- String sError = "";
if (sINPATH == null || sINPATH.length() == 0)
{
log.println("Please set input path (path to documents) " + PropertyName.DOC_COMPARATOR_INPUT_PATH + "=path.");
@@ -161,7 +158,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
{
String fs = System.getProperty("file.separator");
- String sRemovePath = aInputPath.getAbsolutePath();
+ aInputPath.getAbsolutePath();
// a whole directory
FileFilter aFileFilter = FileHelper.getFileFilter();
diff --git a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
index e169d9fb84ee..3257d13f0f56 100644
--- a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
@@ -40,10 +40,9 @@ public abstract class EnhancedComplexTestCase extends ComplexTestCase
void checkExistance(String _sScriptFile, String _sName)
{
- boolean bBackValue = false;
// Process testshl = Runtime.getRuntime().exec(scriptFile);
ProcessHandler aHandler = new ProcessHandler(_sScriptFile);
- bBackValue = aHandler.executeSynchronously();
+ aHandler.executeSynchronously();
TimeHelper.waitInSeconds(1, "wait after ProcessHandler.executeSynchronously()");
StringBuffer aBuffer = new StringBuffer();
diff --git a/qadevOOo/runner/convwatch/FileHelper.java b/qadevOOo/runner/convwatch/FileHelper.java
index 44855f3b6f19..202f3d7712a7 100644
--- a/qadevOOo/runner/convwatch/FileHelper.java
+++ b/qadevOOo/runner/convwatch/FileHelper.java
@@ -271,12 +271,9 @@ public class FileHelper
public static void test_removeFirstDirectorysAndBasenameFrom()
{
- String a = removeFirstDirectorysAndBasenameFrom("/a/b/c/d/e/f.g", "/a/b/c");
- // assure("", a.equals("d/e"));
- String b = removeFirstDirectorysAndBasenameFrom("/a/b/c/d/e/f.g", "/a/b/c/");
- // assure("", b.equals("d/e"));
- String c = removeFirstDirectorysAndBasenameFrom("/a/b/c/d/e/f.g", "/b/c");
- // assure("", c.equals("a/b/c/d/e"));
+ removeFirstDirectorysAndBasenameFrom("/a/b/c/d/e/f.g", "/a/b/c");
+ removeFirstDirectorysAndBasenameFrom("/a/b/c/d/e/f.g", "/a/b/c/");
+ removeFirstDirectorysAndBasenameFrom("/a/b/c/d/e/f.g", "/b/c");
}
diff --git a/qadevOOo/runner/convwatch/FilenameHelper.java b/qadevOOo/runner/convwatch/FilenameHelper.java
index 89dd8daaa81e..d3bda9944d9e 100644
--- a/qadevOOo/runner/convwatch/FilenameHelper.java
+++ b/qadevOOo/runner/convwatch/FilenameHelper.java
@@ -373,11 +373,11 @@ public class FilenameHelper
System.out.println("URL: " + d.getFileURL());
System.out.println("Filename: " + d.getFilename());
- OriginalReferenceFilename a = new OriginalReferenceFilename("/dir1/dir2/", "name",".ext");
- OriginalReferenceFilename a1 = new OriginalReferenceFilename("/dir1/dir2","name.ext","");
- OriginalReferenceFilename a2 = new OriginalReferenceFilename("/dir1/dir2","/name.ext","");
- OriginalReferenceFilename a3 = new OriginalReferenceFilename("/dir1/dir2","/name",".ext");
- OriginalReferenceFilename a4 = new OriginalReferenceFilename("/dir1/dir2","name","ext");
+ new OriginalReferenceFilename("/dir1/dir2/", "name",".ext");
+ new OriginalReferenceFilename("/dir1/dir2","name.ext","");
+ new OriginalReferenceFilename("/dir1/dir2","/name.ext","");
+ new OriginalReferenceFilename("/dir1/dir2","/name",".ext");
+ new OriginalReferenceFilename("/dir1/dir2","name","ext");
// OriginalReferenceFilename b = new OriginalReferenceFilename("c:/dir1/dir2/name.ext");
diff --git a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
index 64d5fa244acf..7bf52fd11dad 100644
--- a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
+++ b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java
@@ -66,8 +66,7 @@ public class GraphicalDifferenceCheck
{
String fs = System.getProperty("file.separator");
- String sRemovePath = aInputPath.getAbsolutePath();
- // a whole directory
+ aInputPath.getAbsolutePath();
Object[] aList = DirectoryHelper.traverse(_sInputPath, FileHelper.getFileFilter(), _aGTA.includeSubDirectories());
for (int i=0;i<aList.length;i++)
diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java
index 8b08c8e21601..e64189531f95 100644
--- a/qadevOOo/runner/convwatch/IniFile.java
+++ b/qadevOOo/runner/convwatch/IniFile.java
@@ -246,7 +246,7 @@ class IniFile
int nEqual = sLine.indexOf("=");
if (nEqual >= 0)
{
- String sKey = sLine.substring(0, nEqual).trim();
+ sLine.substring(0, nEqual).trim();
String sValue = sLine.substring(nEqual + 1).trim();
return sValue;
}
diff --git a/qadevOOo/runner/convwatch/MSOfficePrint.java b/qadevOOo/runner/convwatch/MSOfficePrint.java
index 87fbdd4136c8..92b781d4d2c6 100644
--- a/qadevOOo/runner/convwatch/MSOfficePrint.java
+++ b/qadevOOo/runner/convwatch/MSOfficePrint.java
@@ -270,7 +270,7 @@ public class MSOfficePrint
ProcessHandler aHandler = new ProcessHandler(aList);
- boolean bBackValue = aHandler.executeSynchronously();
+ aHandler.executeSynchronously();
}
catch (IndexOutOfBoundsException e)
{
diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java
index 0863bedba0e6..2f579c95474d 100644
--- a/qadevOOo/runner/convwatch/OfficePrint.java
+++ b/qadevOOo/runner/convwatch/OfficePrint.java
@@ -857,8 +857,6 @@ public class OfficePrint {
String _sPrintFileURL) throws ConvWatchCancelException
{
boolean bBack = false;
- String sPrintFileURL = null;
-
// check if given file is a picture, then do nothing
String sDocumentSuffix = FileHelper.getSuffix(_sInputFileURL);
if (sDocumentSuffix.toLowerCase().endsWith(".png") ||
@@ -1004,7 +1002,6 @@ public class OfficePrint {
}
Object[] aElements = null;
- String[] aExtensions;
try
{
aElements = (Object[]) aNameAccess.getByName(_sFilterName);
@@ -1082,7 +1079,6 @@ public class OfficePrint {
}
Object[] aElements = null;
- String[] aExtensions;
try
{
aElements = (Object[]) aNameAccess.getByName(_sFilterName);
@@ -1262,13 +1258,6 @@ public class OfficePrint {
String sFilterName = _aGTA.getExportFilterName();
- // check how many Properties should initialize
- int nPropertyCount = 0;
- // if (sFilterName != null && sFilterName.length() > 0)
- // {
- // nPropertyCount ++;
- // }
-
// initialize PropertyArray
// PropertyValue [] aStoreProps = new PropertyValue[ nPropertyCount ];
// int nPropertyIndex = 0;
diff --git a/qadevOOo/runner/convwatch/PRNCompare.java b/qadevOOo/runner/convwatch/PRNCompare.java
index 5c0602eff25c..73e2bd536047 100644
--- a/qadevOOo/runner/convwatch/PRNCompare.java
+++ b/qadevOOo/runner/convwatch/PRNCompare.java
@@ -61,7 +61,7 @@ public class PRNCompare
// System.out.println(_sCommand);
ProcessHandler aHandler = new ProcessHandler(_sCommand);
- boolean bBackValue = aHandler.executeSynchronously();
+ aHandler.executeSynchronously();
String sText = aHandler.getOutputText();
@@ -223,14 +223,12 @@ public class PRNCompare
String sJPGFilename = getJPEGName(_sOutputPath, _sSourceFile, sGS_PageOutput);
String sOriginalFile = _sSourcePath + fs + _sSourceFile;
- String sCommand;
String sGS = "gs";
if (OSHelper.isWindows())
{
sGS = "gswin32c.exe";
}
- sCommand = sGS + " -dNOPROMPT -dBATCH -sDEVICE=jpeg -r" + String.valueOf(_nResolutionInDPI) + " -dNOPAUSE -sOutputFile=" + StringHelper.doubleQuoteIfNeed(sJPGFilename) + " " + StringHelper.doubleQuoteIfNeed(sOriginalFile);
String[] sCommandArray =
{
sGS,
@@ -252,7 +250,7 @@ public class PRNCompare
// System.out.println("done");
ProcessHandler aHandler = new ProcessHandler(sCommandArray);
- boolean bBackValue = aHandler.executeSynchronously();
+ aHandler.executeSynchronously();
// TODO: return a real filename, due to the fact we don't know how much files are created, maybe better to return a list
@@ -566,7 +564,7 @@ public class PRNCompare
};
ProcessHandler aHandler = new ProcessHandler(sCommandArray);
- boolean bBackValue = aHandler.executeSynchronously();
+ aHandler.executeSynchronously();
String sBack = aHandler.getOutputText();
GlobalLogWriter.get().println("'" + sBack + "'");
@@ -610,7 +608,7 @@ public class PRNCompare
_sDiffGfx
};
ProcessHandler aHandler = new ProcessHandler(sCommandArray);
- boolean bBackValue = aHandler.executeSynchronously();
+ aHandler.executeSynchronously();
String sBack = aHandler.getOutputText();
GlobalLogWriter.get().println("'" + sBack + "'");
diff --git a/qadevOOo/runner/convwatch/PerformanceContainer.java b/qadevOOo/runner/convwatch/PerformanceContainer.java
index a1954f66df38..c4253c2ef6cf 100644
--- a/qadevOOo/runner/convwatch/PerformanceContainer.java
+++ b/qadevOOo/runner/convwatch/PerformanceContainer.java
@@ -25,8 +25,6 @@ import java.lang.Double;
public class PerformanceContainer /* extends *//* implements */ {
- private long m_nStartTime;
-
/*
simple helper functions to start/stop a timer, to know how long a process need in milliseconds
*/
@@ -36,7 +34,6 @@ public class PerformanceContainer /* extends *//* implements */ {
}
public void setStartTime(long _nStartTime)
{
- m_nStartTime = _nStartTime;
}
/*
diff --git a/qadevOOo/runner/convwatch/PixelCounter.java b/qadevOOo/runner/convwatch/PixelCounter.java
index cace28992111..bf110ebba3ed 100644
--- a/qadevOOo/runner/convwatch/PixelCounter.java
+++ b/qadevOOo/runner/convwatch/PixelCounter.java
@@ -39,7 +39,6 @@ class CountNotWhite extends CountPixel
public void count(int pixel)
{
- int alpha = (pixel >> 24) & 0xff;
int red = (pixel >> 16) & 0xff;
int green = (pixel >> 8) & 0xff;
int blue = (pixel ) & 0xff;
@@ -63,7 +62,6 @@ class CountNotBlack extends CountPixel
public void count(int pixel)
{
- int alpha = (pixel >> 24) & 0xff;
int red = (pixel >> 16) & 0xff;
int green = (pixel >> 8) & 0xff;
int blue = (pixel ) & 0xff;
@@ -99,11 +97,6 @@ class graphics_stuff
public static void handlesinglepixel(int x, int y, int pixel)
{
- int alpha = (pixel >> 24) & 0xff;
- int red = (pixel >> 16) & 0xff;
- int green = (pixel >> 8) & 0xff;
- int blue = (pixel ) & 0xff;
- // Deal with the pixel as necessary...
}
public static void countPixel(ImageHelper img, int _x, int _y, int _w, int _h, CountPixel _aPixelCounter)
diff --git a/qadevOOo/runner/convwatch/ReferenceBuilder.java b/qadevOOo/runner/convwatch/ReferenceBuilder.java
index d3cf71afc5e3..7d99383f903b 100644
--- a/qadevOOo/runner/convwatch/ReferenceBuilder.java
+++ b/qadevOOo/runner/convwatch/ReferenceBuilder.java
@@ -81,15 +81,12 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
// The test method itself.
private String m_sInputPath = "";
private String m_sReferencePath = "";
- private boolean m_bIncludeSubdirectories = true;
-
void initMember()
{
// MUST PARAMETER
// INPUT_PATH ----------
String sINPATH = (String)param.get( PropertyName.DOC_COMPARATOR_INPUT_PATH );
boolean bQuit = false;
- String sError = "";
if (sINPATH == null || sINPATH.length() == 0)
{
log.println("Please set input path (path to documents) " + PropertyName.DOC_COMPARATOR_INPUT_PATH + "=path.");
@@ -165,7 +162,7 @@ public class ReferenceBuilder extends EnhancedComplexTestCase
{
String fs = System.getProperty("file.separator");
- String sRemovePath = aInputPath.getAbsolutePath();
+ aInputPath.getAbsolutePath();
// a whole directory
FileFilter aFileFilter = FileHelper.getFileFilter();
diff --git a/qadevOOo/runner/convwatch/ReportDesignerTest.java b/qadevOOo/runner/convwatch/ReportDesignerTest.java
index 3220fc95004d..a70bbc58176f 100644
--- a/qadevOOo/runner/convwatch/ReportDesignerTest.java
+++ b/qadevOOo/runner/convwatch/ReportDesignerTest.java
@@ -263,9 +263,6 @@ public class ReportDesignerTest extends ComplexTestCase {
private static String m_sSourceName;
private static String m_sDestinationName;
- private static final int WRITER = 1;
- private static final int CALC = 2;
-
/**
* This is the main test Function of current ReportDesignerTest
*/
@@ -466,15 +463,11 @@ public class ReportDesignerTest extends ComplexTestCase {
log.println("DBConnection: " + sDBConnection);
DB.init(sDBConnection);
- // String sFixRefSubDirectory = "ReportDesign_qa_complex_" + getFileFormat(_nType);
- String sFixRefSubDirectory = "ReportDesignFixRef";
-
String sSourceVersion = m_sSourceVersion;
// String sSourceVersion = sFixRefSubDirectory;
String sSourceName = m_sSourceName;
// String sSourceCreatorType = "fixref";
String sSourceCreatorType = "";
- String sDestinationVersion = m_sDestinationVersion;
// if (sDestinationVersion.length() == 0)
// {
// sDestinationVersion = m_sUPDMinor;