scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java | 8 ++++---- scripting/java/com/sun/star/script/framework/container/Parcel.java | 10 +++++----- scripting/java/com/sun/star/script/framework/container/ParcelContainer.java | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit cf6e5f5b6d5d18fc1792f436d573a292e7a38943 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Mar 4 15:09:14 2016 +0100 Parcel.getByName apparently wants to return ScriptMetaData Change-Id: I4a710384ec3a0d719f2ad1fbbe7b43b0be1fa1d9 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 2d293be..8c14918 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 df94463..078ed73 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 febd65a..35fc867 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits