Kaydet (Commit) 10cb59eb authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

remove some unused Java code

Change-Id: Ia1663256fc0b92c343ea4ba55a821c969077a0aa
Reviewed-on: https://gerrit.libreoffice.org/33174Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 2b458b67
......@@ -38,24 +38,6 @@ class FlatFileDatabase extends AbstractDatabase
}
protected FlatFileDatabase(final XMultiServiceFactory i_orb, final String i_existingDocumentURL,
final String i_urlSubScheme ) throws Exception
{
super( i_orb, i_existingDocumentURL );
m_urlSubScheme = i_urlSubScheme;
final XPropertySet dsProperties = UnoRuntime.queryInterface(XPropertySet.class, m_databaseDocument.getDataSource());
final String url = (String)dsProperties.getPropertyValue( "URL" );
final String expectedURLPrefix = "sdbc:" + m_urlSubScheme + ":";
if ( !url.startsWith( expectedURLPrefix ) )
throw new IllegalArgumentException( i_existingDocumentURL + " is of wrong type" );
final String location = url.substring( expectedURLPrefix.length() );
m_tableFileLocation = new File( location );
if ( m_tableFileLocation.isDirectory() )
throw new IllegalArgumentException( "unsupported table file location (must be a folder)" );
}
/**
* returns a {@link File} which represents the folder where the database's table files reside.
*/
......
......@@ -118,7 +118,6 @@ public class ProcessHandler
private int exitValue = -1;
private boolean isFinished = false;
private boolean isStarted = false;
private long mTimeOut = 0;
private Pump stdout = null;
private PrintStream stdIn = null;
private Process m_aProcess = null;
......@@ -128,16 +127,6 @@ public class ProcessHandler
private int m_nProcessTimeout = 0;
private ProcessWatcher m_aWatcher;
/**
* Creates instance with specified external command.
* Debug info and output
* of external command is printed to stdout.
*/
public ProcessHandler(String cmdLine)
{
this(cmdLine, null, null, null, 0);
}
/**
* Creates instance with specified external command and
* log stream where debug info and output
......@@ -145,7 +134,7 @@ public class ProcessHandler
*/
public ProcessHandler(String cmdLine, PrintWriter log)
{
this(cmdLine, log, null, null, 0);
this(cmdLine, log, null, null);
}
/**
......@@ -171,12 +160,8 @@ public class ProcessHandler
* timeOut = 0
* Waits for the process to end regulary
*
* timeOut < 0
* Kills the process immediately
*
*
*/
private ProcessHandler(String cmdLine, PrintWriter log, File workDir, String[] envVars, long timeOut)
private ProcessHandler(String cmdLine, PrintWriter log, File workDir, String[] envVars)
{
this.cmdLine = cmdLine;
this.workDir = workDir;
......@@ -191,49 +176,6 @@ public class ProcessHandler
{
this.log = log;
}
this.mTimeOut = timeOut;
}
/**
* Creates instance with specified external command which
* will be executed in the some work directory and
* log stream where debug info and output of external command is printed.
* If log stream is null, logging is printed to stdout.
* From the <CODE>TestParameters</CODE> the <CODE>OfficeWachter</CODE> get a ping.
* @param shortWait If this parameter is true the <CODE>mTimeOut</CODE> is set to 5000 ms, else it is set to
* half of time out from parameter timeout.
* @param param the TestParameters
* @see lib.TestParameters
* @see helper.OfficeWatcher
*/
public ProcessHandler(String[] commands, PrintWriter log, File workDir, int shortWait, TestParameters param)
{
this(null, log, workDir, null, 0);
this.cmdLineArray = commands;
if (shortWait != 0)
{
this.mTimeOut = shortWait;
}
else
{
this.mTimeOut = (long) (param.getInt(PropertyName.TIME_OUT) / 1.3);
}
debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE);
}
/**
* Executes the command and returns only when the process
* exits.
*
* @return <code>true</code> if process was successfully
* started and correctly exits (exit code doesn't affect
* to this result).
*/
public boolean executeSynchronously()
{
execute();
return waitFor(mTimeOut);
}
/**
......@@ -473,22 +415,6 @@ public class ProcessHandler
}
}
/**
* Returns the text output by external command to stdout.
* @return the text output by external command to stdout
*/
public String getOutputText()
{
if (stdout == null)
{
return "";
}
else
{
return stdout.getStringBuffer();
}
}
/**
* Returns information about was the command started or
* not.
......@@ -540,11 +466,6 @@ public class ProcessHandler
}
}
public void noOutput()
{
bUseOutput = false;
}
private static class ProcessWatcher extends Thread
{
......
......@@ -192,15 +192,6 @@ public class OfficeDocument
return UnoRuntime.queryInterface( i_interfaceClass, createInstance( i_serviceSpecifier ) );
}
/* ------------------------------------------------------------------ */
/** creates a component at the service factory provided by the document
*/
public XInterface createInstanceWithArguments( String serviceSpecifier, Object[] arguments ) throws com.sun.star.uno.Exception
{
XMultiServiceFactory xORB = UnoRuntime.queryInterface( XMultiServiceFactory.class, m_documentComponent );
return (XInterface) xORB.createInstanceWithArguments( serviceSpecifier, arguments );
}
private final XMultiServiceFactory m_orb;
private XComponent m_documentComponent;
}
......
......@@ -52,18 +52,6 @@ public class FieldColumn
private CommandMetaData m_aCommandMetaData;
public FieldColumn(CommandMetaData oCommandMetaData, String _DisplayFieldName)
{
m_sDisplayFieldName = _DisplayFieldName;
m_sCommandName = oCommandMetaData.getCommandName();
m_sFieldName = getOnlyFieldName(m_sDisplayFieldName, m_sCommandName);
// TODO: could be wrong here!
// FieldTitle = _DisplayFieldName; // oCommandMetaData.getFieldTitle(m_sFieldName);
FieldTitle = m_sFieldName;
DBMetaData.CommandObject oTable = oCommandMetaData.getTableByName(m_sCommandName);
initializeFormatKeys(oCommandMetaData, oTable.getColumns());
}
public FieldColumn(CommandMetaData oCommandMetaData, String _FieldName, String _CommandName, boolean _bInstantiateByDisplayName)
{
m_sCommandName = _CommandName;
......
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