diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 16:27:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-13 08:49:24 +0200 |
commit | 8583da1e934a49791ef8d86668f3d5c3c5dae1d7 (patch) | |
tree | f092f708b7bb9a0a23ae82c1dc499a6e3fde4518 /scripting | |
parent | 68cd011c907d00493bf2bfde531c1e244819596b (diff) |
java: remove unused fields
found by UCDetector
Change-Id: I4a7c56a9918054c23469de5680658e7b501f0165
Diffstat (limited to 'scripting')
10 files changed, 16 insertions, 47 deletions
diff --git a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java index 75e4771ddf78..437b3265345b 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java @@ -57,10 +57,10 @@ public class ParcelBrowseNode extends PropertySet private Collection<XBrowseNode> browsenodes; private ParcelContainer container; private Parcel parcel; - private boolean deletable = true; - private boolean editable = false; - private boolean creatable = false; - private boolean renamable = true; + + + + public ParcelBrowseNode( ScriptProvider provider, ParcelContainer container, String parcelName ) { this.provider = provider; @@ -86,10 +86,6 @@ public class ParcelBrowseNode extends PropertySet (short)0, "creatable"); registerProperty("Renamable", new Type(boolean.class), (short)0, "renamable"); - if (provider.hasScriptEditor() == true) - { - this.creatable = true; - } String parcelDirUrl = parcel.getPathToParcel(); XComponentContext xCtx = provider.getScriptingContext().getComponentContext(); @@ -100,14 +96,6 @@ public class ParcelBrowseNode extends PropertySet xFac.createInstanceWithContext( "com.sun.star.ucb.SimpleFileAccess", xCtx ) ); - if ( xSFA != null && ( xSFA.isReadOnly( parcelDirUrl ) || - container.isUnoPkg() ) ) - { - deletable = false; - editable = false; - creatable = false; - renamable = false; - } } catch ( com.sun.star.uno.Exception e ) { diff --git a/scripting/java/com/sun/star/script/framework/browse/PkgProviderBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/PkgProviderBrowseNode.java index 2ef57466457e..900a4b3bee5d 100644 --- a/scripting/java/com/sun/star/script/framework/browse/PkgProviderBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/PkgProviderBrowseNode.java @@ -33,10 +33,6 @@ public class PkgProviderBrowseNode extends ProviderBrowseNode LogUtils.DEBUG("*** PkgProviderBrowseNode ctor container name = " + container.getName()); LogUtils.DEBUG("*** PkgProviderBrowseNode ctor container path = " + container.getParcelContainerDir()); LogUtils.DEBUG("*** PkgProviderBrowseNode ctor, container has num parcels = " + container.getElementNames().length); - deletable = false; - editable = false; - creatable = false; - } @Override diff --git a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java index 3f0f7c2b4ce2..5bb65b861f29 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java @@ -50,12 +50,12 @@ public class ProviderBrowseNode extends PropertySet private Collection<XBrowseNode> browsenodes; private String name; protected ParcelContainer container; - protected Parcel parcel; + private XComponentContext m_xCtx; - public boolean deletable = true; - public boolean creatable = true; - public boolean editable = false; + + + public ProviderBrowseNode( ScriptProvider provider, ParcelContainer container, XComponentContext xCtx ) { LogUtils.DEBUG("*** ProviderBrowseNode ctor"); @@ -78,11 +78,6 @@ public class ProviderBrowseNode extends PropertySet xFac.createInstanceWithContext( "com.sun.star.ucb.SimpleFileAccess", xCtx ) ); - if ( container.isUnoPkg() || xSFA.isReadOnly( container.getParcelContainerDir() ) ) - { - deletable = false; - creatable = false; - } } // TODO propage errors catch( com.sun.star.uno.Exception e ) diff --git a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java index 88557010d9bf..1e5df7130dec 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java @@ -52,8 +52,8 @@ public class ScriptBrowseNode extends PropertySet private Parcel parent; private String name; - private String uri; - private String description; + + private boolean editable = false; private boolean deletable = false; private boolean renamable = false; @@ -83,9 +83,6 @@ public class ScriptBrowseNode extends PropertySet LogUtils.DEBUG("** caught exception getting script data for " + name + " ->" + e.toString() ); } - uri = data.getShortFormScriptURL(); - description = data.getDescription(); - if (provider.hasScriptEditor() == true) { @@ -155,7 +152,6 @@ public class ScriptBrowseNode extends PropertySet { LogUtils.DEBUG("** caught exception getting script data for " + name + " ->" + e.toString() ); } - uri = data.getShortFormScriptURL(); } // implementation of XInvocation interface public XIntrospectionAccess getIntrospection() { @@ -271,7 +267,6 @@ public class ScriptBrowseNode extends PropertySet LogUtils.DEBUG("Now remove old script"); parent.removeByName( name ); - uri = data.getShortFormScriptURL(); name = languageName; result = new Any(new Type(XBrowseNode.class), this); } diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java b/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java index bb6c6fd39781..cf860de625b4 100644 --- a/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java +++ b/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java @@ -683,8 +683,6 @@ public ParsedScriptUri parseScriptUri( String scriptURI ) throws com.sun.star.l } ParsedScriptUri parsedUri = new ParsedScriptUri(); - // parse language - parsedUri.language = sfUri.getParameter("language"); parsedUri.function= sfUri.getName(); parsedUri.parcel = ""; diff --git a/scripting/java/com/sun/star/script/framework/container/ParsedScriptUri.java b/scripting/java/com/sun/star/script/framework/container/ParsedScriptUri.java index 8ca004b99287..477604c721ac 100644 --- a/scripting/java/com/sun/star/script/framework/container/ParsedScriptUri.java +++ b/scripting/java/com/sun/star/script/framework/container/ParsedScriptUri.java @@ -19,7 +19,7 @@ package com.sun.star.script.framework.container; public class ParsedScriptUri { - public String language; + public String location; public String function; public String parcel; diff --git a/scripting/java/com/sun/star/script/framework/provider/PathUtils.java b/scripting/java/com/sun/star/script/framework/provider/PathUtils.java index 63e8296e0b91..307d3460b9ab 100644 --- a/scripting/java/com/sun/star/script/framework/provider/PathUtils.java +++ b/scripting/java/com/sun/star/script/framework/provider/PathUtils.java @@ -27,7 +27,7 @@ import com.sun.star.uno.IQueryInterface; public class PathUtils { - private static String FILE_URL_PREFIX; + public static String BOOTSTRAP_NAME; private static boolean m_windows = false; @@ -36,7 +36,6 @@ public class PathUtils { if (System.getProperty("os.name").startsWith("Windows")) m_windows = true; - FILE_URL_PREFIX = m_windows ? "file:///" : "file://"; BOOTSTRAP_NAME = m_windows ? "bootstrap.ini" : "bootstraprc"; } public static String getOidForModel( XModel xModel ) diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptContext.java b/scripting/java/com/sun/star/script/framework/provider/ScriptContext.java index 0f21981b8678..8e7d0ec4f986 100644 --- a/scripting/java/com/sun/star/script/framework/provider/ScriptContext.java +++ b/scripting/java/com/sun/star/script/framework/provider/ScriptContext.java @@ -42,9 +42,9 @@ public class ScriptContext extends PropertySet implements XScriptContext private XModel m_xModel = null; private XScriptInvocationContext m_xInvocationContext = null; - public String m_sDocURI = null; + private XDesktop m_xDeskTop = null; - public Integer m_iStorageID = null; + private XComponentContext m_xComponentContext = null; private ScriptContext( XComponentContext xmComponentContext, diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java index ad0c7b07fcad..5b0209a32c4d 100644 --- a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java +++ b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java @@ -87,7 +87,7 @@ public abstract class ScriptProvider "com.sun.star.script.provider.LanguageScriptProvider" }; - public final static String CLASSPATH = "classpath"; + protected String language; diff --git a/scripting/java/org/openoffice/idesupport/SVersionRCFile.java b/scripting/java/org/openoffice/idesupport/SVersionRCFile.java index e4854d26f1bb..30ad0bb81aca 100644 --- a/scripting/java/org/openoffice/idesupport/SVersionRCFile.java +++ b/scripting/java/org/openoffice/idesupport/SVersionRCFile.java @@ -41,9 +41,7 @@ public class SVersionRCFile { System.getProperty("os.name").startsWith("Windows") == true ? "file:///" : "file://"; - public static final String PKGCHK = - System.getProperty("os.name").startsWith("Windows") == true ? - "pkgchk.exe" : "pkgchk"; + private static final String VERSIONS_LINE = "[Versions]"; |