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 ...@@ -172,7 +172,7 @@ public class CopyTableWizard extends CRMBasedTestCase
try try
{ {
final XWindow dialog = getActiveWindow(); final XWindow dialog = getActiveWindow();
final UITools uiTools = new UITools(getMSF(), dialog); final UITools uiTools = new UITools(dialog);
final XAccessible root = uiTools.getRoot(); final XAccessible root = uiTools.getRoot();
final XAccessibleContext accContext = root.getAccessibleContext(); final XAccessibleContext accContext = root.getAccessibleContext();
final int count = accContext.getAccessibleChildCount(); final int count = accContext.getAccessibleChildCount();
......
...@@ -40,7 +40,7 @@ public class KlickButtonThread extends Thread { ...@@ -40,7 +40,7 @@ public class KlickButtonThread extends Thread {
@Override @Override
public void run() { public void run() {
try{ try{
UITools oUITools = new UITools(xMSF, xWindow); UITools oUITools = new UITools(xWindow);
oUITools.clickButton(buttonName); oUITools.clickButton(buttonName);
......
...@@ -236,7 +236,7 @@ public class RecoveryTest extends ComplexTestCase { ...@@ -236,7 +236,7 @@ public class RecoveryTest extends ComplexTestCase {
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, oDialog); 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)); oUITools.printAccessibleTree((PrintWriter) log, param.getBool(PropertyName.DEBUG_IS_ACTIVE));
...@@ -275,7 +275,7 @@ public class RecoveryTest extends ComplexTestCase { ...@@ -275,7 +275,7 @@ public class RecoveryTest extends ComplexTestCase {
log.println(oDialog.getTitle()); log.println(oDialog.getTitle());
UITools oUITools = new UITools(xMSF, xWindow); UITools oUITools = new UITools(xWindow);
if (cancel) { if (cancel) {
log.println("clicking 'Cancel' button..."); log.println("clicking 'Cancel' button...");
...@@ -328,7 +328,7 @@ public class RecoveryTest extends ComplexTestCase { ...@@ -328,7 +328,7 @@ public class RecoveryTest extends ComplexTestCase {
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, oDialog); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, oDialog);
log.println("got the following dialog: '" +oDialog.getTitle() + "'"); 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 listBoxName = "Status of recovered documents";
String[] documents = oUITools.getListBoxItems(listBoxName); String[] documents = oUITools.getListBoxItems(listBoxName);
...@@ -429,7 +429,7 @@ public class RecoveryTest extends ComplexTestCase { ...@@ -429,7 +429,7 @@ public class RecoveryTest extends ComplexTestCase {
assure("could not get 'Save Documents' Dialog: ", (oDialog != null), CONTINUE); 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)); oUITools.printAccessibleTree((PrintWriter) log, param.getBool(PropertyName.DEBUG_IS_ACTIVE));
......
...@@ -261,7 +261,7 @@ public class RecoveryTools { ...@@ -261,7 +261,7 @@ public class RecoveryTools {
if (oDialog == null) throw new com.sun.star.accessibility.IllegalAccessibleComponentStateException("could not get modal Dialog"); 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)); oUITools.printAccessibleTree((PrintWriter) log, param.getBool(PropertyName.DEBUG_IS_ACTIVE));
try{ try{
......
...@@ -157,7 +157,6 @@ public class ConvWatch ...@@ -157,7 +157,6 @@ public class ConvWatch
} }
PRNCompare a = new PRNCompare(); PRNCompare a = new PRNCompare();
String sInputPath = FileHelper.getPath(_sAbsoluteInputFile);
String sReferencePath = FileHelper.getPath(_sAbsoluteReferenceFile); String sReferencePath = FileHelper.getPath(_sAbsoluteReferenceFile);
a.setReferencePath( sReferencePath ); a.setReferencePath( sReferencePath );
...@@ -203,7 +202,7 @@ public class ConvWatch ...@@ -203,7 +202,7 @@ public class ConvWatch
// Status end // Status end
String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini"; String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini";
INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, ""); INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile);
INIoutput.createHeader(); INIoutput.createHeader();
// TODO: version info was fine // TODO: version info was fine
...@@ -265,7 +264,7 @@ public class ConvWatch ...@@ -265,7 +264,7 @@ public class ConvWatch
String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename); String sNameNoSuffix = FileHelper.getNameNoSuffix(sBasename);
String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini"; String sINIFile = _sFilenamePrefix + sNameNoSuffix + ".ini";
INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile, _sFilenamePrefix); INIOutputter INIoutput = INIOutputter.create(_sOutputPath, sINIFile);
INIoutput.createHeader(); INIoutput.createHeader();
// LLA? what if the are no values in the list? true or false; // LLA? what if the are no values in the list? true or false;
INIoutput.writeSection("global"); INIoutput.writeSection("global");
......
...@@ -200,7 +200,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase ...@@ -200,7 +200,7 @@ public class ConvWatchStarter extends EnhancedComplexTestCase
sHTMLName = m_sInputPath.substring(n + 1); sHTMLName = m_sInputPath.substring(n + 1);
sHTMLName += ".html"; sHTMLName += ".html";
} }
HTMLOutputter HTMLoutput = HTMLOutputter.create(m_sOutputPath, sHTMLName, ""); HTMLOutputter HTMLoutput = HTMLOutputter.create(m_sOutputPath, sHTMLName);
HTMLoutput.header( m_sOutputPath ); HTMLoutput.header( m_sOutputPath );
HTMLoutput.indexSection( m_sOutputPath ); HTMLoutput.indexSection( m_sOutputPath );
LISTOutputter LISToutput = LISTOutputter.create(m_sOutputPath, "allfiles.txt"); LISTOutputter LISToutput = LISTOutputter.create(m_sOutputPath, "allfiles.txt");
......
...@@ -234,8 +234,6 @@ public class GraphicalTestArguments ...@@ -234,8 +234,6 @@ public class GraphicalTestArguments
// m_tWithBorderMove = TriState.UNSET; // 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); String sDBInfoString = (String)param.get(PropertyName.DOC_COMPARATOR_DB_INFO_STRING);
if (sDBInfoString != null) if (sDBInfoString != null)
{ {
......
...@@ -22,197 +22,157 @@ import java.io.File; ...@@ -22,197 +22,157 @@ import java.io.File;
import java.io.FileWriter; import java.io.FileWriter;
import helper.OSHelper; import helper.OSHelper;
public class HTMLOutputter public class HTMLOutputter {
{
private FileWriter m_aOut; private FileWriter m_aOut;
private String m_sFilename; 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) * ls is the current line separator (carridge return)
*/ */
private String ls; private String ls;
HTMLOutputter() {} HTMLOutputter() {
public static HTMLOutputter create( String _sOutputPath, String _sHTMLFilename, String _sNamePrefix ) }
{
FileHelper.makeDirectories("", _sOutputPath); public static HTMLOutputter create(String _sOutputPath,
HTMLOutputter a = new HTMLOutputter(); String _sHTMLFilename) {
String fs = System.getProperty("file.separator"); FileHelper.makeDirectories("", _sOutputPath);
String sFilename = _sOutputPath + fs + _sHTMLFilename; HTMLOutputter a = new HTMLOutputter();
String fs = System.getProperty("file.separator");
try String sFilename = _sOutputPath + fs + _sHTMLFilename;
{
File outputFile = new File(sFilename); try {
a.m_aOut = new FileWriter(outputFile.toString()); File outputFile = new File(sFilename);
a.ls = System.getProperty("line.separator"); a.m_aOut = new FileWriter(outputFile.toString());
} a.ls = System.getProperty("line.separator");
catch (java.io.IOException e) } catch (java.io.IOException e) {
{ e.printStackTrace();
e.printStackTrace(); GlobalLogWriter.get().println("ERROR: Can't create HTML Outputter");
GlobalLogWriter.get().println("ERROR: Can't create HTML Outputter"); return null;
return null;
}
a.m_sFilename = sFilename;
a.m_sNamePrefix = _sNamePrefix;
return a;
} }
public String getFilename() {return m_sFilename;} a.m_sFilename = sFilename;
return a;
public void header(String _sTitle) }
{
try public String getFilename() {
{ return m_sFilename;
m_aOut.write( "<html>" + ls); }
m_aOut.write( "<head>" + ls);
m_aOut.write( "<title>" + _sTitle + "</title>" + ls); public void header(String _sTitle) {
m_aOut.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/xmloff.css\" media=\"screen\" />" + ls); try {
m_aOut.write( "<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/style.css\" media=\"screen\" />" + ls); m_aOut.write("<html>" + ls);
m_aOut.write( "</head>" + ls); m_aOut.write("<head>" + ls);
m_aOut.write( "<body bgcolor=white>" + ls); m_aOut.write("<title>" + _sTitle + "</title>" + ls);
m_aOut.flush(); m_aOut.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/gfxcmp_ui/xmloff.css\" media=\"screen\" />"
} + ls);
catch (java.io.IOException e) 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 TEST_TABLETITLE = "Test";
private final static String VISUAL_STATUS_TABLETITLE = "Visual status"; private final static String VISUAL_STATUS_TABLETITLE = "Visual status";
private final static String VISUAL_STATUS_MESSAGE_TABLETITLE = "Message"; private final static String VISUAL_STATUS_MESSAGE_TABLETITLE = "Message";
public void indexSection(String _sOfficeInfo) public void indexSection(String _sOfficeInfo) {
{ try {
try m_aOut.write("<h2>Results for " + _sOfficeInfo + "</h2>" + ls);
{ m_aOut.write("<p>Legend:<br>");
m_aOut.write( "<h2>Results for " + _sOfficeInfo + "</h2>" + ls); m_aOut.write(stronghtml(FIRSTGFX_TABLETITLE)
m_aOut.write( "<p>Legend:<br>"); + " contains the output printed via 'ghostscript' as a jpeg picture.<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( "<table class=\"infotable\">" + ls); m_aOut.write("<TR>");
m_aOut.write( "<TR>"); m_aOut.write(tableHeaderCell(TEST_TABLETITLE));
m_aOut.write( tableHeaderCell(TEST_TABLETITLE)); 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_TABLETITLE)); m_aOut.write(tableHeaderCell(VISUAL_STATUS_MESSAGE_TABLETITLE));
m_aOut.write( tableHeaderCell(VISUAL_STATUS_MESSAGE_TABLETITLE)); m_aOut.write("</TR>" + ls);
m_aOut.write( "</TR>" + ls); m_aOut.flush();
m_aOut.flush(); } catch (java.io.IOException e) {
}
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) m_aOut.write(tableDataCell(_sStatusRunThrough));
{ m_aOut.write(tableDataCell(_sStatusMessage));
StringBuffer a = new StringBuffer(); m_aOut.write("</TR>" + ls);
a.append("<TD>");
a.append(_sValue);
a.append("</TD>");
return a.toString();
}
private String tableHeaderCell(String _sValue) m_aOut.flush();
{ } catch (java.io.IOException e) {
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)
{
}
} }
}
public void close()
{ public void close() {
try try {
{ m_aOut.write("</TABLE>" + ls);
m_aOut.write( "</TABLE>" + ls); m_aOut.write("</BODY></HTML>" + ls);
m_aOut.write( "</BODY></HTML>" + ls); m_aOut.flush();
m_aOut.flush(); m_aOut.close();
m_aOut.close(); } catch (java.io.IOException e) {
}
catch (java.io.IOException e)
{
}
} }
}
private String stronghtml(String _sValue) {
private String stronghtml(String _sValue) StringBuffer a = new StringBuffer();
{ a.append("<STRONG>");
StringBuffer a = new StringBuffer(); a.append(_sValue);
a.append("<STRONG>"); a.append("</STRONG>");
a.append(_sValue); return a.toString();
a.append("</STRONG>"); }
return a.toString();
}
private final static String FIRSTGFX_TABLETITLE = "Original print file as jpeg"; 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?";
} }
...@@ -28,11 +28,11 @@ public class INIOutputter ...@@ -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; private String ls;
public static INIOutputter create( String _sOutputPath, String _sHTMLFilename, String _sNamePrefix ) public static INIOutputter create( String _sOutputPath, String _sHTMLFilename )
{ {
FileHelper.makeDirectories("", _sOutputPath); FileHelper.makeDirectories("", _sOutputPath);
INIOutputter a = new INIOutputter(); INIOutputter a = new INIOutputter();
......
...@@ -34,7 +34,6 @@ class IniFile ...@@ -34,7 +34,6 @@ class IniFile
*/ */
private final String m_sFilename; private final String m_sFilename;
private final ArrayList<String> m_aList; private final ArrayList<String> m_aList;
private final boolean m_bListContainUnsavedChanges = false;
/** /**
open a ini file by its name open a ini file by its name
......
...@@ -79,12 +79,6 @@ public class DBTools { ...@@ -79,12 +79,6 @@ public class DBTools {
null, null, null} 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 * It's just a structure with some useful methods for representing
* <code>com.sun.star.sdb.DataSource</code> service. All this * <code>com.sun.star.sdb.DataSource</code> service. All this
...@@ -143,35 +137,6 @@ public class DBTools { ...@@ -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 * Creates new <code>com.sun.star.sdb.DataSource</code> service
* instance and copies all fields (which are not null) to * instance and copies all fields (which are not null) to
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
package util; package util;
import java.util.ArrayList;
import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.UnoRuntime;
import com.sun.star.datatransfer.clipboard.*; import com.sun.star.datatransfer.clipboard.*;
...@@ -27,16 +25,6 @@ import com.sun.star.datatransfer.*; ...@@ -27,16 +25,6 @@ import com.sun.star.datatransfer.*;
public class SysUtils { public class SysUtils {
private static ArrayList<String> files = new ArrayList<String>();
/** /**
* Tries to obtain text data from cliboard if such one exists. * Tries to obtain text data from cliboard if such one exists.
* The method iterates through all 'text/plain' supported data * The method iterates through all 'text/plain' supported data
......
...@@ -28,12 +28,7 @@ import com.sun.star.accessibility.XAccessibleContext; ...@@ -28,12 +28,7 @@ import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.accessibility.XAccessibleEditableText; import com.sun.star.accessibility.XAccessibleEditableText;
import com.sun.star.accessibility.XAccessibleText; import com.sun.star.accessibility.XAccessibleText;
import com.sun.star.accessibility.XAccessibleValue; import com.sun.star.accessibility.XAccessibleValue;
import com.sun.star.awt.XWindow; 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.UnoRuntime;
import com.sun.star.uno.XInterface; import com.sun.star.uno.XInterface;
...@@ -43,33 +38,12 @@ import com.sun.star.uno.XInterface; ...@@ -43,33 +38,12 @@ import com.sun.star.uno.XInterface;
public class UITools { public class UITools {
private final XAccessible mXRoot; 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); mXRoot = makeRoot(xWindow);
} }
private static XAccessible makeRoot(XModel aModel)
{
XWindow xWindow = AccessibilityTools.getCurrentWindow(aModel);
return AccessibilityTools.getAccessibleObject(xWindow);
}
private static String getString(XInterface xInt) private static String getString(XInterface xInt)
{ {
XAccessibleText oText = UnoRuntime.queryInterface(XAccessibleText.class, xInt); XAccessibleText oText = UnoRuntime.queryInterface(XAccessibleText.class, xInt);
......
...@@ -289,8 +289,6 @@ public class CheckModuleAPI extends ComplexTestCase ...@@ -289,8 +289,6 @@ public class CheckModuleAPI extends ComplexTestCase
{ {
try 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 CwsDataExchangeImpl cde = new CwsDataExchangeImpl(param, log);
final ArrayList<String> addedModules = cde.getModules(); final ArrayList<String> addedModules = cde.getModules();
...@@ -543,8 +541,6 @@ public class CheckModuleAPI extends ComplexTestCase ...@@ -543,8 +541,6 @@ public class CheckModuleAPI extends ComplexTestCase
try 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 CwsDataExchangeImpl cde = new CwsDataExchangeImpl(param, log);
cde.setUnoApiCwsStatus(status); cde.setUnoApiCwsStatus(status);
} }
......
...@@ -48,7 +48,6 @@ public class _XMessageBoxFactory extends MultiMethodTest { ...@@ -48,7 +48,6 @@ public class _XMessageBoxFactory extends MultiMethodTest {
com.sun.star.awt.MessageBoxType.ERRORBOX, 1, "The Title", com.sun.star.awt.MessageBoxType.ERRORBOX, 1, "The Title",
"The Message"); "The Message");
final UITools tools = new UITools( final UITools tools = new UITools(
tParam.getMSF(),
UnoRuntime.queryInterface(XWindow.class, mb)); UnoRuntime.queryInterface(XWindow.class, mb));
final boolean[] done = new boolean[] { false }; final boolean[] done = new boolean[] { false };
final boolean[] good = new boolean[] { false }; final boolean[] good = new boolean[] { false };
......
...@@ -55,14 +55,12 @@ public class _XInteractionHandler extends MultiMethodTest { ...@@ -55,14 +55,12 @@ public class _XInteractionHandler extends MultiMethodTest {
// oObj filled by MultiMethodTest // oObj filled by MultiMethodTest
public XInteractionHandler oObj = null ; public XInteractionHandler oObj = null ;
private XInteractionRequest request = null ;
/** /**
* Retrieves an object relation. <p> * Retrieves an object relation. <p>
*/ */
@Override @Override
public void before() { public void before() {
request = (XInteractionRequest) XInteractionRequest request = (XInteractionRequest)
tEnv.getObjRelation("XInteractionHandler.Request") ; tEnv.getObjRelation("XInteractionHandler.Request") ;
} }
......
...@@ -210,7 +210,7 @@ public class various extends TestCase { ...@@ -210,7 +210,7 @@ public class various extends TestCase {
xBrdgFctr = UnoRuntime.queryInterface(XBridgeFactory.class, oBrdg); xBrdgFctr = UnoRuntime.queryInterface(XBridgeFactory.class, oBrdg);
// create own implementation of XInstanceProvider // create own implementation of XInstanceProvider
XInstanceProvider xInstProv = new MyInstanceProvider(xMSF); new MyInstanceProvider(xMSF);
// create waiting acceptor thread // create waiting acceptor thread
accThread = new AcceptorThread(xAcctr); accThread = new AcceptorThread(xAcctr);
accThread.start(); accThread.start();
......
...@@ -111,7 +111,7 @@ public class ScTableSheetsObj extends TestCase { ...@@ -111,7 +111,7 @@ public class ScTableSheetsObj extends TestCase {
@Override @Override
protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) { protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) {
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF()); SOfficeFactory.getFactory( Param.getMSF());
log.println("getting sheets"); log.println("getting sheets");
XSpreadsheets xSpreadsheets = xSpreadsheetDoc.getSheets(); XSpreadsheets xSpreadsheets = xSpreadsheetDoc.getSheets();
......
...@@ -68,7 +68,7 @@ public class SwAccessibleTableCellView extends TestCase { ...@@ -68,7 +68,7 @@ public class SwAccessibleTableCellView extends TestCase {
XAccessibleContext oObj = null; XAccessibleContext oObj = null;
XTextTable oTable = null; XTextTable oTable = null;
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF()); SOfficeFactory.getFactory( Param.getMSF());
oTable = SOfficeFactory.createTextTable(xTextDoc); oTable = SOfficeFactory.createTextTable(xTextDoc);
......
...@@ -71,7 +71,7 @@ public class SwAccessibleTableView extends TestCase { ...@@ -71,7 +71,7 @@ public class SwAccessibleTableView extends TestCase {
XInterface oObj = null; XInterface oObj = null;
XTextTable oTable = null; XTextTable oTable = null;
SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF()); SOfficeFactory.getFactory(Param.getMSF());
oTable = SOfficeFactory.createTextTable( xTextDoc ); oTable = SOfficeFactory.createTextTable( xTextDoc );
try { try {
......
...@@ -79,7 +79,7 @@ public class SwAccessibleTextFrameView extends TestCase { ...@@ -79,7 +79,7 @@ public class SwAccessibleTextFrameView extends TestCase {
XTextCursor oCursor = null; XTextCursor oCursor = null;
// get a soffice factory object // get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF() ); SOfficeFactory.getFactory( Param.getMSF() );
// creating Frames // creating Frames
log.println( "creating Frames" ); log.println( "creating Frames" );
try { try {
......
...@@ -92,7 +92,7 @@ public class SwXCell extends TestCase { ...@@ -92,7 +92,7 @@ public class SwXCell extends TestCase {
XInterface oObj = null; XInterface oObj = null;
XTextContent oTable = null; XTextContent oTable = null;
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); SOfficeFactory.getFactory( tParam.getMSF() );
log.println( "creating a test environment" ); log.println( "creating a test environment" );
oTable = SOfficeFactory.createTextTable(xTextDoc, 3, 4); oTable = SOfficeFactory.createTextTable(xTextDoc, 3, 4);
try { try {
......
...@@ -97,7 +97,7 @@ public class SwXDocumentIndex extends TestCase { ...@@ -97,7 +97,7 @@ public class SwXDocumentIndex extends TestCase {
XTextContent xTC = null; XTextContent xTC = null;
Object instance = null; Object instance = null;
SOfficeFactory SOF = SOfficeFactory.getFactory(tParam.getMSF()); SOfficeFactory.getFactory(tParam.getMSF());
log.println( "creating a test environment" ); log.println( "creating a test environment" );
try { try {
xTC = SOfficeFactory.createIndex(xTextDoc, "com.sun.star.text.DocumentIndex"); xTC = SOfficeFactory.createIndex(xTextDoc, "com.sun.star.text.DocumentIndex");
......
...@@ -91,7 +91,7 @@ public class SwXDocumentIndexes extends TestCase { ...@@ -91,7 +91,7 @@ public class SwXDocumentIndexes extends TestCase {
public TestEnvironment createTestEnvironment( public TestEnvironment createTestEnvironment(
TestParameters tParam, PrintWriter log ) throws StatusException { TestParameters tParam, PrintWriter log ) throws StatusException {
XInterface oObj = null; XInterface oObj = null;
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); SOfficeFactory.getFactory( tParam.getMSF() );
log.println( "creating a test environment" ); log.println( "creating a test environment" );
XTextContent xTC = null; XTextContent xTC = null;
......
...@@ -89,7 +89,7 @@ public class SwXTableRows extends TestCase { ...@@ -89,7 +89,7 @@ public class SwXTableRows extends TestCase {
XTextTable oTable = null; XTextTable oTable = null;
log.println( "creating a test environment" ); log.println( "creating a test environment" );
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); SOfficeFactory.getFactory( tParam.getMSF() );
oTable = SOfficeFactory.createTextTable( xTextDoc ); oTable = SOfficeFactory.createTextTable( xTextDoc );
try { try {
......
...@@ -97,7 +97,7 @@ public class SwXTextFrameText extends TestCase { ...@@ -97,7 +97,7 @@ public class SwXTextFrameText extends TestCase {
log.println( "creating a test environment" ); log.println( "creating a test environment" );
// get a soffice factory object // get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); SOfficeFactory.getFactory( tParam.getMSF() );
// create testobject here // create testobject here
......
...@@ -84,7 +84,7 @@ public class SwXTextTableCursor extends TestCase { ...@@ -84,7 +84,7 @@ public class SwXTextTableCursor extends TestCase {
log.println( "creating a test environment" ); log.println( "creating a test environment" );
// get a soffice factory object // get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); SOfficeFactory.getFactory( tParam.getMSF() );
// create testobject here // create testobject here
......
...@@ -75,7 +75,7 @@ public class SwXTextTableRow extends TestCase { ...@@ -75,7 +75,7 @@ public class SwXTextTableRow extends TestCase {
log.println( "Creating a test environment" ); log.println( "Creating a test environment" );
// get a soffice factory object // get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF() ); SOfficeFactory.getFactory( Param.getMSF() );
try { try {
log.println("creating a texttable"); log.println("creating a texttable");
......
...@@ -90,7 +90,7 @@ public class SwXTextTables extends TestCase { ...@@ -90,7 +90,7 @@ public class SwXTextTables extends TestCase {
log.println( "creating a test environment" ); log.println( "creating a test environment" );
// get a soffice factory object // get a soffice factory object
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); SOfficeFactory.getFactory( tParam.getMSF() );
// create testobject here // create testobject here
TestEnvironment tEnv = null; TestEnvironment tEnv = null;
......
...@@ -163,7 +163,7 @@ public class GlobalEventBroadcaster { ...@@ -163,7 +163,7 @@ public class GlobalEventBroadcaster {
XTextDocument xTextDoc = wHelper.openFromDialog("private:factory/swriter?slot=21051", "", false); XTextDocument xTextDoc = wHelper.openFromDialog("private:factory/swriter?slot=21051", "", false);
shortWait(); shortWait();
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, wHelper.getToolkit().getActiveTopWindow()); XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, wHelper.getToolkit().getActiveTopWindow());
UITools ut = new UITools(m_xMSF,xWindow); UITools ut = new UITools(xWindow);
notifyEvents.clear(); notifyEvents.clear();
System.out.println("pressing button 'New Document'"); System.out.println("pressing button 'New Document'");
try{ 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