connectivity/qa/connectivity/tools/FlatFileDatabase.java | 18 -- qadevOOo/runner/helper/ProcessHandler.java | 83 ---------- unotest/source/java/org/openoffice/test/tools/OfficeDocument.java | 9 - wizards/com/sun/star/wizards/db/FieldColumn.java | 12 - 4 files changed, 2 insertions(+), 120 deletions(-)
New commits: commit 10cb59eb914ba722c203242272de244d795a51e8 Author: Noel Grandin <n...@peralex.com> Date: Mon Jan 16 16:41:53 2017 +0200 remove some unused Java code Change-Id: Ia1663256fc0b92c343ea4ba55a821c969077a0aa Reviewed-on: https://gerrit.libreoffice.org/33174 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/connectivity/qa/connectivity/tools/FlatFileDatabase.java b/connectivity/qa/connectivity/tools/FlatFileDatabase.java index 4a292c0..5351ba9 100644 --- a/connectivity/qa/connectivity/tools/FlatFileDatabase.java +++ b/connectivity/qa/connectivity/tools/FlatFileDatabase.java @@ -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. */ diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java index cd49021..4ba1b5d 100644 --- a/qadevOOo/runner/helper/ProcessHandler.java +++ b/qadevOOo/runner/helper/ProcessHandler.java @@ -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; @@ -129,23 +128,13 @@ public class ProcessHandler 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 * of external command is printed out. */ 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); } /** @@ -474,22 +416,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 { diff --git a/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java b/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java index 9f18a6e..bd996c0 100644 --- a/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java +++ b/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java @@ -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; } diff --git a/wizards/com/sun/star/wizards/db/FieldColumn.java b/wizards/com/sun/star/wizards/db/FieldColumn.java index 7765049..29e4b39 100644 --- a/wizards/com/sun/star/wizards/db/FieldColumn.java +++ b/wizards/com/sun/star/wizards/db/FieldColumn.java @@ -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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits