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

Remove dead java code, fields and local variables

Change-Id: If777dcb0e0142229df737c2f1e3e6ecb61f64168
üst fa4966a1
......@@ -33,7 +33,7 @@ import com.sun.star.lib.uno.helper.UnoUrl;
import com.sun.star.lib.util.NativeLibraryLoader;
/**
* This class reprecents a connection to the local office application.
* This class represents a connection to the local office application.
* @deprecated
*/
public class LocalOfficeConnection
......
......@@ -50,8 +50,6 @@ public class LocalOfficeConnection
public static final String OFFICE_LIB_NAME = "officebean";
public static final String OFFICE_ID_SUFFIX = "_Office";
private static String mProgramPath;
private Process mProcess;
private ContainerFactory mContainerFactory;
private XComponentContext mContext;
......@@ -119,11 +117,6 @@ public class LocalOfficeConnection
}
//-------------------------------------------------------------------------
// debugging method
private void dbgPrint( String aMessage )
{
System.err.println( aMessage );
}
/**
* Constructor.
......@@ -182,7 +175,6 @@ public class LocalOfficeConnection
try
{
UnoUrl aURL = UnoUrl.parseUnoUrl( url );
mProgramPath = null;
mConnType = aURL.getConnection();
mPipe = (String) aURL.getConnectionParameters().get( "pipe" );
mPort = (String) aURL.getConnectionParameters().get( "port" );
......@@ -463,39 +455,6 @@ public class LocalOfficeConnection
}
/**
* Retrives a path to the office program folder.
*
* @return The path to the office program folder.
*/
static private String getProgramPath()
{
if (mProgramPath == null)
{
// determine name of executable soffice
String aExec = OFFICE_APP_NAME; // default for UNIX
String aOS = System.getProperty("os.name");
// running on Windows?
if (aOS.startsWith("Windows"))
aExec = OFFICE_APP_NAME + ".exe";
// add other non-UNIX operating systems here
// ...
// find soffice executable relative to this class's class loader:
File path = NativeLibraryLoader.getResource(
LocalOfficeConnection.class.getClassLoader(), aExec);
if (path != null)
mProgramPath = path.getParent();
// default is ""
if ( mProgramPath == null )
mProgramPath = "";
}
return mProgramPath;
}
/**
* Parses a connection URL.
* This method accepts a UNO URL with following format:<br />
......@@ -674,8 +633,6 @@ public class LocalOfficeConnection
"Invalid UNO connection URL.");
// Set up the connection parameters.
if (path != null)
mProgramPath = path;
if (pipe != null)
mPipe = pipe;
}
......
......@@ -688,19 +688,11 @@ public class OOoBeanTest
}
public Dimension getPreferredSize()
{
Container c = getParent();
return new Dimension(200, 200);
}
}
private XMultiServiceFactory getMSF()
{
return(UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()));
}
// setup and close connections
@BeforeClass public static void setUpConnection() throws Exception {
System.out.println("setUpConnection()");
......
......@@ -71,9 +71,6 @@ public class EventTest {
//-------------------------------------------
// member
/** points to the global uno service manager. */
private XMultiServiceFactory m_xMSF = null;
/** indicates if the mousePressed event was called*/
private boolean m_mousePressed = false;
/** indicates if the mouseReleased event was called*/
......@@ -131,9 +128,6 @@ public class EventTest {
* different components inside.
*/
@Before public void before() {
// get uno service manager from global test environment
m_xMSF = getMSF();
// create frame instance
try {
// get a soffice factory object
......
......@@ -64,7 +64,6 @@ public class AcceleratorsConfigurationTest
private XAcceleratorConfiguration m_xModuleAccelCfg = null;
private XAcceleratorConfiguration m_xDocumentAccelCfg = null;
/** XCS/XCU based accelerator configuration. */
private XNameAccess m_xConfig = null;
private XNameAccess m_xPrimaryKeys = null;
private XNameAccess m_xSecondaryKeys = null;
......@@ -113,7 +112,6 @@ public class AcceleratorsConfigurationTest
public void after()
throws java.lang.Exception
{
m_xConfig = null;
m_xGlobalAccelCfg = null;
m_xModuleAccelCfg = null;
m_xDocumentAccelCfg = null;
......@@ -575,46 +573,6 @@ public class AcceleratorsConfigurationTest
return sCommand;
}
//-------------------------------------------
/** @todo document me.
*/
private void insertKeyToConfiguration(XNameAccess xAccess, String sKey, String sCommand)
throws java.lang.Exception
{
XNameContainer xContainer = UnoRuntime.queryInterface(XNameContainer.class, xAccess);
if (!xContainer.hasByName(sKey))
{
XSingleServiceFactory xFac = UnoRuntime.queryInterface(XSingleServiceFactory.class, xContainer);
XInterface xInst = UnoRuntime.queryInterface(XInterface.class, xFac.createInstance());
xContainer.insertByName(sKey, xInst);
}
XNameAccess xKey = UnoRuntime.queryInterface(XNameAccess.class, xContainer.getByName(sKey));
XNameContainer xCommand = UnoRuntime.queryInterface(XNameContainer.class, xKey.getByName("Command"));
String sLocale = getOfficeLocale();
if (xCommand.hasByName(sLocale))
{
xCommand.insertByName(sLocale, sCommand);
}
else
{
xCommand.replaceByName(sLocale, sCommand);
}
}
//-------------------------------------------
/** @todo document me.
*/
private void removeKeyFromConfiguration(XNameAccess xAccess, String sKey)
throws java.lang.Exception
{
XNameContainer xContainer = UnoRuntime.queryInterface(XNameContainer.class, xAccess);
if (xContainer.hasByName(sKey))
{
xContainer.removeByName(sKey);
}
}
//-------------------------------------------
/** @todo document me.
*/
......
......@@ -51,9 +51,6 @@ import com.sun.star.uno.UnoRuntime;
*/
public class CheckAPI {
// The name of the tested service
private final String testName = "StarOfficeAPI";
/**
* Return all test methods.
* @return The test methods.
......
......@@ -166,10 +166,6 @@ public class AutoSave
/** can be used to trigger/enable/disable the AutoSave feature. */
private XDispatch m_xAutoSave = null;
/** a test document, which needs some time for saving to simulate concurrent
* save operations. */
private XStorable m_xTestDoc = null;
private XURLTransformer m_xURLParser = null;
//-------------------------------------------
......
......@@ -97,7 +97,7 @@ public class CheckImageManager {
private void performChecks(XImageManager xImageManager, String testObjectName, XUIConfigurationManager xManager) {
util.dbg.printInterfaces(xImageManager);
OXUIConfigurationListenerImpl configListener = new OXUIConfigurationListenerImpl(xManager, xMSF);
OXUIConfigurationListenerImpl configListener = new OXUIConfigurationListenerImpl();
param.put("XUIConfiguration.XUIConfigurationListenerImpl", configListener);
XInitialization xInit = UnoRuntime.queryInterface(XInitialization.class, xImageManager);
......@@ -146,14 +146,6 @@ public class CheckImageManager {
class OXUIConfigurationListenerImpl implements _XUIConfiguration.XUIConfigurationListenerImpl {
private boolean triggered = false;
private XUIConfigurationManager xUIManager = null;
private XMultiServiceFactory xMSF = null;
public OXUIConfigurationListenerImpl(XUIConfigurationManager xUIManager, XMultiServiceFactory xMSF) {
this.xUIManager = xUIManager;
this.xMSF = xMSF;
}
public boolean actionWasTriggered() {
return triggered;
......
......@@ -40,7 +40,6 @@ import lib.TestParameters;
public class _XComponent {
public static XComponent oObj = null;
private XNameContainer xContainer = null;
private XComponent altDispose = null;
TestParameters tEnv = null;
boolean listenerDisposed[] = new boolean[2];
......
......@@ -677,15 +677,6 @@ public class CheckXComponentLoader
}
}
private void loadURL(XComponentLoader m_xLoader, int nRequiredResult,
String[] sURL, String sTarget, int nFlags,
PropertyValue[] lProps) {
for (int i = 0; i < sURL.length; i++)
{
loadURL(m_xLoader, nRequiredResult, sURL[i], sTarget, nFlags, lProps);
}
}
/**
* it match the int result value to a string, which can be used for logging
*/
......
......@@ -57,16 +57,9 @@ public class StatusIndicator implements com.sun.star.task.XStatusIndicator
// ____________________
/**
* @member m_sText text, which describe the current status
* @member m_nRange max value for any progress
* @member m_nValue the progress value
* @member m_nOut regulate, how the status will be shown
* @member m_aProtocol used for logging and transport information about used interface of this object
*/
private String m_sText ;
private int m_nRange ;
private int m_nValue ;
private int m_nOut ;
private boolean m_bWasUsed ;
// ____________________
......@@ -77,10 +70,7 @@ public class StatusIndicator implements com.sun.star.task.XStatusIndicator
*/
public StatusIndicator( int nOut)
{
m_sText = new String() ;
m_nRange = 100 ;
m_nValue = 0 ;
m_nOut = nOut ;
m_bWasUsed = false;
}
......@@ -100,9 +90,7 @@ public class StatusIndicator implements com.sun.star.task.XStatusIndicator
synchronized(this)
{
m_bWasUsed = true;
m_sText = sText ;
m_nRange = nRange;
m_nValue = 0 ;
}
impl_show();
}
......@@ -117,9 +105,7 @@ public class StatusIndicator implements com.sun.star.task.XStatusIndicator
synchronized(this)
{
m_bWasUsed = true;
m_sText = new String();
m_nRange = 100;
m_nValue = 0;
}
impl_show();
}
......@@ -137,7 +123,6 @@ public class StatusIndicator implements com.sun.star.task.XStatusIndicator
synchronized(this)
{
m_bWasUsed = true;
m_sText = sText;
}
impl_show();
}
......@@ -156,9 +141,6 @@ public class StatusIndicator implements com.sun.star.task.XStatusIndicator
synchronized(this)
{
m_bWasUsed = true;
if (nValue<=m_nRange)
m_nValue = nValue;
}
impl_show();
}
......@@ -173,8 +155,6 @@ public class StatusIndicator implements com.sun.star.task.XStatusIndicator
synchronized(this)
{
m_bWasUsed = true;
m_sText = new String();
m_nValue = 0;
}
impl_show();
}
......
......@@ -247,27 +247,6 @@ public class PathSettingsTest
return false;
}
private String getPropertyValueAsString(String _sName)
{
final XPropertySet xPropSet_of_PathSettings = UnoRuntime.queryInterface(XPropertySet.class, aPathSettings);
String sValue = "";
{
Object o;
try
{
o = xPropSet_of_PathSettings.getPropertyValue(_sName);
sValue = convertToString(o);
}
catch (UnknownPropertyException ex)
{
}
catch (WrappedTargetException ex)
{
}
}
return sValue;
}
/**
* Shows the path settings
* @throws UnknownPropertyException
......@@ -934,7 +913,6 @@ public class PathSettingsTest
private boolean propChanged = false;
private boolean propertiesChanged = false;
private boolean disposeCalled = false;
private boolean vetoableChanged = false;
public void propertiesChange(
......@@ -956,14 +934,12 @@ public class PathSettingsTest
public void disposing(com.sun.star.lang.EventObject eventObject)
{
disposeCalled = true;
}
public void resetListener()
{
propChanged = false;
propertiesChanged = false;
disposeCalled = false;
vetoableChanged = false;
}
......
......@@ -239,13 +239,6 @@ public class PathSubstitutionTest
resubst = new ArrayList<Boolean>();
}
public void add(String var)
{
varName.add(var);
substAtBegin.add(Boolean.TRUE);
resubst.add(Boolean.TRUE);
}
public void add(String var, boolean onlySubstAtBegin,
boolean canResubst)
{
......@@ -269,11 +262,6 @@ public class PathSubstitutionTest
return varName.get(i);
}
public String getValue(int i)
{
return varName.get(i);
}
public String getValue(String var)
{
return varValue.get(varName.indexOf(var));
......
......@@ -29,9 +29,6 @@ import com.sun.star.comp.juhtest.SmoketestCommandEnvironment;
*/
public class JavaUNOHelperServices {
static private final String __service_smoketestCommandEnv =
"com.sun.star.deployment.test.SmoketestCommandEnvironment";
/**
* Gives a factory for creating the service.
* This method is called by the <code>JavaLoader</code>
......
......@@ -40,7 +40,6 @@ public class XOutputStreamToByteArrayAdapter
private int size = 0;
private int position = 0;
private boolean externalBuffer = false;
private boolean closed = false;
private byte[] buffer;
/** Creates a new instance of ByteArrayXOutputStream */
......@@ -77,7 +76,6 @@ public class XOutputStreamToByteArrayAdapter
System.arraycopy(buffer, 0, newBuffer, 0, position);
buffer = newBuffer;
}
closed = true;
}
public void flush()
......
......@@ -1125,7 +1125,6 @@ class TestClass extends PropertySet
boolean boolPropC;
public Property propBoolD= new Property("PropBoolD", 301, new Type(Boolean.TYPE), (short) 0);
private boolean boolPropD;
public Property propBoolClass= new Property("PropBoolClass", 1001, new Type(Boolean.class), (short) 0);
public Boolean boolClassProp;
......@@ -1453,7 +1452,6 @@ class TestClass extends PropertySet
enumPropertyState = com.sun.star.beans.PropertyState.DEFAULT_VALUE;
boolPropB= false;
boolPropC= false;
boolPropD= false;
boolClassProp= null;
charClassProp= null;
byteClassProp= null;
......
......@@ -209,6 +209,7 @@ public class java_remote_bridge
}
private final Type type;
private final Object object;
private int count = 1;
}
......
......@@ -1240,7 +1240,6 @@ public class UndoManager
public void redo() throws UndoFailedException
{
m_redoCalled = true;
}
public void dispose()
......@@ -1259,12 +1258,10 @@ public class UndoManager
}
boolean undoCalled() { return m_undoCalled; }
boolean redoCalled() { return m_redoCalled; }
boolean disposed() { return m_disposed; }
private final String m_title;
private boolean m_undoCalled = false;
private boolean m_redoCalled = false;
private boolean m_disposed = false;
}
......
......@@ -88,7 +88,6 @@ public class CheckBookmarks {
private XMultiServiceFactory m_xMsf = null;
private XTextDocument m_xDoc = null;
private XTextDocument m_xOdfReloadedDoc = null;
private XTextDocument m_xMsWordReloadedDoc = null;
private final BookmarkHashes actualHashes = new BookmarkHashes();
private BookmarkHashes get20111110Expectations() {
......
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