summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-06 09:08:56 +0200
committerNoel Grandin <noel@peralex.com>2014-08-12 09:41:30 +0200
commit2035213b0bdd7bf765679a7a912bd4a60bbcaf0d (patch)
tree0682786523b36aab6227ce69da2fe6ce0ed937a7 /odk
parentf35c72119657d82e32f6165f1d2ed2bad2bb67fb (diff)
java: remove unused methods
Change-Id: Ifd5de2d7cd1fa6ac34e45b17293c9f245a554a37
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/java/Inspector/InspectorPane.java36
-rw-r--r--odk/examples/java/Inspector/Introspector.java1
-rw-r--r--odk/examples/java/Inspector/SourceCodeGenerator.java5
-rw-r--r--odk/examples/java/Inspector/UnoNode.java71
4 files changed, 0 insertions, 113 deletions
diff --git a/odk/examples/java/Inspector/InspectorPane.java b/odk/examples/java/Inspector/InspectorPane.java
index b77cb9bb975c..8965312d4c51 100644
--- a/odk/examples/java/Inspector/InspectorPane.java
+++ b/odk/examples/java/Inspector/InspectorPane.java
@@ -538,19 +538,6 @@ import com.sun.star.uno.XComponentContext;
}
- /** In opposition to 'getUnoObjectOfTreeNode' this method inspects the passed node if it represents a Uno object
- * If not it returns null
- *
- */
- private Object getUnoObjectOfExplicitTreeNode(XTreePathProvider _xTreePathProvider){
- XUnoNode oUnoNode = _xTreePathProvider.getLastPathComponent();
- if (oUnoNode != null){
- return oUnoNode.getUnoObject();
- }
- return null;
- }
-
-
public String getFilter(XUnoNode _oUnoNode){
String sFilter = "";
if (_oUnoNode != null){
@@ -575,29 +562,6 @@ import com.sun.star.uno.XComponentContext;
}
- /** In opposition to 'getUnoObjectOfexplictTreeNode' this method inspects the passed node if it represents a Uno object
- * if not it keeps checking all ancestors until it finds a Uno representation
- */
- private Object getUnoObjectOfTreeNode(XTreePathProvider _xTreePathProvider){
- XTreePathProvider xTreePathProvider = _xTreePathProvider;
- Object oUnoObject = null;
- while (xTreePathProvider != null){
- oUnoObject = getUnoObjectOfExplicitTreeNode(xTreePathProvider);
- if (oUnoObject != null){
- if (oUnoObject instanceof String){
- }
- else{
- if (!Introspector.isUnoTypeObject(oUnoObject)){
- return oUnoObject;
- }
- }
- }
- xTreePathProvider = xTreePathProvider.getParentPath();
- }
- return null;
- }
-
-
public void showPopUpMenu(Object _invoker, int x, int y) throws ClassCastException{
XUnoNode oUnoNode = getSelectedNode();
boolean bdoEnableInvoke = oUnoNode instanceof XUnoMethodNode;
diff --git a/odk/examples/java/Inspector/Introspector.java b/odk/examples/java/Inspector/Introspector.java
index d644f64a6d4d..ca335a3bfe38 100644
--- a/odk/examples/java/Inspector/Introspector.java
+++ b/odk/examples/java/Inspector/Introspector.java
@@ -68,7 +68,6 @@ import com.sun.star.uno.Type;
import com.sun.star.uno.TypeClass;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
-import com.sun.star.util.URL;
public class Introspector extends WeakBase{
diff --git a/odk/examples/java/Inspector/SourceCodeGenerator.java b/odk/examples/java/Inspector/SourceCodeGenerator.java
index 6538c17465fb..30e494e04af8 100644
--- a/odk/examples/java/Inspector/SourceCodeGenerator.java
+++ b/odk/examples/java/Inspector/SourceCodeGenerator.java
@@ -329,11 +329,6 @@ public class SourceCodeGenerator {
}
}
- private String getRootDescription(XUnoNode _oUnoNode){
- return "_o" + _oUnoNode.toString();
- }
-
-
private String getHeaderSourceCode(){
for(UnoObjectDefinition oUnoObjectDefinition : aVariables.values()){
String sCurHeaderStatement = m_xLanguageSourceCodeGenerator.getHeaderSourceCode(oUnoObjectDefinition.getUnoObject(), oUnoObjectDefinition.getTypeName(), oUnoObjectDefinition.getTypeClass());
diff --git a/odk/examples/java/Inspector/UnoNode.java b/odk/examples/java/Inspector/UnoNode.java
index 4e6352ed647a..cd2ac16c74d9 100644
--- a/odk/examples/java/Inspector/UnoNode.java
+++ b/odk/examples/java/Inspector/UnoNode.java
@@ -32,9 +32,6 @@
*
*************************************************************************/
-import java.util.ArrayList;
-import java.util.List;
-
import com.sun.star.beans.PropertyValue;
import com.sun.star.frame.FrameSearchFlag;
import com.sun.star.frame.XDesktop;
@@ -43,11 +40,6 @@ import com.sun.star.frame.XDispatchProvider;
import com.sun.star.frame.XFrame;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lang.XServiceInfo;
-import com.sun.star.reflection.TypeDescriptionSearchDepth;
-import com.sun.star.reflection.XServiceTypeDescription;
-import com.sun.star.reflection.XTypeDescription;
-import com.sun.star.reflection.XTypeDescriptionEnumeration;
-import com.sun.star.reflection.XTypeDescriptionEnumerationAccess;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.Type;
import com.sun.star.uno.TypeClass;
@@ -97,11 +89,6 @@ public class UnoNode{
}
- private static XTypeDescriptionEnumerationAccess getXTypeDescriptionEnumerationAccess(){
- return Introspector.getIntrospector().getXTypeDescriptionEnumerationAccess();
- }
-
-
public String getAnchor(){
return "";
}
@@ -208,15 +195,6 @@ public class UnoNode{
}}
- private PropertyValue[] loadArgs(String url) {
- PropertyValue pv = new PropertyValue();
- pv.Name = "URL";
- pv.Value = url;
- return new PropertyValue[] {pv};
- }
-
-
-
public boolean isFilterApplicable(String _sFilter, String _sName){
boolean bFilterDoesApply = true;
if (_sFilter.length() > 0){
@@ -228,55 +206,6 @@ public class UnoNode{
}
- private static String[] getMandatoryServiceNames(String _sServiceName){
- String[] sMandatoryServiceNames = new String[]{};
- try {
- TypeClass[] eTypeClasses = new com.sun.star.uno.TypeClass[1];
- eTypeClasses[0] = com.sun.star.uno.TypeClass.SERVICE;
- XTypeDescriptionEnumeration xTDEnumeration = getXTypeDescriptionEnumerationAccess().createTypeDescriptionEnumeration(Introspector.getModuleName(_sServiceName), eTypeClasses, TypeDescriptionSearchDepth.INFINITE);
- while (xTDEnumeration.hasMoreElements()) {
- XTypeDescription xTD = xTDEnumeration.nextTypeDescription();
- if (xTD.getName().equals(_sServiceName)){
- XServiceTypeDescription xServiceTypeDescription = UnoRuntime.queryInterface(XServiceTypeDescription.class, xTD);
- XServiceTypeDescription[] xMandatoryServiceTypeDescriptions = xServiceTypeDescription.getMandatoryServices();
- int nlength = xMandatoryServiceTypeDescriptions.length;
- sMandatoryServiceNames = new String[nlength];
- for (int i = 0; i < nlength; i++){
- sMandatoryServiceNames[i] = xMandatoryServiceTypeDescriptions[i].getName();
- }
-
- }
- }
- } catch ( java.lang.Exception e) {
- System.out.println(System.out);
- }
- return sMandatoryServiceNames;
- }
-
-
- private static String[] removeMandatoryServiceNames(String[] _sServiceNames){
- try{
- List<String> aList = java.util.Arrays.asList(_sServiceNames);
- ArrayList<String> aVector = new ArrayList<String>(aList);
- for (int n = 0; n < _sServiceNames.length; n++){
- String[] sDelServiceNames = getMandatoryServiceNames(_sServiceNames[n]);
- for (int m = 0; m < sDelServiceNames.length; m++){
- if (aVector.contains(sDelServiceNames[m])){
- int nIndex = aVector.indexOf(sDelServiceNames[m]);
- aVector.remove(nIndex);
- }
- }
- }
- String[] sRetArray = new String[aVector.size()];
- aVector.toArray(sRetArray);
- return sRetArray;
- } catch (java.lang.Exception exception) {
- exception.printStackTrace(System.err);
- }
- return new String[]{};
- }
-
-
public static String getDisplayValueOfPrimitiveType(Object _objectElement){
String sValue ="";
try{