summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/helper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-13 10:08:31 +0200
committerNoel Grandin <noel@peralex.com>2014-08-13 10:24:10 +0200
commit34bcf9b498bccb5c924f4cec850ff15d88df6f07 (patch)
tree4d9604ec8c3b73639338ec45a0618b5daa5cf0ed /qadevOOo/runner/helper
parent347926e8e57c1825261daa46c1886aa2ebf9571b (diff)
java: remove dead methods
found by UCDetector Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
Diffstat (limited to 'qadevOOo/runner/helper')
-rw-r--r--qadevOOo/runner/helper/ConfigHelper.java22
-rw-r--r--qadevOOo/runner/helper/ConfigurationRead.java30
-rw-r--r--qadevOOo/runner/helper/FileTools.java12
-rw-r--r--qadevOOo/runner/helper/ProcessHandler.java40
-rw-r--r--qadevOOo/runner/helper/StringHelper.java18
-rw-r--r--qadevOOo/runner/helper/URLHelper.java73
6 files changed, 6 insertions, 189 deletions
diff --git a/qadevOOo/runner/helper/ConfigHelper.java b/qadevOOo/runner/helper/ConfigHelper.java
index 3d62291baa00..f6029bc0e8a0 100644
--- a/qadevOOo/runner/helper/ConfigHelper.java
+++ b/qadevOOo/runner/helper/ConfigHelper.java
@@ -181,28 +181,10 @@ public class ConfigHelper
}
- public static Object readDirectKey(XMultiServiceFactory xSMGR ,
- String sConfigFile,
- String sRelPath ,
- String sKey )
- throws com.sun.star.uno.Exception
- {
- ConfigHelper aConfig = new ConfigHelper(xSMGR, sConfigFile, true);
- return aConfig.readRelativeKey(sRelPath, sKey);
- }
- public static void writeDirectKey(XMultiServiceFactory xSMGR ,
- String sConfigFile,
- String sRelPath ,
- String sKey ,
- Object aValue )
- throws com.sun.star.uno.Exception
- {
- ConfigHelper aConfig = new ConfigHelper(xSMGR, sConfigFile, false);
- aConfig.writeRelativeKey(sRelPath, sKey, aValue);
- aConfig.flush();
- }
+
+
/**
diff --git a/qadevOOo/runner/helper/ConfigurationRead.java b/qadevOOo/runner/helper/ConfigurationRead.java
index bde788a5e687..e698d47104f3 100644
--- a/qadevOOo/runner/helper/ConfigurationRead.java
+++ b/qadevOOo/runner/helper/ConfigurationRead.java
@@ -71,14 +71,7 @@ public class ConfigurationRead {
this(xMSF, "org.openoffice.Setup");
}
- /**
- * Does the node with this hierarchical name exist?
- * @param name The hierarchical name of a subnode.
- * @return True, if the node exists.
- */
- public boolean hasByHieracrhicalName(String name) {
- return root.hasByHierarchicalName(name);
- }
+
/**
@@ -91,28 +84,7 @@ public class ConfigurationRead {
return names;
}
- /**
- * Get all elements of this node
- * @param name The name of the node
- * @return All elements of this node (as hierarchical names).
- */
- public String[] getSubNodeNames(String name) {
- String[]names = null;
- try {
- Object next = root.getByHierarchicalName(name);
- XNameAccess x = UnoRuntime.queryInterface(
- XNameAccess.class, next);
- names = x.getElementNames();
- for (int i=0; i< names.length; i++) {
- names[i] = name + "/" + names[i];
- }
- }
- catch(Exception e) {
- //just return null, if there are no further nodes
- }
- return names;
- }
/**
* Get contents of a node by its hierarchical name.
diff --git a/qadevOOo/runner/helper/FileTools.java b/qadevOOo/runner/helper/FileTools.java
index 8a859183ebf6..cede7c46059d 100644
--- a/qadevOOo/runner/helper/FileTools.java
+++ b/qadevOOo/runner/helper/FileTools.java
@@ -92,19 +92,7 @@ public class FileTools {
in.close();
out.close();
}
- /**
- * Deletes all files and subdirectories under dir and the directory itself.
- * Returns true if all deletions were successful.
- * If the deletion fails, the method the method continues to delete rest
- * of the files and returns false.
- * @return Returns true if all deletions were successful, else false.
- * @param dir the directory to delete
- */
- public static boolean deleteDir(File dir) {
- // The directory is now empty so delete it
- return cleanDir(dir);
- }
public static boolean cleanDir(File dir)
{
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index 43372d224b67..35b32999cb4a 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -576,18 +576,7 @@ public class ProcessHandler
flushInput();
}
- /**
- * This method is useful when the process was executed
- * asynchronously. Waits for process to exit and return
- * its result.
- *
- * @return <code>true</code> if process correctly exited
- * (exit code doesn't affect to this result).
- */
- public boolean waitFor()
- {
- return waitFor(0);
- }
+
/**
* This method is useful when the process was executed
@@ -737,20 +726,7 @@ public class ProcessHandler
}
}
- /**
- * Prints the string specified to sdtin of external
- * command. '\n' is not added so if you need you
- * should terminate the string with '\n'. <p>
- *
- * The method can also be called before the command
- * starts its execution. Then the text is buffered
- * and transferred to command when it will be started.
- */
- public void printInputText(String str)
- {
- stdInBuff += str;
- flushInput();
- }
+
/**
* Returns information about was the command started or
@@ -940,15 +916,5 @@ public class ProcessHandler
}
}
- /**
- * to stop the extra thread, before he will kill a running office. This will stop the thread.
- */
- public void stopWatcher()
- {
- if (m_aWatcher != null)
- {
- m_aWatcher.holdOn();
- shortWait(5000);
- }
- }
+
}
diff --git a/qadevOOo/runner/helper/StringHelper.java b/qadevOOo/runner/helper/StringHelper.java
index 3ed630030e76..6308a0a2eacb 100644
--- a/qadevOOo/runner/helper/StringHelper.java
+++ b/qadevOOo/runner/helper/StringHelper.java
@@ -71,25 +71,7 @@ public class StringHelper
return sNewPath;
}
- public static String doubleQuoteIfNeed(String _sStr)
- {
- if (_sStr.startsWith("\"") && _sStr.endsWith("\""))
- {
- // don't quote twice
- return _sStr;
- }
- if (_sStr.indexOf(" ") == -1)
- {
- // don't quote, if there is no space in name
- return _sStr;
- }
- if (_sStr.indexOf("%") != -1)
- {
- return singleQuote(_sStr);
- }
- return doubleQuote(_sStr);
- }
/**
* Convert a value to a string with a given length, if the len is greater the len of the value string representation
diff --git a/qadevOOo/runner/helper/URLHelper.java b/qadevOOo/runner/helper/URLHelper.java
index c869f1a1d48b..ebf59b01e0eb 100644
--- a/qadevOOo/runner/helper/URLHelper.java
+++ b/qadevOOo/runner/helper/URLHelper.java
@@ -144,84 +144,11 @@ public class URLHelper
- /**
- * The same as getURLWithProtocolFromSystemPath() before but uses string parameter instead
- * of a File types. It exist to supress converting of necessary parameters in the
- * outside code. But of course getURLWithProtocolFromSystemPath(File,File,String) will be
- * a little bit faster then this method ...
- *
- * @param sSystemPath
- * represent the file in system notation
- *
- * @param sBasePath
- * define the base path of the aSystemPath value,
- * which must be replaced with the value of "sServerPath".
- *
- * @param sServerPath
- * Will be used to replace sBasePath.
- *
- * @example
- * System Path = "d:\test\file.txt"
- * Base Path = "d:\test"
- * Server Path = "http://alaska:8000"
- * => "http://alaska:8000/file.txt"
- *
- * @return [String]
- * an url which represent the given system path
- * and uses the given protocol
- */
- public static String getURLWithProtocolFromSystemPath( String sSystemPath, String sBasePath, String sServerPath )
- {
- return getURLWithProtocolFromSystemPath(new File(sSystemPath), new File(sBasePath), sServerPath);
- }
- /**
- * This convert an URL (formated as a string) to a struct com.sun.star.util.URL.
- * It use a special service to do that: the URLTransformer.
- * Because some API calls need it and it's not allowed to set "Complete"
- * part of the util struct only. The URL must be parsed.
- *
- * @param sURL
- * URL for parsing in string notation
- *
- * @return [com.sun.star.util.URL]
- * URL in UNO struct notation
- */
- public static com.sun.star.util.URL parseURL(XURLTransformer xParser, String sURL)
- {
- com.sun.star.util.URL aURL = null;
- if (sURL==null || sURL.equals(""))
- return null;
-
- try
- {
- // Create special service for parsing of given URL.
-/* com.sun.star.util.XURLTransformer xParser = (com.sun.star.util.XURLTransformer)OfficeConnect.createRemoteInstance(
- com.sun.star.util.XURLTransformer.class,
- "com.sun.star.util.URLTransformer");
-*/
- // Because it's an in/out parameter we must use an array of URL objects.
- com.sun.star.util.URL[] aParseURL = new com.sun.star.util.URL[1];
- aParseURL[0] = new com.sun.star.util.URL();
- aParseURL[0].Complete = sURL;
-
- // Parse the URL
- xParser.parseStrict(aParseURL);
-
- aURL = aParseURL[0];
- }
- catch(com.sun.star.uno.RuntimeException exRuntime)
- {
- // Any UNO method of this scope can throw this exception.
- // Reset the return value only.
- aURL = null;
- }
- return aURL;
- }
/**