Kaydet (Commit) fe095dad authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Caolán McNamara

java,qadev: remove unused parameters and local vars

Change-Id: Ifb9f9374051fe88dc4cd5a7a28b2c8c992ced873
Reviewed-on: https://gerrit.libreoffice.org/13097Tested-by: 's avatarLibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst df633ac5
......@@ -172,7 +172,7 @@ public class CopyTableWizard extends CRMBasedTestCase
try
{
final XWindow dialog = getActiveWindow();
final UITools uiTools = new UITools(getMSF(), dialog);
final UITools uiTools = new UITools(dialog);
final XAccessible root = uiTools.getRoot();
final XAccessibleContext accContext = root.getAccessibleContext();
final int count = accContext.getAccessibleChildCount();
......
......@@ -40,7 +40,7 @@ public class KlickButtonThread extends Thread {
@Override
public void run() {
try{
UITools oUITools = new UITools(xMSF, xWindow);
UITools oUITools = new UITools(xWindow);
oUITools.clickButton(buttonName);
......
......@@ -236,7 +236,7 @@ public class RecoveryTest extends ComplexTestCase {
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, oDialog);
UITools oUITools = new UITools(xMSF, xWindow);
UITools oUITools = new UITools(xWindow);
oUITools.printAccessibleTree((PrintWriter) log, param.getBool(PropertyName.DEBUG_IS_ACTIVE));
......@@ -275,7 +275,7 @@ public class RecoveryTest extends ComplexTestCase {
log.println(oDialog.getTitle());
UITools oUITools = new UITools(xMSF, xWindow);
UITools oUITools = new UITools(xWindow);
if (cancel) {
log.println("clicking 'Cancel' button...");
......@@ -328,7 +328,7 @@ public class RecoveryTest extends ComplexTestCase {
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, oDialog);
log.println("got the following dialog: '" +oDialog.getTitle() + "'");
UITools oUITools = new UITools(xMSF, xWindow);
UITools oUITools = new UITools(xWindow);
String listBoxName = "Status of recovered documents";
String[] documents = oUITools.getListBoxItems(listBoxName);
......@@ -429,7 +429,7 @@ public class RecoveryTest extends ComplexTestCase {
assure("could not get 'Save Documents' Dialog: ", (oDialog != null), CONTINUE);
UITools oUITools = new UITools(xMSF, oDialog);
UITools oUITools = new UITools(oDialog);
oUITools.printAccessibleTree((PrintWriter) log, param.getBool(PropertyName.DEBUG_IS_ACTIVE));
......
......@@ -261,7 +261,7 @@ public class RecoveryTools {
if (oDialog == null) throw new com.sun.star.accessibility.IllegalAccessibleComponentStateException("could not get modal Dialog");
UITools oUITools = new UITools(xMSF, oDialog);
UITools oUITools = new UITools(oDialog);
oUITools.printAccessibleTree((PrintWriter) log, param.getBool(PropertyName.DEBUG_IS_ACTIVE));
try{
......
......@@ -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");
......
......@@ -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");
......
......@@ -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)
{
......
......@@ -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();
......
......@@ -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
......
......@@ -79,12 +79,6 @@ public class DBTools {
null, null, null}
} ;
/**
* 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
......@@ -143,35 +137,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
......
......@@ -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
......
......@@ -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);
......
......@@ -289,8 +289,6 @@ public class CheckModuleAPI extends ComplexTestCase
{
try
{
// cws version: all added modules must be tested
final String cws = version.substring(4, version.length());
final CwsDataExchangeImpl cde = new CwsDataExchangeImpl(param, log);
final ArrayList<String> addedModules = cde.getModules();
......@@ -543,8 +541,6 @@ public class CheckModuleAPI extends ComplexTestCase
try
{
// cws version: all added modules must be tested
final String cws = version.substring(4, version.length());
final CwsDataExchangeImpl cde = new CwsDataExchangeImpl(param, log);
cde.setUnoApiCwsStatus(status);
}
......
......@@ -48,7 +48,6 @@ public class _XMessageBoxFactory extends MultiMethodTest {
com.sun.star.awt.MessageBoxType.ERRORBOX, 1, "The Title",
"The Message");
final UITools tools = new UITools(
tParam.getMSF(),
UnoRuntime.queryInterface(XWindow.class, mb));
final boolean[] done = new boolean[] { false };
final boolean[] good = new boolean[] { false };
......
......@@ -55,14 +55,12 @@ public class _XInteractionHandler extends MultiMethodTest {
// oObj filled by MultiMethodTest
public XInteractionHandler oObj = null ;
private XInteractionRequest request = null ;
/**
* Retrieves an object relation. <p>
*/
@Override
public void before() {
request = (XInteractionRequest)
XInteractionRequest request = (XInteractionRequest)
tEnv.getObjRelation("XInteractionHandler.Request") ;
}
......
......@@ -210,7 +210,7 @@ public class various extends TestCase {
xBrdgFctr = UnoRuntime.queryInterface(XBridgeFactory.class, oBrdg);
// create own implementation of XInstanceProvider
XInstanceProvider xInstProv = new MyInstanceProvider(xMSF);
new MyInstanceProvider(xMSF);
// create waiting acceptor thread
accThread = new AcceptorThread(xAcctr);
accThread.start();
......
......@@ -111,7 +111,7 @@ public class ScTableSheetsObj extends TestCase {
@Override
protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF());
SOfficeFactory.getFactory( Param.getMSF());
log.println("getting sheets");
XSpreadsheets xSpreadsheets = xSpreadsheetDoc.getSheets();
......
......@@ -68,7 +68,7 @@ public class SwAccessibleTableCellView extends TestCase {
XAccessibleContext oObj = null;
XTextTable oTable = null;
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF());
SOfficeFactory.getFactory( Param.getMSF());
oTable = SOfficeFactory.createTextTable(xTextDoc);
......
......@@ -71,7 +71,7 @@ public class SwAccessibleTableView extends TestCase {
XInterface oObj = null;
XTextTable oTable = null;
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF());
SOfficeFactory.getFactory(Param.getMSF());
oTable = SOfficeFactory.createTextTable( xTextDoc );
try {
......
......@@ -79,7 +79,7 @@ public class SwAccessibleTextFrameView extends TestCase {
XTextCursor oCursor = null;
// get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF() );
SOfficeFactory.getFactory( Param.getMSF() );
// creating Frames
log.println( "creating Frames" );
try {
......
......@@ -92,7 +92,7 @@ public class SwXCell extends TestCase {
XInterface oObj = null;
XTextContent oTable = null;
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
SOfficeFactory.getFactory( tParam.getMSF() );
log.println( "creating a test environment" );
oTable = SOfficeFactory.createTextTable(xTextDoc, 3, 4);
try {
......
......@@ -97,7 +97,7 @@ public class SwXDocumentIndex extends TestCase {
XTextContent xTC = null;
Object instance = null;
SOfficeFactory SOF = SOfficeFactory.getFactory(tParam.getMSF());
SOfficeFactory.getFactory(tParam.getMSF());
log.println( "creating a test environment" );
try {
xTC = SOfficeFactory.createIndex(xTextDoc, "com.sun.star.text.DocumentIndex");
......
......@@ -91,7 +91,7 @@ public class SwXDocumentIndexes extends TestCase {
public TestEnvironment createTestEnvironment(
TestParameters tParam, PrintWriter log ) throws StatusException {
XInterface oObj = null;
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
SOfficeFactory.getFactory( tParam.getMSF() );
log.println( "creating a test environment" );
XTextContent xTC = null;
......
......@@ -89,7 +89,7 @@ public class SwXTableRows extends TestCase {
XTextTable oTable = null;
log.println( "creating a test environment" );
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
SOfficeFactory.getFactory( tParam.getMSF() );
oTable = SOfficeFactory.createTextTable( xTextDoc );
try {
......
......@@ -97,7 +97,7 @@ public class SwXTextFrameText extends TestCase {
log.println( "creating a test environment" );
// get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
SOfficeFactory.getFactory( tParam.getMSF() );
// create testobject here
......
......@@ -84,7 +84,7 @@ public class SwXTextTableCursor extends TestCase {
log.println( "creating a test environment" );
// get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
SOfficeFactory.getFactory( tParam.getMSF() );
// create testobject here
......
......@@ -75,7 +75,7 @@ public class SwXTextTableRow extends TestCase {
log.println( "Creating a test environment" );
// get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF() );
SOfficeFactory.getFactory( Param.getMSF() );
try {
log.println("creating a texttable");
......
......@@ -90,7 +90,7 @@ public class SwXTextTables extends TestCase {
log.println( "creating a test environment" );
// get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
SOfficeFactory.getFactory( tParam.getMSF() );
// create testobject here
TestEnvironment tEnv = null;
......
......@@ -163,7 +163,7 @@ public class GlobalEventBroadcaster {
XTextDocument xTextDoc = wHelper.openFromDialog("private:factory/swriter?slot=21051", "", false);
shortWait();
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, wHelper.getToolkit().getActiveTopWindow());
UITools ut = new UITools(m_xMSF,xWindow);
UITools ut = new UITools(xWindow);
notifyEvents.clear();
System.out.println("pressing button 'New Document'");
try{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment