diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-03-04 15:09:14 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-03-04 15:09:14 +0100 |
commit | cf6e5f5b6d5d18fc1792f436d573a292e7a38943 (patch) | |
tree | be43036639e1dc8411494fd951a78cebda5c0e3e /scripting | |
parent | 0cb71c1017d67e762928a12dd4a6d643d84a40bf (diff) |
Parcel.getByName apparently wants to return ScriptMetaData
Change-Id: I4a710384ec3a0d719f2ad1fbbe7b43b0be1fa1d9
Diffstat (limited to 'scripting')
3 files changed, 10 insertions, 10 deletions
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 2d293be7dc4e..8c149183840b 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java @@ -75,7 +75,7 @@ public class ScriptBrowseNode extends PropertySet implements XMultiComponentFactory xFac = xCtx.getServiceManager(); try { - data = (ScriptMetaData)parent.getByName( name ); + data = parent.getByName( name ); XSimpleFileAccess xSFA = UnoRuntime.queryInterface( XSimpleFileAccess.class, xFac.createInstanceWithContext( @@ -146,7 +146,7 @@ public class ScriptBrowseNode extends PropertySet implements parent = p; try { - ScriptMetaData data = (ScriptMetaData)parent.getByName(name); + ScriptMetaData data = parent.getByName(name); uri = data.getShortFormScriptURL(); } // TODO fix exception types to be caught here, should we rethrow? @@ -189,7 +189,7 @@ public class ScriptBrowseNode extends PropertySet implements ScriptMetaData data = null; try { - data = (ScriptMetaData)parent.getByName(name); + data = parent.getByName(name); } catch (NoSuchElementException nse) { throw new com.sun.star.lang.IllegalArgumentException(nse, name + " does not exist or can't be found "); @@ -236,7 +236,7 @@ public class ScriptBrowseNode extends PropertySet implements try { String newName = AnyConverter.toString(aParams[0]); - ScriptMetaData oldData = (ScriptMetaData)parent.getByName(name); + ScriptMetaData oldData = parent.getByName(name); oldData.loadSource(); String oldSource = oldData.getSource(); diff --git a/scripting/java/com/sun/star/script/framework/container/Parcel.java b/scripting/java/com/sun/star/script/framework/container/Parcel.java index df94463bb1eb..078ed7303c7e 100644 --- a/scripting/java/com/sun/star/script/framework/container/Parcel.java +++ b/scripting/java/com/sun/star/script/framework/container/Parcel.java @@ -69,7 +69,7 @@ public class Parcel implements XNameContainer { return name; } - public java.lang.Object getByName(String aName) throws + public ScriptMetaData getByName(String aName) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException { @@ -126,7 +126,7 @@ public class Parcel implements XNameContainer { public boolean hasByName(String aName) { boolean result = true; - Object containee = null; + ScriptMetaData containee = null; try { containee = getByName(aName); @@ -162,7 +162,7 @@ public class Parcel implements XNameContainer { // if not ok, throw IllegalArgument if (m_descriptor != null) { try { - ScriptEntry script = (ScriptEntry)getByName(aName); + ScriptMetaData script = getByName(aName); if (script != null) { //m_descriptor.removeScriptEntry( script ); @@ -253,7 +253,7 @@ public class Parcel implements XNameContainer { com.sun.star.lang.WrappedTargetException { try { - ScriptMetaData script = (ScriptMetaData)getByName(Name); + ScriptMetaData script = getByName(Name); if (script != null) { if (!script.removeSourceFile()) { @@ -299,4 +299,4 @@ public class Parcel implements XNameContainer { return path; } -}
\ No newline at end of file +} 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 febd65ad844a..35fc86776c9e 100644 --- a/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java +++ b/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java @@ -644,7 +644,7 @@ public class ParcelContainer implements XNameAccess { com.sun.star.lang.WrappedTargetException { Parcel p = (Parcel)getByName(parsedUri.parcel); - ScriptMetaData scriptData = (ScriptMetaData)p.getByName(parsedUri.function); + ScriptMetaData scriptData = p.getByName(parsedUri.function); LogUtils.DEBUG("** found script data for " + parsedUri.function + " script is " + scriptData); |