summaryrefslogtreecommitdiff
path: root/qadevOOo/runner
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-18 13:32:37 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-11-24 20:45:17 +0000
commitfe095dada4e83129d49c8cc50501aa224d61e0f9 (patch)
treed351b1938c77c2640438dfc3427fabb8092baca3 /qadevOOo/runner
parentdf633ac5487fd566fbf526808bb015112bd38e77 (diff)
java,qadev: remove unused parameters and local vars
Change-Id: Ifb9f9374051fe88dc4cd5a7a28b2c8c992ced873 Reviewed-on: https://gerrit.libreoffice.org/13097 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'qadevOOo/runner')
-rw-r--r--qadevOOo/runner/convwatch/ConvWatch.java5
-rw-r--r--qadevOOo/runner/convwatch/ConvWatchStarter.java2
-rw-r--r--qadevOOo/runner/convwatch/GraphicalTestArguments.java2
-rw-r--r--qadevOOo/runner/convwatch/HTMLOutputter.java294
-rw-r--r--qadevOOo/runner/convwatch/INIOutputter.java4
-rw-r--r--qadevOOo/runner/convwatch/IniFile.java1
-rw-r--r--qadevOOo/runner/util/DBTools.java35
-rw-r--r--qadevOOo/runner/util/SysUtils.java12
-rw-r--r--qadevOOo/runner/util/UITools.java28
9 files changed, 133 insertions, 250 deletions
diff --git a/qadevOOo/runner/convwatch/ConvWatch.java b/qadevOOo/runner/convwatch/ConvWatch.java
index b1591d40ac09..1c4ac3d08e6b 100644
--- a/qadevOOo/runner/convwatch/ConvWatch.java
+++ b/qadevOOo/runner/convwatch/ConvWatch.java
@@ -157,7 +157,6 @@ public class ConvWatch
}
PRNCompare a = new PRNCompare();
- String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
String sReferencePath = FileHelper.getPath(_sAbsoluteReferenceFile);
a.setReferencePath( sReferencePath );
@@ -203,7 +202,7 @@ public class ConvWatch
// Status end
String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini";
- INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, "");
+ INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile);
INIoutput.createHeader();
// TODO: version info was fine
@@ -265,7 +264,7 @@ public class ConvWatch
String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini";
- INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, _sFilenamePrefix);
+ INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile);
INIoutput.createHeader();
// LLA? what if the are no values in the list? true or false;
INIoutput.writeSection("global");
diff --git a/qadevOOo/runner/convwatch/ConvWatchStarter.java b/qadevOOo/runner/convwatch/ConvWatchStarter.java
index 9c0616252454..520f85079ca9 100644
--- a/qadevOOo/runner/convwatch/ConvWatchStarter.java
+++ b/qadevOOo/runner/convwatch/ConvWatchStarter.java
@@ -200,7 +200,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
sHTMLName = m_sInputPath.substring(n + 1);
sHTMLName += ".html";
}
- HTMLOutputter HTMLoutput = HTMLOutputter.create(m_sOutputPath, sHTMLName, "");
+ HTMLOutputter HTMLoutput = HTMLOutputter.create(m_sOutputPath, sHTMLName);
HTMLoutput.header( m_sOutputPath );
HTMLoutput.indexSection( m_sOutputPath );
LISTOutputter LISToutput = LISTOutputter.create(m_sOutputPath, "allfiles.txt");
diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
index d5cc3c4f5800..2d35b9669eed 100644
--- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java
+++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java
@@ -234,8 +234,6 @@ public class GraphicalTestArguments
// m_tWithBorderMove = TriState.UNSET;
}
- String sLeaveOutNames = (String)param.get(PropertyName.DOC_COMPARATOR_LEAVE_OUT_FILES);
-
String sDBInfoString = (String)param.get(PropertyName.DOC_COMPARATOR_DB_INFO_STRING);
if (sDBInfoString != null)
{
diff --git a/qadevOOo/runner/convwatch/HTMLOutputter.java b/qadevOOo/runner/convwatch/HTMLOutputter.java
index 087101c97576..9f5b650ea757 100644
--- a/qadevOOo/runner/convwatch/HTMLOutputter.java
+++ b/qadevOOo/runner/convwatch/HTMLOutputter.java
@@ -22,197 +22,157 @@ import java.io.File;
import java.io.FileWriter;
import helper.OSHelper;
-public class HTMLOutputter
-{
+public class HTMLOutputter {
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)
*/
private String ls;
- HTMLOutputter() {}
- public static HTMLOutputter create( String _sOutputPath, String _sHTMLFilename, String _sNamePrefix )
- {
- FileHelper.makeDirectories("", _sOutputPath);
- HTMLOutputter a = new HTMLOutputter();
- String fs = System.getProperty("file.separator");
- String sFilename = _sOutputPath + fs + _sHTMLFilename;
-
- try
- {
- File outputFile = new File(sFilename);
- a.m_aOut = new FileWriter(outputFile.toString());
- a.ls = System.getProperty("line.separator");
- }
- catch (java.io.IOException e)
- {
- e.printStackTrace();
- GlobalLogWriter.get().println("ERROR: Can't create HTML Outputter");
- return null;
- }
- a.m_sFilename = sFilename;
- a.m_sNamePrefix = _sNamePrefix;
- return a;
+ HTMLOutputter() {
+ }
+
+ public static HTMLOutputter create(String _sOutputPath,
+ String _sHTMLFilename) {
+ FileHelper.makeDirectories("", _sOutputPath);
+ HTMLOutputter a = new HTMLOutputter();
+ String fs = System.getProperty("file.separator");
+ String sFilename = _sOutputPath + fs + _sHTMLFilename;
+
+ try {
+ File outputFile = new File(sFilename);
+ a.m_aOut = new FileWriter(outputFile.toString());
+ a.ls = System.getProperty("line.separator");
+ } catch (java.io.IOException e) {
+ e.printStackTrace();
+ GlobalLogWriter.get().println("ERROR: Can't create HTML Outputter");
+ return null;
}
- public String getFilename() {return m_sFilename;}
-
- public void header(String _sTitle)
- {
- try
- {
- m_aOut.write( "<html>" + ls);
- m_aOut.write( "<head>" + ls);
- m_aOut.write( "<title>" + _sTitle + "</title>" + ls);
- m_aOut.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/xmloff.css\" media=\"screen\" />" + ls);
- m_aOut.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/style.css\" media=\"screen\" />" + ls);
- m_aOut.write( "</head>" + ls);
- m_aOut.write( "<body bgcolor=white>" + ls);
- m_aOut.flush();
- }
- catch (java.io.IOException e)
- {
- }
+ a.m_sFilename = sFilename;
+ return a;
+ }
+
+ public String getFilename() {
+ return m_sFilename;
+ }
+
+ public void header(String _sTitle) {
+ try {
+ m_aOut.write("<html>" + ls);
+ m_aOut.write("<head>" + ls);
+ m_aOut.write("<title>" + _sTitle + "</title>" + ls);
+ m_aOut.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/xmloff.css\" media=\"screen\" />"
+ + ls);
+ m_aOut.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/style.css\" media=\"screen\" />"
+ + ls);
+ m_aOut.write("</head>" + ls);
+ m_aOut.write("<body bgcolor=white>" + ls);
+ m_aOut.flush();
+ } catch (java.io.IOException e) {
}
+ }
private final static String TEST_TABLETITLE = "Test";
private final static String VISUAL_STATUS_TABLETITLE = "Visual status";
private final static String VISUAL_STATUS_MESSAGE_TABLETITLE = "Message";
- public void indexSection(String _sOfficeInfo)
- {
- try
- {
- m_aOut.write( "<h2>Results for " + _sOfficeInfo + "</h2>" + ls);
- m_aOut.write( "<p>Legend:<br>");
- m_aOut.write( stronghtml(FIRSTGFX_TABLETITLE) + " contains the output printed via 'ghostscript' as a jpeg picture.<br>");
-
- m_aOut.write( "<table class=\"infotable\">" + ls);
- m_aOut.write( "<TR>");
- m_aOut.write( tableHeaderCell(TEST_TABLETITLE));
- m_aOut.write( tableHeaderCell(TEST_TABLETITLE));
- m_aOut.write( tableHeaderCell(VISUAL_STATUS_TABLETITLE));
- m_aOut.write( tableHeaderCell(VISUAL_STATUS_MESSAGE_TABLETITLE));
- m_aOut.write( "</TR>" + ls);
- m_aOut.flush();
- }
- catch (java.io.IOException e)
- {
- }
+ public void indexSection(String _sOfficeInfo) {
+ try {
+ m_aOut.write("<h2>Results for " + _sOfficeInfo + "</h2>" + ls);
+ m_aOut.write("<p>Legend:<br>");
+ m_aOut.write(stronghtml(FIRSTGFX_TABLETITLE)
+ + " contains the output printed via 'ghostscript' as a jpeg picture.<br>");
+
+ m_aOut.write("<table class=\"infotable\">" + ls);
+ m_aOut.write("<TR>");
+ m_aOut.write(tableHeaderCell(TEST_TABLETITLE));
+ m_aOut.write(tableHeaderCell(TEST_TABLETITLE));
+ m_aOut.write(tableHeaderCell(VISUAL_STATUS_TABLETITLE));
+ m_aOut.write(tableHeaderCell(VISUAL_STATUS_MESSAGE_TABLETITLE));
+ m_aOut.write("</TR>" + ls);
+ m_aOut.flush();
+ } catch (java.io.IOException e) {
}
+ }
+
+ private String getHREF(String _sHREF, String _sPathInfo) {
+ StringBuffer a = new StringBuffer();
+ if (!OSHelper.isWindows()) {
+ a.append("<A HREF=\"");
+ a.append(_sHREF);
+ a.append("\">");
+ a.append(_sPathInfo);
+ a.append("</A>");
+ } else {
+ // ! this should be replaced by a better method
+ // ! name(WIN|UNIX)
+ a.append("<A HREF=\"");
+ a.append(_sHREF);
+ a.append("\">");
+ a.append(_sPathInfo);
+ a.append("</A>");
- private String getHREF(String _sHREF, String _sPathInfo)
- {
- StringBuffer a = new StringBuffer();
- if (! OSHelper.isWindows())
- {
- a.append("<A HREF=\"");
- a.append(_sHREF);
- a.append("\">");
- a.append(_sPathInfo);
- a.append("</A>");
- }
- else
- {
- //! this should be replaced by a better method
- //! name(WIN|UNIX)
- a.append("<A HREF=\"");
- a.append(_sHREF);
- a.append("\">");
- a.append(_sPathInfo);
- a.append("</A>");
-
- }
- return a.toString();
}
+ return a.toString();
+ }
+
+ private String tableDataCell(String _sValue) {
+ StringBuffer a = new StringBuffer();
+ a.append("<TD>");
+ a.append(_sValue);
+ a.append("</TD>");
+ return a.toString();
+ }
+
+ private String tableHeaderCell(String _sValue) {
+ StringBuffer a = new StringBuffer();
+ a.append("<TH>");
+ a.append(_sValue);
+ a.append("</TH>");
+ return a.toString();
+ }
+
+ public void indexLine(String _sHTMLFile, String _sHTMLName,
+ String _sHTMLFile2, String _sHTMLName2, String _sStatusRunThrough,
+ String _sStatusMessage) {
+ try {
+ m_aOut.write("<TR>");
+ m_aOut.write(tableDataCell(getHREF(_sHTMLFile, _sHTMLName)));
+ if (_sHTMLFile2.length() > 0) {
+ m_aOut.write(tableDataCell(getHREF(_sHTMLFile2, _sHTMLName2)));
+ } else {
+ m_aOut.write(tableDataCell(""));
+ }
- private String tableDataCell(String _sValue)
- {
- StringBuffer a = new StringBuffer();
- a.append("<TD>");
- a.append(_sValue);
- a.append("</TD>");
- return a.toString();
- }
+ m_aOut.write(tableDataCell(_sStatusRunThrough));
+ m_aOut.write(tableDataCell(_sStatusMessage));
+ m_aOut.write("</TR>" + ls);
- private String tableHeaderCell(String _sValue)
- {
- StringBuffer a = new StringBuffer();
- a.append("<TH>");
- a.append(_sValue);
- a.append("</TH>");
- return a.toString();
- }
-
- public void indexLine(String _sHTMLFile, String _sHTMLName, String _sHTMLFile2, String _sHTMLName2, String _sStatusRunThrough, String _sStatusMessage)
- {
- try
- {
- m_aOut.write( "<TR>");
- m_aOut.write(tableDataCell( getHREF(_sHTMLFile, _sHTMLName) ) );
- if (_sHTMLFile2.length() > 0)
- {
- m_aOut.write(tableDataCell( getHREF(_sHTMLFile2, _sHTMLName2) ) );
- }
- else
- {
- m_aOut.write(tableDataCell( "" ) );
- }
-
- m_aOut.write( tableDataCell(_sStatusRunThrough) );
- m_aOut.write( tableDataCell(_sStatusMessage) );
- m_aOut.write( "</TR>" + ls);
-
- m_aOut.flush();
- }
- catch (java.io.IOException e)
- {
- }
+ m_aOut.flush();
+ } catch (java.io.IOException e) {
}
-
- public void close()
- {
- try
- {
- m_aOut.write( "</TABLE>" + ls);
- m_aOut.write( "</BODY></HTML>" + ls);
- m_aOut.flush();
- m_aOut.close();
- }
- catch (java.io.IOException e)
- {
- }
+ }
+
+ public void close() {
+ try {
+ m_aOut.write("</TABLE>" + ls);
+ m_aOut.write("</BODY></HTML>" + ls);
+ m_aOut.flush();
+ m_aOut.close();
+ } catch (java.io.IOException e) {
}
+ }
-
- private String stronghtml(String _sValue)
- {
- StringBuffer a = new StringBuffer();
- a.append("<STRONG>");
- a.append(_sValue);
- a.append("</STRONG>");
- return a.toString();
- }
+ private String stronghtml(String _sValue) {
+ StringBuffer a = new StringBuffer();
+ a.append("<STRONG>");
+ a.append(_sValue);
+ a.append("</STRONG>");
+ return a.toString();
+ }
private final static String FIRSTGFX_TABLETITLE = "Original print file as jpeg";
- private final static String SECONDGFX_TABLETITLE = "New print file as jpeg";
- private final static String DIFFER_TABLETITLE = "Difference file";
- private final static String STATUS_TABLETITLE = "Status";
- private final static String PIXELDIFF_TABLETITLE = "Pixel difference in %";
-
- private final static String PIXELDIFF_BM_TABLETITLE = "P.diff. in % after remove border";
- private final static String DIFFER_BM_TABLETITLE = "Diff file (RB)";
-
- private final static String OK_TABLETITLE = "OK?";
-
-
-
-
-
-
-
-
}
diff --git a/qadevOOo/runner/convwatch/INIOutputter.java b/qadevOOo/runner/convwatch/INIOutputter.java
index 416519b33ce7..63a6eecd8335 100644
--- a/qadevOOo/runner/convwatch/INIOutputter.java
+++ b/qadevOOo/runner/convwatch/INIOutputter.java
@@ -28,11 +28,11 @@ public class INIOutputter
/**
- * ls is the current line separator (carridge return)
+ * ls is the current line separator (carriage return)
*/
private String ls;
- public static INIOutputter create( String _sOutputPath, String _sHTMLFilename, String _sNamePrefix )
+ public static INIOutputter create( String _sOutputPath, String _sHTMLFilename )
{
FileHelper.makeDirectories("", _sOutputPath);
INIOutputter a = new INIOutputter();
diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java
index 08e9629883ad..ddab207d1769 100644
--- a/qadevOOo/runner/convwatch/IniFile.java
+++ b/qadevOOo/runner/convwatch/IniFile.java
@@ -34,7 +34,6 @@ class IniFile
*/
private final String m_sFilename;
private final ArrayList<String> m_aList;
- private final boolean m_bListContainUnsavedChanges = false;
/**
open a ini file by its name
diff --git a/qadevOOo/runner/util/DBTools.java b/qadevOOo/runner/util/DBTools.java
index 15aa1d926514..e10a896075a3 100644
--- a/qadevOOo/runner/util/DBTools.java
+++ b/qadevOOo/runner/util/DBTools.java
@@ -80,12 +80,6 @@ public class DBTools {
} ;
/**
- * Array of lengths of streams for each row in of the
- * <code>TST_TABLE_VALUES</code> constants.
- */
- private final static int[] TST_STREAM_LENGTHS = {0, 0, 0} ;
-
- /**
* It's just a structure with some useful methods for representing
* <code>com.sun.star.sdb.DataSource</code> service. All this
* service's properties are stored in appropriate class fields.
@@ -144,35 +138,6 @@ public class DBTools {
}
/**
- * Creates an instance laying upon specified DataSource.
- * @param dataSource All source properties are copied into
- * class fields.
- */
- private DataSourceInfo(Object dataSource) {
- XPropertySet xProps = UnoRuntime.queryInterface(XPropertySet.class, dataSource) ;
-
- try {
- Name = (String)xProps.getPropertyValue("Name") ;
- URL = (String)xProps.getPropertyValue("URL") ;
- Info = (PropertyValue[])xProps.getPropertyValue("Info") ;
- User = (String)xProps.getPropertyValue("User") ;
- Password = (String)xProps.getPropertyValue("Password") ;
- IsPasswordRequired = (Boolean)xProps.getPropertyValue("IsPasswordRequired") ;
- SuppressVersionColumns = (Boolean)
- xProps.getPropertyValue("SuppressVersionColumns") ;
- IsReadOnly = (Boolean)xProps.getPropertyValue("IsReadOnly") ;
- TableFilter = (String[])xProps.getPropertyValue("TableFilter") ;
- TableTypeFilter = (String[])xProps.getPropertyValue("TableTypeFilter") ;
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- System.err.println("util.DBTools.DataSourceInfo: Error retrieving property") ;
- e.printStackTrace(System.err) ;
- } catch (com.sun.star.lang.WrappedTargetException e) {
- System.err.println("util.DBTools.DataSourceInfo: Error retrieving property") ;
- e.printStackTrace(System.err) ;
- }
- }
-
- /**
* Creates new <code>com.sun.star.sdb.DataSource</code> service
* instance and copies all fields (which are not null) to
* appropriate service properties.
diff --git a/qadevOOo/runner/util/SysUtils.java b/qadevOOo/runner/util/SysUtils.java
index cf4b3b56cf4b..e74716f6861c 100644
--- a/qadevOOo/runner/util/SysUtils.java
+++ b/qadevOOo/runner/util/SysUtils.java
@@ -18,8 +18,6 @@
package util;
-import java.util.ArrayList;
-
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.datatransfer.clipboard.*;
@@ -27,16 +25,6 @@ import com.sun.star.datatransfer.*;
public class SysUtils {
-
-
- private static ArrayList<String> files = new ArrayList<String>();
-
-
-
-
-
-
-
/**
* Tries to obtain text data from cliboard if such one exists.
* The method iterates through all 'text/plain' supported data
diff --git a/qadevOOo/runner/util/UITools.java b/qadevOOo/runner/util/UITools.java
index 073b7493dde3..48ed314e0b00 100644
--- a/qadevOOo/runner/util/UITools.java
+++ b/qadevOOo/runner/util/UITools.java
@@ -28,12 +28,7 @@ import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.accessibility.XAccessibleEditableText;
import com.sun.star.accessibility.XAccessibleText;
import com.sun.star.accessibility.XAccessibleValue;
-
import com.sun.star.awt.XWindow;
-import com.sun.star.frame.XModel;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.text.XTextDocument;
-
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
@@ -43,33 +38,12 @@ import com.sun.star.uno.XInterface;
public class UITools {
private final XAccessible mXRoot;
- private final XMultiServiceFactory mMSF;
-
- public UITools(XMultiServiceFactory msf, XModel xModel)
- {
- mMSF = msf;
- mXRoot = makeRoot(xModel);
- }
-
- public UITools(XMultiServiceFactory msf, XTextDocument xTextDoc)
- {
- mMSF = msf;
- XModel xModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
- mXRoot = makeRoot(xModel);
- }
- public UITools(XMultiServiceFactory msf, XWindow xWindow)
+ public UITools(XWindow xWindow)
{
- mMSF = msf;
mXRoot = makeRoot(xWindow);
}
- private static XAccessible makeRoot(XModel aModel)
- {
- XWindow xWindow = AccessibilityTools.getCurrentWindow(aModel);
- return AccessibilityTools.getAccessibleObject(xWindow);
- }
-
private static String getString(XInterface xInt)
{
XAccessibleText oText = UnoRuntime.queryInterface(XAccessibleText.class, xInt);