[Libreoffice-commits] .: accessibility/bridge bean/com bean/qa filter/qa filter/source javaunohelper/com javaunohelper/test jurt/test odk/source scripting/java unotest/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 20 11:05:00 PDT 2012
accessibility/bridge/org/openoffice/accessibility/AccessBridge.java | 13 -
accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java | 14 -
accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java | 6
accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java | 3
accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java | 7
accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java | 6
accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java | 12
accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java | 3
accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java | 2
accessibility/bridge/org/openoffice/java/accessibility/Component.java | 21 -
accessibility/bridge/org/openoffice/java/accessibility/Container.java | 19 -
accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java | 4
accessibility/bridge/org/openoffice/java/accessibility/Dialog.java | 5
accessibility/bridge/org/openoffice/java/accessibility/Frame.java | 5
accessibility/bridge/org/openoffice/java/accessibility/Icon.java | 2
accessibility/bridge/org/openoffice/java/accessibility/Label.java | 2
accessibility/bridge/org/openoffice/java/accessibility/List.java | 19 -
accessibility/bridge/org/openoffice/java/accessibility/Menu.java | 10
accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java | 2
accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java | 8
accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java | 5
accessibility/bridge/org/openoffice/java/accessibility/Table.java | 21 -
accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java | 9
accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java | 2
accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java | 2
accessibility/bridge/org/openoffice/java/accessibility/Tree.java | 24 -
accessibility/bridge/org/openoffice/java/accessibility/Window.java | 5
accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java | 9
accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java | 2
bean/com/sun/star/beans/LocalOfficeConnection.java | 11
bean/com/sun/star/beans/LocalOfficeWindow.java | 16 -
bean/com/sun/star/comp/beans/Controller.java | 5
bean/com/sun/star/comp/beans/Frame.java | 10
bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 15 -
bean/com/sun/star/comp/beans/LocalOfficeWindow.java | 16 -
bean/com/sun/star/comp/beans/OOoBean.java | 42 +--
bean/com/sun/star/comp/beans/OfficeDocument.java | 15 -
bean/com/sun/star/comp/beans/Wrapper.java | 5
bean/qa/complex/bean/OOoBeanTest.java | 2
bean/qa/complex/bean/WriterFrame.java | 8
filter/qa/complex/filter/detection/typeDetection/Helper.java | 127 ++++------
filter/qa/complex/filter/detection/typeDetection/TypeDetection.java | 72 ++---
filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java | 2
filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTFilterOLEExtracter.java | 30 +-
filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java | 2
javaunohelper/com/sun/star/lib/uno/adapter/ByteArrayToXInputStreamAdapter.java | 2
javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java | 2
javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java | 8
javaunohelper/test/com/sun/star/comp/helper/Bootstrap_Test.java | 4
javaunohelper/test/com/sun/star/comp/helper/ComponentContext_Test.java | 4
javaunohelper/test/com/sun/star/lib/uno/helper/InterfaceContainer_Test.java | 16 -
javaunohelper/test/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer_Test.java | 12
javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java | 70 ++---
javaunohelper/test/com/sun/star/lib/uno/helper/UnoUrlTest.java | 6
jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java | 2
jurt/test/com/sun/star/lib/uno/protocols/urp/Protocol_Test.java | 4
odk/source/com/sun/star/lib/loader/InstallationFinder.java | 6
odk/source/com/sun/star/lib/loader/Loader.java | 18 -
scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java | 50 +--
scripting/java/com/sun/star/script/framework/browse/DialogFactory.java | 75 ++---
scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java | 15 -
scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java | 11
scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java | 13 -
scripting/java/com/sun/star/script/framework/container/Parcel.java | 3
scripting/java/com/sun/star/script/framework/container/ParcelContainer.java | 15 -
scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java | 6
scripting/java/com/sun/star/script/framework/container/ScriptEntry.java | 10
scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java | 10
scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java | 2
scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java | 4
scripting/java/com/sun/star/script/framework/io/XStorageHelper.java | 21 -
scripting/java/com/sun/star/script/framework/provider/EditorScriptContext.java | 4
scripting/java/com/sun/star/script/framework/provider/ScriptContext.java | 3
scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java | 31 +-
scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java | 13 -
scripting/java/com/sun/star/script/framework/provider/java/Resolver.java | 2
scripting/java/com/sun/star/script/framework/provider/java/ScriptDescriptor.java | 4
scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java | 5
scripting/java/com/sun/star/script/framework/provider/java/StrictResolver.java | 2
scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java | 18 -
unotest/source/java/org/openoffice/test/tools/OfficeDocument.java | 2
81 files changed, 507 insertions(+), 586 deletions(-)
New commits:
commit 8bfe47960f60e1dc2e6bcf0f3c3f7e43dfd3fc0b
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 20 17:05:35 2012 +0100
Java5 updates - convert to generics
Change-Id: I039e51958865a7ea000034e7bf765f64d49689cd
diff --git a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
index 1d99feb..d4aff6b 100644
--- a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
+++ b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
@@ -34,6 +34,7 @@ import com.sun.star.uno.*;
import org.openoffice.java.accessibility.*;
+import java.awt.Window;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -42,7 +43,7 @@ import javax.accessibility.Accessible;
public class AccessBridge {
//
- protected static java.util.Hashtable topWindowMap = new java.util.Hashtable();
+ protected static java.util.Hashtable<String, Window> topWindowMap = new java.util.Hashtable<String, Window>();
private static java.awt.Window getTopWindowImpl(XAccessible xAccessible) {
// Because it can not be garantied that
@@ -51,7 +52,7 @@ public class AccessBridge {
// atomic.
synchronized (topWindowMap) {
String oid = UnoRuntime.generateOid(xAccessible);
- java.awt.Window w = (java.awt.Window) topWindowMap.get(oid);
+ java.awt.Window w = topWindowMap.get(oid);
if (w == null) {
w = AccessibleObjectFactory.getTopWindow(xAccessible);
@@ -107,7 +108,7 @@ public class AccessBridge {
case AccessibleRole.WINDOW:
case AccessibleRole.FRAME:
case AccessibleRole.DIALOG:
- return (java.awt.Window) topWindowMap.remove(UnoRuntime.generateOid(xAccessible));
+ return topWindowMap.remove(UnoRuntime.generateOid(xAccessible));
default:
break;
@@ -156,7 +157,7 @@ public class AccessBridge {
// FIXME this should be done in VCL
unoToolkit.addTopWindowListener(this);
- String os = (String) System.getProperty("os.name");
+ String os = System.getProperty("os.name");
// Try to initialize the WindowsAccessBridgeAdapter
if (os.startsWith("Windows")) {
@@ -177,7 +178,7 @@ public class AccessBridge {
* XTopWindowListener
*/
public void windowOpened(com.sun.star.lang.EventObject event) {
- XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface(XAccessible.class,
+ XAccessible xAccessible = UnoRuntime.queryInterface(XAccessible.class,
event.Source);
java.awt.Window w = getTopWindow(xAccessible);
}
@@ -198,7 +199,7 @@ public class AccessBridge {
}
public void windowClosed(com.sun.star.lang.EventObject event) {
- XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface(XAccessible.class,
+ XAccessible xAccessible = UnoRuntime.queryInterface(XAccessible.class,
event.Source);
java.awt.Window w = removeTopWindow(xAccessible);
diff --git a/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java b/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java
index 15fded2..41e0e03 100644
--- a/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java
+++ b/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java
@@ -34,7 +34,7 @@ import javax.accessibility.*;
public class WindowsAccessBridgeAdapter {
private static Method registerVirtualFrame;
private static Method revokeVirtualFrame;
- private static java.util.Hashtable frameMap;
+ private static java.util.Hashtable<Integer, Accessible> frameMap;
protected static native byte[] getProcessID();
@@ -44,9 +44,9 @@ public class WindowsAccessBridgeAdapter {
// Therefor the bridge exports two methods that we try to find here.
protected static void attach(XComponentContext xComponentContext) {
try {
- Class bridge = Class.forName(
+ Class<?> bridge = Class.forName(
"com.sun.java.accessibility.AccessBridge");
- Class[] parameterTypes = {
+ Class<?>[] parameterTypes = {
javax.accessibility.Accessible.class, Integer.class
};
@@ -63,7 +63,7 @@ public class WindowsAccessBridgeAdapter {
"/singletons/com.sun.star.java.theJavaVirtualMachine");
if (AnyConverter.isObject(any)) {
- XJavaVM xJavaVM = (XJavaVM) UnoRuntime.queryInterface(XJavaVM.class,
+ XJavaVM xJavaVM = UnoRuntime.queryInterface(XJavaVM.class,
AnyConverter.toObject(new Type(XJavaVM.class), any));
if (xJavaVM != null) {
@@ -71,7 +71,7 @@ public class WindowsAccessBridgeAdapter {
if (AnyConverter.isLong(any)) {
createMapping(AnyConverter.toLong(any));
- frameMap = new java.util.Hashtable();
+ frameMap = new java.util.Hashtable<Integer, Accessible>();
}
}
}
@@ -149,7 +149,7 @@ public class WindowsAccessBridgeAdapter {
break;
default:
- a = (Accessible) AccessBridge.getTopWindow(xAccessible);
+ a = AccessBridge.getTopWindow(xAccessible);
break;
}
}
@@ -201,7 +201,7 @@ public class WindowsAccessBridgeAdapter {
public static void revokeTopWindow(int handle, XAccessible xAccessible) {
Integer hwnd = new Integer(handle);
- Accessible a = (Accessible) frameMap.remove(hwnd);
+ Accessible a = frameMap.remove(hwnd);
if (a != null) {
Object[] args = { a, hwnd };
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java b/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java
index e4b4f17..530a5dd 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java
@@ -57,8 +57,7 @@ public abstract class AbstractButton extends Component {
return null;
try {
- XAccessibleText unoAccessibleText = (XAccessibleText)
- UnoRuntime.queryInterface(XAccessibleText.class,unoAccessibleComponent);
+ XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class,unoAccessibleComponent);
if (unoAccessibleText != null) {
return new AccessibleTextImpl(unoAccessibleText);
} else {
@@ -137,8 +136,7 @@ public abstract class AbstractButton extends Component {
XAccessibleContext xAccessibleContext = unoAccessibleContext;
if (xAccessibleContext != null) {
// Query for XAccessibleAction interface
- XAccessibleAction xAccessibleAction = (XAccessibleAction)
- UnoRuntime.queryInterface(XAccessibleAction.class, xAccessibleContext);
+ XAccessibleAction xAccessibleAction = UnoRuntime.queryInterface(XAccessibleAction.class, xAccessibleContext);
if (xAccessibleAction != null) {
return xAccessibleAction.doAccessibleAction(0);
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java
index 557bae2..03e1fa5 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java
@@ -36,8 +36,7 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
protected boolean hasState(short state) {
try {
- XAccessibleContext unoAccessibleContext = (XAccessibleContext)
- UnoRuntime.queryInterface(XAccessibleContext.class, unoObject);
+ XAccessibleContext unoAccessibleContext = UnoRuntime.queryInterface(XAccessibleContext.class, unoObject);
// All UNO accessibility implementations must support XAccessibleContext
// and return a valid XAccessibleStateSet ..
return unoAccessibleContext.getAccessibleStateSet().contains(state);
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
index c996081..a12f08d 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
@@ -23,6 +23,7 @@ import com.sun.star.style.*;
import com.sun.star.uno.*;
import com.sun.star.accessibility.AccessibleTextType;
import com.sun.star.accessibility.XAccessibleEditableText;
+import com.sun.star.beans.PropertyValue;
import javax.accessibility.AccessibleText;
import javax.swing.text.StyleConstants;
@@ -104,7 +105,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
/** Sets the attributes for the text between two indices */
public void setAttributes(int startIndex, int endIndex, javax.swing.text.AttributeSet as) {
- java.util.ArrayList propertyValues = new java.util.ArrayList();
+ java.util.ArrayList<PropertyValue> propertyValues = new java.util.ArrayList<PropertyValue>();
// Convert Alignment attribute
Object attribute = as.getAttribute(StyleConstants.Alignment);
@@ -298,7 +299,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
propertyValue.Name = "ParaTabStops";
javax.swing.text.TabSet tabSet = StyleConstants.getTabSet(as);
- java.util.ArrayList tabStops = new java.util.ArrayList(tabSet.getTabCount());
+ java.util.ArrayList<TabStop> tabStops = new java.util.ArrayList<TabStop>(tabSet.getTabCount());
for (int i = 0, max = tabSet.getTabCount(); i < max; i++) {
javax.swing.text.TabStop tab = tabSet.getTab(i);
@@ -323,7 +324,7 @@ public class AccessibleEditableTextImpl extends AccessibleTextImpl implements ja
tabStops.add(unoTab);
}
- propertyValue.Value = (com.sun.star.style.TabStop[]) tabStops.toArray();
+ propertyValue.Value = tabStops.toArray();
propertyValues.add(propertyValue);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java
index 11223ed..24ab5ef 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java
@@ -136,14 +136,12 @@ public class AccessibleHypertextImpl extends AccessibleTextImpl
public static javax.accessibility.AccessibleText get(com.sun.star.uno.XInterface unoObject) {
try {
- XAccessibleHypertext unoAccessibleHypertext = (XAccessibleHypertext)
- UnoRuntime.queryInterface(XAccessibleHypertext.class, unoObject);
+ XAccessibleHypertext unoAccessibleHypertext = UnoRuntime.queryInterface(XAccessibleHypertext.class, unoObject);
if (unoAccessibleHypertext != null) {
return new AccessibleHypertextImpl(unoAccessibleHypertext);
}
- XAccessibleText unoAccessibleText = (XAccessibleText)
- UnoRuntime.queryInterface(XAccessibleText.class, unoObject);
+ XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class, unoObject);
if (unoAccessibleText != null) {
return new AccessibleTextImpl(unoAccessibleText);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java
index b3f876c..29cdfe6 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java
@@ -18,6 +18,7 @@
package org.openoffice.java.accessibility;
+import java.awt.Component;
import java.lang.ref.WeakReference;
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleStateSet;
@@ -32,7 +33,7 @@ public class AccessibleObjectFactory {
// This type is needed for conversions from/to uno Any
public static final Type XAccessibleType = new Type(XAccessible.class);
- private static java.util.Hashtable objectList = new java.util.Hashtable();
+ private static java.util.Hashtable<String, WeakReference<Component>> objectList = new java.util.Hashtable<String, WeakReference<Component>>();
private static java.awt.FocusTraversalPolicy focusTraversalPolicy = new FocusTraversalPolicy();
private static java.awt.EventQueue theEventQueue = java.awt.Toolkit.getDefaultToolkit().
@@ -93,9 +94,9 @@ public class AccessibleObjectFactory {
// Check if we already have a wrapper object for this context
synchronized (objectList) {
- WeakReference r = (WeakReference) objectList.get(oid);
+ WeakReference<java.awt.Component> r = objectList.get(oid);
if(r != null) {
- c = (java.awt.Component) r.get();
+ c = r.get();
}
}
}
@@ -450,7 +451,7 @@ public class AccessibleObjectFactory {
if (c != null) {
// Add the newly created object to the cache list
synchronized (objectList) {
- objectList.put(c.toString(), new WeakReference(c));
+ objectList.put(c.toString(), new WeakReference<Component>(c));
if (Build.DEBUG) {
// System.out.println("Object cache now contains " + objectList.size() + " objects.");
}
@@ -483,8 +484,7 @@ public class AccessibleObjectFactory {
if (xAccessibleContext != null) {
short role = xAccessibleContext.getAccessibleRole();
XAccessibleStateSet xAccessibleStateSet = xAccessibleContext.getAccessibleStateSet();
- XAccessibleComponent xAccessibleComponent = (XAccessibleComponent)
- UnoRuntime.queryInterface(XAccessibleComponent.class, xAccessibleContext);
+ XAccessibleComponent xAccessibleComponent = UnoRuntime.queryInterface(XAccessibleComponent.class, xAccessibleContext);
java.awt.Window w;
if (role == AccessibleRole.DIALOG) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
index e0a9a94..fd522ae 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
@@ -74,8 +74,7 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
public static javax.accessibility.AccessibleText get(com.sun.star.uno.XInterface unoObject) {
try {
- XAccessibleText unoAccessibleText = (XAccessibleText)
- UnoRuntime.queryInterface(XAccessibleText.class, unoObject);
+ XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class, unoObject);
if (unoAccessibleText != null) {
return new AccessibleTextImpl(unoAccessibleText);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java b/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java
index fb7535d..4d4718b 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java
@@ -68,7 +68,7 @@ public class ComboBox extends Container {
/** Gets the AccessibleAction associated with this object that supports one or more actions */
public javax.accessibility.AccessibleAction getAccessibleAction() {
if (unoAccessibleAction == null) {
- unoAccessibleAction = (XAccessibleAction) UnoRuntime.queryInterface(XAccessibleAction.class,
+ unoAccessibleAction = UnoRuntime.queryInterface(XAccessibleAction.class,
unoAccessibleContext);
if (unoAccessibleAction == null) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Component.java b/accessibility/bridge/org/openoffice/java/accessibility/Component.java
index c78fba2..d2f7873 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Component.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Component.java
@@ -38,13 +38,11 @@ public abstract class Component extends java.awt.Component {
super();
unoAccessible = xAccessible;
unoAccessibleContext = xAccessibleContext;
- unoAccessibleComponent = (XAccessibleComponent)
- UnoRuntime.queryInterface(XAccessibleComponent.class, xAccessibleContext);
+ unoAccessibleComponent = UnoRuntime.queryInterface(XAccessibleComponent.class, xAccessibleContext);
// Add the event listener right away, because the global focus notification doesn't
// work yet ..
- XAccessibleEventBroadcaster broadcaster = (XAccessibleEventBroadcaster)
- UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class,
- unoAccessibleComponent);
+ XAccessibleEventBroadcaster broadcaster = UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class,
+ unoAccessibleComponent);
if (broadcaster != null) {
broadcaster.addEventListener(createEventListener());
}
@@ -122,10 +120,10 @@ public abstract class Component extends java.awt.Component {
public Object[] getAccessibleComponents(Object[] targetSet) {
try {
- java.util.ArrayList list = new java.util.ArrayList(targetSet.length);
+ java.util.ArrayList<java.awt.Component> list = new java.util.ArrayList<java.awt.Component>(targetSet.length);
for (int i=0; i < targetSet.length; i++) {
java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent(
- (XAccessible) UnoRuntime.queryInterface(XAccessible.class, targetSet[i]));
+ UnoRuntime.queryInterface(XAccessible.class, targetSet[i]));
if (c != null) {
list.add(c);
}
@@ -659,8 +657,7 @@ public abstract class Component extends java.awt.Component {
public String getToolTipText() {
try {
- XAccessibleExtendedComponent unoAccessibleExtendedComponent = (XAccessibleExtendedComponent)
- UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, unoAccessibleComponent);
+ XAccessibleExtendedComponent unoAccessibleExtendedComponent = UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, unoAccessibleComponent);
if (unoAccessibleExtendedComponent != null) {
return unoAccessibleExtendedComponent.getToolTipText();
}
@@ -672,8 +669,7 @@ public abstract class Component extends java.awt.Component {
public String getTitledBorderText() {
try {
- XAccessibleExtendedComponent unoAccessibleExtendedComponent = (XAccessibleExtendedComponent)
- UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, unoAccessibleComponent);
+ XAccessibleExtendedComponent unoAccessibleExtendedComponent = UnoRuntime.queryInterface(XAccessibleExtendedComponent.class, unoAccessibleComponent);
if (unoAccessibleExtendedComponent != null) {
return unoAccessibleExtendedComponent.getTitledBorderText();
}
@@ -685,8 +681,7 @@ public abstract class Component extends java.awt.Component {
public javax.accessibility.AccessibleKeyBinding getAccessibleKeyBinding() {
try {
- XAccessibleAction unoAccessibleAction = (XAccessibleAction)
- UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent);
+ XAccessibleAction unoAccessibleAction = UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent);
if (unoAccessibleAction != null) {
XAccessibleKeyBinding unoAccessibleKeyBinding = unoAccessibleAction.getAccessibleActionKeyBinding(0);
if (unoAccessibleKeyBinding != null) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Container.java b/accessibility/bridge/org/openoffice/java/accessibility/Container.java
index 65d894c..7b2298b 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Container.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Container.java
@@ -18,6 +18,8 @@
package org.openoffice.java.accessibility;
+import java.awt.Component;
+
import javax.accessibility.AccessibleContext;
import javax.accessibility.AccessibleState;
@@ -39,15 +41,13 @@ public class Container extends java.awt.Container implements javax.accessibility
accessibleRole = role;
unoAccessible = xAccessible;
unoAccessibleContext = xAccessibleContext;
- unoAccessibleComponent = (XAccessibleComponent)
- UnoRuntime.queryInterface(XAccessibleComponent.class,
- xAccessibleContext);
+ unoAccessibleComponent = UnoRuntime.queryInterface(XAccessibleComponent.class,
+ xAccessibleContext);
// Add the event listener right away, because the global focus notification doesn't
// work yet ..
- XAccessibleEventBroadcaster broadcaster = (XAccessibleEventBroadcaster)
- UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class,
- unoAccessibleContext);
+ XAccessibleEventBroadcaster broadcaster = UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class,
+ unoAccessibleContext);
if (broadcaster != null) {
broadcaster.addEventListener(createEventListener());
}
@@ -125,10 +125,10 @@ public class Container extends java.awt.Container implements javax.accessibility
public Object[] getAccessibleComponents(Object[] targetSet) {
try {
- java.util.ArrayList list = new java.util.ArrayList(targetSet.length);
+ java.util.ArrayList<Component> list = new java.util.ArrayList<Component>(targetSet.length);
for (int i=0; i < targetSet.length; i++) {
java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent(
- (XAccessible) UnoRuntime.queryInterface(XAccessible.class, targetSet[i]));
+ UnoRuntime.queryInterface(XAccessible.class, targetSet[i]));
if (c != null) {
list.add(c);
}
@@ -567,8 +567,7 @@ public class Container extends java.awt.Container implements javax.accessibility
/** Returns the AccessibleSelection interface for this object */
public javax.accessibility.AccessibleSelection getAccessibleSelection() {
try {
- XAccessibleSelection unoAccessibleSelection = (XAccessibleSelection)
- UnoRuntime.queryInterface(XAccessibleSelection.class, unoAccessibleContext);
+ XAccessibleSelection unoAccessibleSelection = UnoRuntime.queryInterface(XAccessibleSelection.class, unoAccessibleContext);
if (unoAccessibleSelection != null) {
return new AccessibleSelectionImpl(unoAccessibleSelection);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java b/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java
index b8e6f15..3ac7f42 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java
@@ -46,7 +46,7 @@ public abstract class DescendantManager extends Component {
protected class AccessibleDescendantManagerListener
extends AccessibleUNOComponentListener {
protected AccessibleDescendantManagerListener() {
- unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(XAccessibleSelection.class,
+ unoAccessibleSelection = UnoRuntime.queryInterface(XAccessibleSelection.class,
unoAccessibleContext);
}
@@ -69,7 +69,7 @@ public abstract class DescendantManager extends Component {
extends AccessibleUNOComponent
implements javax.accessibility.AccessibleSelection {
protected AccessibleDescendantManager() {
- unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(XAccessibleSelection.class,
+ unoAccessibleSelection = UnoRuntime.queryInterface(XAccessibleSelection.class,
unoAccessibleContext);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java b/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
index a34d343..9bebc7e 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
@@ -50,9 +50,8 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
private void initialize(XAccessibleComponent xAccessibleComponent) {
unoAccessibleComponent = xAccessibleComponent;
eventQueue = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
- XAccessibleEventBroadcaster broadcaster = (XAccessibleEventBroadcaster)
- UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class,
- xAccessibleComponent);
+ XAccessibleEventBroadcaster broadcaster = UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class,
+ xAccessibleComponent);
if (broadcaster != null) {
broadcaster.addEventListener(new AccessibleDialogListener());
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Frame.java b/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
index f36d358..311a32f 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
@@ -42,9 +42,8 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
private void initialize(XAccessibleComponent xAccessibleComponent) {
unoAccessibleComponent = xAccessibleComponent;
eventQueue = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
- XAccessibleEventBroadcaster broadcaster = (XAccessibleEventBroadcaster)
- UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class,
- unoAccessibleComponent);
+ XAccessibleEventBroadcaster broadcaster = UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class,
+ unoAccessibleComponent);
if (broadcaster != null) {
broadcaster.addEventListener(new AccessibleFrameListener());
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Icon.java b/accessibility/bridge/org/openoffice/java/accessibility/Icon.java
index 0e2cd59..a20bc31 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Icon.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Icon.java
@@ -47,7 +47,7 @@ public class Icon extends Component implements javax.accessibility.Accessible {
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleIcon[] getAccessibleIcon() {
try {
- XAccessibleImage unoAccessibleImage = (XAccessibleImage) UnoRuntime.queryInterface(XAccessibleImage.class,
+ XAccessibleImage unoAccessibleImage = UnoRuntime.queryInterface(XAccessibleImage.class,
unoAccessibleComponent);
if (unoAccessibleImage != null) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Label.java b/accessibility/bridge/org/openoffice/java/accessibility/Label.java
index 718739e..a5ced04 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Label.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Label.java
@@ -60,7 +60,7 @@ public class Label extends Component implements javax.accessibility.Accessible {
return null;
try {
- XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class,
+ XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class,
unoAccessibleContext);
if (unoAccessibleText != null) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/List.java b/accessibility/bridge/org/openoffice/java/accessibility/List.java
index 38d9ff6..bc4fd66 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/List.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/List.java
@@ -231,9 +231,9 @@ public class List extends DescendantManager implements javax.accessibility.Acces
public Object[] create(Object[] targetSet) {
try {
- java.util.ArrayList list = new java.util.ArrayList(targetSet.length);
+ java.util.ArrayList<ListItem> list = new java.util.ArrayList<ListItem>(targetSet.length);
for (int i=0; i < targetSet.length; i++) {
- XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface(
+ XAccessible xAccessible = UnoRuntime.queryInterface(
XAccessible.class, targetSet[i]);
if (xAccessible != null) {
list.add(new ListItem(xAccessible));
@@ -375,8 +375,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces
/** Gets the AccessibleComponent associated with this object that has a graphical representation */
public javax.accessibility.AccessibleComponent getAccessibleComponent() {
try {
- XAccessibleComponent unoAccessibleComponent = (XAccessibleComponent)
- UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext);
+ XAccessibleComponent unoAccessibleComponent = UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext);
return (unoAccessibleComponent != null) ?
new AccessibleComponentImpl(unoAccessibleComponent) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -387,8 +386,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces
/** Gets the AccessibleAction associated with this object that has a graphical representation */
public javax.accessibility.AccessibleAction getAccessibleAction() {
try {
- XAccessibleAction unoAccessibleAction = (XAccessibleAction)
- UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);
+ XAccessibleAction unoAccessibleAction = UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);
return (unoAccessibleAction != null) ?
new AccessibleActionImpl(unoAccessibleAction) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -403,8 +401,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces
return null;
try {
- XAccessibleText unoAccessibleText = (XAccessibleText)
- UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext);
+ XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext);
return (unoAccessibleText != null) ?
new AccessibleTextImpl(unoAccessibleText) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -415,8 +412,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces
/** Gets the AccessibleValue associated with this object that has a graphical representation */
public javax.accessibility.AccessibleValue getAccessibleValue() {
try {
- XAccessibleValue unoAccessibleValue = (XAccessibleValue)
- UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
+ XAccessibleValue unoAccessibleValue = UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
return (unoAccessibleValue != null) ?
new AccessibleValueImpl(unoAccessibleValue) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -427,8 +423,7 @@ public class List extends DescendantManager implements javax.accessibility.Acces
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleIcon[] getAccessibleIcon() {
try {
- XAccessibleImage unoAccessibleImage = (XAccessibleImage)
- UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext);
+ XAccessibleImage unoAccessibleImage = UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext);
if (unoAccessibleImage != null) {
javax.accessibility.AccessibleIcon[] icons = { new AccessibleIconImpl(unoAccessibleImage) };
return icons;
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Menu.java b/accessibility/bridge/org/openoffice/java/accessibility/Menu.java
index ecf2df9..0056571 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Menu.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Menu.java
@@ -17,6 +17,8 @@
*/
package org.openoffice.java.accessibility;
+import java.awt.Component;
+
import com.sun.star.accessibility.*;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.UnoRuntime;
@@ -24,7 +26,7 @@ import com.sun.star.uno.UnoRuntime;
public class Menu extends AbstractButton
implements javax.accessibility.Accessible {
- private java.util.ArrayList children;
+ private java.util.ArrayList<Component> children;
protected XAccessibleSelection unoAccessibleSelection = null;
protected Menu(XAccessible xAccessible,
@@ -34,7 +36,7 @@ public class Menu extends AbstractButton
try {
// Create a vector with the correct initial capacity
int count = unoAccessibleContext.getAccessibleChildCount();
- children = new java.util.ArrayList(count);
+ children = new java.util.ArrayList<Component>(count);
// Fill the vector with objects
for (int i = 0; i < count; i++) {
@@ -52,7 +54,7 @@ public class Menu extends AbstractButton
}
if (children == null) {
- children = new java.util.ArrayList(0);
+ children = new java.util.ArrayList<Component>(0);
}
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
}
@@ -172,7 +174,7 @@ public class Menu extends AbstractButton
protected class AccessibleMenu extends AccessibleAbstractButton
implements javax.accessibility.AccessibleSelection {
protected AccessibleMenu() {
- unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(XAccessibleSelection.class,
+ unoAccessibleSelection = UnoRuntime.queryInterface(XAccessibleSelection.class,
unoAccessibleContext);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java b/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java
index 892cb55..79741ad 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java
@@ -67,7 +67,7 @@ public class MenuContainer extends Container implements javax.accessibility.Acce
protected class AccessibleMenuContainer extends AccessibleContainer implements javax.accessibility.AccessibleSelection {
protected AccessibleMenuContainer() {
- unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(XAccessibleSelection.class,
+ unoAccessibleSelection = UnoRuntime.queryInterface(XAccessibleSelection.class,
unoAccessibleContext);
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java b/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java
index d1b1872..a378311 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java
@@ -128,9 +128,8 @@ public class Paragraph extends Container implements javax.accessibility.Accessib
return null;
try {
- XAccessibleEditableText unoAccessibleText = (XAccessibleEditableText)
- UnoRuntime.queryInterface(XAccessibleEditableText.class,
- unoAccessibleComponent);
+ XAccessibleEditableText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleEditableText.class,
+ unoAccessibleComponent);
if (unoAccessibleText != null) {
return new AccessibleEditableTextImpl(unoAccessibleText);
} else {
@@ -144,8 +143,7 @@ public class Paragraph extends Container implements javax.accessibility.Accessib
/** Gets the AccessibleAction associated with this object that has a graphical representation */
public javax.accessibility.AccessibleAction getAccessibleAction() {
try {
- XAccessibleAction unoAccessibleAction = (XAccessibleAction)
- UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent);
+ XAccessibleAction unoAccessibleAction = UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent);
return (unoAccessibleAction != null) ?
new AccessibleActionImpl(unoAccessibleAction) : null;
} catch (com.sun.star.uno.RuntimeException e) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java b/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java
index 80a3c16..2d586ec 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java
@@ -49,7 +49,7 @@ public class ScrollBar extends Component implements SwingConstants, javax.access
*/
protected AccessibleScrollBar() {
super();
- unoAccessibleAction = (XAccessibleAction) UnoRuntime.queryInterface(
+ unoAccessibleAction = UnoRuntime.queryInterface(
XAccessibleAction.class, unoAccessibleContext);
if (unoAccessibleAction != null) {
actionCount = unoAccessibleAction.getAccessibleActionCount();
@@ -68,8 +68,7 @@ public class ScrollBar extends Component implements SwingConstants, javax.access
/** Gets the AccessibleValue associated with this object that has a graphical representation */
public javax.accessibility.AccessibleValue getAccessibleValue() {
try {
- XAccessibleValue unoAccessibleValue = (XAccessibleValue)
- UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
+ XAccessibleValue unoAccessibleValue = UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
return (unoAccessibleValue != null) ?
new AccessibleValueImpl(unoAccessibleValue) : null;
} catch (com.sun.star.uno.RuntimeException e) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Table.java b/accessibility/bridge/org/openoffice/java/accessibility/Table.java
index 93c457a..fdb84ec 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Table.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Table.java
@@ -130,7 +130,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
protected XAccessibleTable unoAccessibleTable;
public AccessibleTable() {
- unoAccessibleTable = (XAccessibleTable) UnoRuntime.queryInterface(XAccessibleTable.class, unoAccessibleContext);
+ unoAccessibleTable = UnoRuntime.queryInterface(XAccessibleTable.class, unoAccessibleContext);
}
/** Gets the role of this object */
@@ -457,9 +457,9 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
public Object[] create(Object[] targetSet) {
try {
- java.util.ArrayList list = new java.util.ArrayList(targetSet.length);
+ java.util.ArrayList<TableCell> list = new java.util.ArrayList<TableCell>(targetSet.length);
for (int i=0; i < targetSet.length; i++) {
- XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface(
+ XAccessible xAccessible = UnoRuntime.queryInterface(
XAccessible.class, targetSet[i]);
if (xAccessible != null) {
list.add(new TableCell(xAccessible));
@@ -650,8 +650,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
/** Gets the AccessibleComponent associated with this object that has a graphical representation */
public javax.accessibility.AccessibleComponent getAccessibleComponent() {
try {
- XAccessibleComponent unoAccessibleComponent = (XAccessibleComponent)
- UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext);
+ XAccessibleComponent unoAccessibleComponent = UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext);
return (unoAccessibleComponent != null) ?
new AccessibleComponentImpl(unoAccessibleComponent) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -662,8 +661,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
/** Gets the AccessibleAction associated with this object that has a graphical representation */
public javax.accessibility.AccessibleAction getAccessibleAction() {
try {
- XAccessibleAction unoAccessibleAction = (XAccessibleAction)
- UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);
+ XAccessibleAction unoAccessibleAction = UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);
return (unoAccessibleAction != null) ?
new AccessibleActionImpl(unoAccessibleAction) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -678,8 +676,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
return null;
try {
- XAccessibleText unoAccessibleText = (XAccessibleText)
- UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext);
+ XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext);
return (unoAccessibleText != null) ?
new AccessibleTextImpl(unoAccessibleText) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -690,8 +687,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
/** Gets the AccessibleValue associated with this object that has a graphical representation */
public javax.accessibility.AccessibleValue getAccessibleValue() {
try {
- XAccessibleValue unoAccessibleValue = (XAccessibleValue)
- UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
+ XAccessibleValue unoAccessibleValue = UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
return (unoAccessibleValue != null) ?
new AccessibleValueImpl(unoAccessibleValue) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -702,8 +698,7 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleIcon[] getAccessibleIcon() {
try {
- XAccessibleImage unoAccessibleImage = (XAccessibleImage)
- UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext);
+ XAccessibleImage unoAccessibleImage = UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext);
if (unoAccessibleImage != null) {
javax.accessibility.AccessibleIcon[] icons = { new AccessibleIconImpl(unoAccessibleImage) };
return icons;
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java b/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java
index cead76b..a9c27d2 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java
@@ -86,8 +86,7 @@ public class TextComponent extends Component implements javax.accessibility.Acce
return null;
try {
- XAccessibleText unoAccessibleText = (XAccessibleText)
- UnoRuntime.queryInterface(XAccessibleText.class,unoAccessibleComponent);
+ XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class,unoAccessibleComponent);
if (unoAccessibleText != null) {
return new AccessibleTextImpl(unoAccessibleText);
} else {
@@ -101,8 +100,7 @@ public class TextComponent extends Component implements javax.accessibility.Acce
/** Gets the AccessibleEditableText associated with this object presenting text on the display */
public javax.accessibility.AccessibleEditableText getAccessibleEditableText() {
try {
- XAccessibleEditableText unoAccessibleText = (XAccessibleEditableText)
- UnoRuntime.queryInterface(XAccessibleEditableText.class,unoAccessibleComponent);
+ XAccessibleEditableText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleEditableText.class,unoAccessibleComponent);
if (unoAccessibleText != null) {
return new AccessibleEditableTextImpl(unoAccessibleText);
} else {
@@ -116,8 +114,7 @@ public class TextComponent extends Component implements javax.accessibility.Acce
/** Gets the AccessibleAction associated with this object that has a graphical representation */
public javax.accessibility.AccessibleAction getAccessibleAction() {
try {
- XAccessibleAction unoAccessibleAction = (XAccessibleAction)
- UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent);
+ XAccessibleAction unoAccessibleAction = UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleComponent);
return (unoAccessibleAction != null) ?
new AccessibleActionImpl(unoAccessibleAction) : null;
} catch (com.sun.star.uno.RuntimeException e) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java b/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java
index 5322e9b..c433315 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java
@@ -40,7 +40,7 @@ class ToggleButton extends AbstractButton implements javax.accessibility.Accessi
/** Gets the AccessibleValue associated with this object that has a graphical representation */
public javax.accessibility.AccessibleValue getAccessibleValue() {
try {
- XAccessibleValue unoAccessibleValue = (XAccessibleValue) UnoRuntime.queryInterface(XAccessibleValue.class,
+ XAccessibleValue unoAccessibleValue = UnoRuntime.queryInterface(XAccessibleValue.class,
unoAccessibleContext);
return (unoAccessibleValue != null)
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java b/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java
index 10ad1d1..d3a6b79 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java
@@ -54,7 +54,7 @@ public class ToolTip extends Component implements javax.accessibility.Accessible
return null;
try {
- XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class,
+ XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class,
unoAccessibleComponent);
if (unoAccessibleText != null) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java
index 477c20b..1291f55 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java
@@ -136,7 +136,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
protected XAccessibleTable unoAccessibleTable;
public AccessibleTree() {
- unoAccessibleTable = (XAccessibleTable) UnoRuntime.queryInterface(XAccessibleTable.class, unoAccessibleContext);
+ unoAccessibleTable = UnoRuntime.queryInterface(XAccessibleTable.class, unoAccessibleContext);
}
/*
@@ -467,9 +467,9 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
public Object[] create(Object[] targetSet) {
try {
- java.util.ArrayList list = new java.util.ArrayList(targetSet.length);
+ java.util.ArrayList<TreeItem> list = new java.util.ArrayList<TreeItem>(targetSet.length);
for (int i=0; i < targetSet.length; i++) {
- XAccessible xAccessible = (XAccessible) UnoRuntime.queryInterface(
+ XAccessible xAccessible = UnoRuntime.queryInterface(
XAccessible.class, targetSet[i]);
if (xAccessible != null) {
list.add(new TreeItem(xAccessible));
@@ -510,8 +510,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
public AccessibleTreeItem(XAccessibleContext xAccessibleContext) {
unoAccessibleContext = xAccessibleContext;
- unoAccessibleSelection = (XAccessibleSelection)
- UnoRuntime.queryInterface(XAccessibleSelection.class, xAccessibleContext);
+ unoAccessibleSelection = UnoRuntime.queryInterface(XAccessibleSelection.class, xAccessibleContext);
}
/** Returns the accessible name of this object */
@@ -614,8 +613,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
/** Gets the AccessibleComponent associated with this object that has a graphical representation */
public javax.accessibility.AccessibleComponent getAccessibleComponent() {
try {
- XAccessibleComponent unoAccessibleComponent = (XAccessibleComponent)
- UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext);
+ XAccessibleComponent unoAccessibleComponent = UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext);
return (unoAccessibleComponent != null) ?
new AccessibleComponentImpl(unoAccessibleComponent) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -631,8 +629,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
/** Gets the AccessibleAction associated with this object that has a graphical representation */
public javax.accessibility.AccessibleAction getAccessibleAction() {
try {
- XAccessibleAction unoAccessibleAction = (XAccessibleAction)
- UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);
+ XAccessibleAction unoAccessibleAction = UnoRuntime.queryInterface(XAccessibleAction.class, unoAccessibleContext);
return (unoAccessibleAction != null) ?
new AccessibleActionImpl(unoAccessibleAction) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -647,8 +644,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
return null;
try {
- XAccessibleText unoAccessibleText = (XAccessibleText)
- UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext);
+ XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class, unoAccessibleContext);
return (unoAccessibleText != null) ?
new AccessibleTextImpl(unoAccessibleText) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -659,8 +655,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
/** Gets the AccessibleValue associated with this object that has a graphical representation */
public javax.accessibility.AccessibleValue getAccessibleValue() {
try {
- XAccessibleValue unoAccessibleValue = (XAccessibleValue)
- UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
+ XAccessibleValue unoAccessibleValue = UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
return (unoAccessibleValue != null) ?
new AccessibleValueImpl(unoAccessibleValue) : null;
} catch (com.sun.star.uno.RuntimeException e) {
@@ -671,8 +666,7 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleIcon[] getAccessibleIcon() {
try {
- XAccessibleImage unoAccessibleImage = (XAccessibleImage)
- UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext);
+ XAccessibleImage unoAccessibleImage = UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleContext);
if (unoAccessibleImage != null) {
javax.accessibility.AccessibleIcon[] icons = { new AccessibleIconImpl(unoAccessibleImage) };
return icons;
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Window.java b/accessibility/bridge/org/openoffice/java/accessibility/Window.java
index 216b511..00300d6 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Window.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Window.java
@@ -37,9 +37,8 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
private void initialize(XAccessibleComponent xAccessibleComponent) {
unoAccessibleComponent = xAccessibleComponent;
eventQueue = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
- XAccessibleEventBroadcaster broadcaster = (XAccessibleEventBroadcaster)
- UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class,
- unoAccessibleComponent);
+ XAccessibleEventBroadcaster broadcaster = UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class,
+ unoAccessibleComponent);
if (broadcaster != null) {
broadcaster.addEventListener(new AccessibleWindowListener());
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java
index 6e89fed..e601a1c 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java
@@ -18,6 +18,8 @@
package org.openoffice.java.accessibility.logging;
+import java.awt.Component;
+
import com.sun.star.accessibility.*;
import com.sun.star.uno.*;
@@ -28,7 +30,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener {
private static XAccessibleEventLog theEventListener = null;
- private static java.util.Hashtable proxyList = new java.util.Hashtable();
+ private static java.util.Hashtable<String, Component> proxyList = new java.util.Hashtable<String, Component>();
/** Creates a new instance of UNOAccessibleEventListener */
public XAccessibleEventLog() {
@@ -42,8 +44,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener {
}
public static void addEventListener(XAccessibleContext xac, java.awt.Component c) {
- XAccessibleEventBroadcaster broadcaster = (XAccessibleEventBroadcaster)
- UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class, xac);
+ XAccessibleEventBroadcaster broadcaster = UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class, xac);
if (broadcaster != null) {
broadcaster.addEventListener(XAccessibleEventLog.get());
@@ -137,7 +138,7 @@ public class XAccessibleEventLog implements XAccessibleEventListener {
}
protected static void logMessage(Object o, String s) {
- XAccessibleContext xac = (XAccessibleContext) UnoRuntime.queryInterface(XAccessibleContext.class, o);
+ XAccessibleContext xac = UnoRuntime.queryInterface(XAccessibleContext.class, o);
if( xac != null ) {
String oid = UnoRuntime.generateOid(xac);
synchronized (proxyList) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java
index 10c4fb6..7b3527b 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java
@@ -38,7 +38,7 @@ public class XAccessibleTextLog
private void setName(
com.sun.star.accessibility.XAccessibleText xAccessibleText) {
try {
- com.sun.star.accessibility.XAccessibleContext unoAccessibleContext = (com.sun.star.accessibility.XAccessibleContext) com.sun.star.uno.UnoRuntime.queryInterface(com.sun.star.accessibility.XAccessibleContext.class,
+ com.sun.star.accessibility.XAccessibleContext unoAccessibleContext = com.sun.star.uno.UnoRuntime.queryInterface(com.sun.star.accessibility.XAccessibleContext.class,
xAccessibleText);
if (unoAccessibleContext != null) {
diff --git a/bean/com/sun/star/beans/LocalOfficeConnection.java b/bean/com/sun/star/beans/LocalOfficeConnection.java
index 15f025a..b742fb3 100644
--- a/bean/com/sun/star/beans/LocalOfficeConnection.java
+++ b/bean/com/sun/star/beans/LocalOfficeConnection.java
@@ -110,8 +110,8 @@ public class LocalOfficeConnection
UnoUrl aURL = UnoUrl.parseUnoUrl( url );
mProgramPath = null;
mConnType = aURL.getConnection();
- mPipe = (String) aURL.getConnectionParameters().get( "pipe" );
- mPort = (String) aURL.getConnectionParameters().get( "port" );
+ mPipe = aURL.getConnectionParameters().get( "pipe" );
+ mPort = aURL.getConnectionParameters().get( "port" );
mProtocol = aURL.getProtocol();
mInitialObject = aURL.getRootOid();
}
@@ -221,7 +221,7 @@ public class LocalOfficeConnection
// query for the XUnoUrlResolver interface
XUnoUrlResolver xUrlResolver =
- (XUnoUrlResolver) UnoRuntime.queryInterface( XUnoUrlResolver.class, urlResolver );
+ UnoRuntime.queryInterface( XUnoUrlResolver.class, urlResolver );
// try to connect to soffice
Object aInitialObject = null;
@@ -261,10 +261,9 @@ public class LocalOfficeConnection
// XComponentContext
if( null != aInitialObject )
{
- XPropertySet xPropertySet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, aInitialObject);
+ XPropertySet xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, aInitialObject);
Object xContext = xPropertySet.getPropertyValue("DefaultContext");
- XComponentContext xComponentContext = (XComponentContext) UnoRuntime.queryInterface(
+ XComponentContext xComponentContext = UnoRuntime.queryInterface(
XComponentContext.class, xContext);
return xComponentContext;
}
diff --git a/bean/com/sun/star/beans/LocalOfficeWindow.java b/bean/com/sun/star/beans/LocalOfficeWindow.java
index 4f06c2e..90ddbe8 100644
--- a/bean/com/sun/star/beans/LocalOfficeWindow.java
+++ b/bean/com/sun/star/beans/LocalOfficeWindow.java
@@ -58,7 +58,7 @@ public class LocalOfficeWindow
/* package */ LocalOfficeWindow(OfficeConnection connection)
{
mConnection = connection;
- mConnection.addEventListener((XEventListener)this);
+ mConnection.addEventListener(this);
}
/**
@@ -109,10 +109,10 @@ public class LocalOfficeWindow
{
compfactory = mConnection.getComponentContext().getServiceManager();
XMultiServiceFactory factory;
- factory = (XMultiServiceFactory)UnoRuntime.queryInterface(
+ factory = UnoRuntime.queryInterface(
XMultiServiceFactory.class, compfactory);
Object object = factory.createInstance( "com.sun.star.awt.Toolkit");
- return (XToolkit)UnoRuntime.queryInterface(XToolkit.class, object);
+ return UnoRuntime.queryInterface(XToolkit.class, object);
}
else
return null;
@@ -124,13 +124,13 @@ public class LocalOfficeWindow
if ( !bPeer )
{
// set real parent
- XVclWindowPeer xVclWindowPeer = (XVclWindowPeer)UnoRuntime.queryInterface(
+ XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(
XVclWindowPeer.class, mWindow);
xVclWindowPeer.setProperty( "PluginParent", new Long(getNativeWindow()) );
bPeer = true;
// show document window
- XWindow aWindow = (XWindow)UnoRuntime.queryInterface(XWindow.class, mWindow);
+ XWindow aWindow = UnoRuntime.queryInterface(XWindow.class, mWindow);
aWindow.setVisible( true );
}
}
@@ -141,11 +141,11 @@ public class LocalOfficeWindow
if ( bPeer )
{
// hide document window
- XWindow aWindow = (XWindow)UnoRuntime.queryInterface(XWindow.class, mWindow);
+ XWindow aWindow = UnoRuntime.queryInterface(XWindow.class, mWindow);
aWindow.setVisible( false );
// set null parent
- XVclWindowPeer xVclWindowPeer = (XVclWindowPeer)UnoRuntime.queryInterface(
+ XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(
XVclWindowPeer.class, mWindow);
xVclWindowPeer.setProperty( "PluginParent", new Long(0) );
bPeer = false;
@@ -228,7 +228,7 @@ public class LocalOfficeWindow
addComponentListener( new ComponentEventHandler() );
// set initial visibility
- XWindow aWindow = (XWindow)UnoRuntime.queryInterface(XWindow.class, mWindow);
+ XWindow aWindow = UnoRuntime.queryInterface(XWindow.class, mWindow);
aWindow.setVisible( bPeer );
}
catch (com.sun.star.uno.Exception exp) {
diff --git a/bean/com/sun/star/comp/beans/Controller.java b/bean/com/sun/star/comp/beans/Controller.java
index ee29234..9521af6 100644
--- a/bean/com/sun/star/comp/beans/Controller.java
+++ b/bean/com/sun/star/comp/beans/Controller.java
@@ -36,9 +36,8 @@ public class Controller
{
super( xController );
this.xController = xController;
- xDispatchProvider = (com.sun.star.frame.XDispatchProvider)
- UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProvider.class,
- xController );
+ xDispatchProvider = UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProvider.class,
+ xController );
}
//==============================================================
diff --git a/bean/com/sun/star/comp/beans/Frame.java b/bean/com/sun/star/comp/beans/Frame.java
index 03e2a37..cd68bb7 100644
--- a/bean/com/sun/star/comp/beans/Frame.java
+++ b/bean/com/sun/star/comp/beans/Frame.java
@@ -39,12 +39,10 @@ public class Frame
{
super( xFrame );
this.xFrame = xFrame;
- xDispatchProvider = (com.sun.star.frame.XDispatchProvider)
- UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProvider.class,
- xFrame );
- xDispatchProviderInterception = (com.sun.star.frame.XDispatchProviderInterception)
- UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProviderInterception.class,
- xFrame );
+ xDispatchProvider = UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProvider.class,
+ xFrame );
+ xDispatchProviderInterception = UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProviderInterception.class,
+ xFrame );
}
//==============================================================
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
index a1d51f6..bf0e079 100644
--- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
+++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
@@ -176,8 +176,8 @@ public class LocalOfficeConnection
{
UnoUrl aURL = UnoUrl.parseUnoUrl( url );
mConnType = aURL.getConnection();
- mPipe = (String) aURL.getConnectionParameters().get( "pipe" );
- mPort = (String) aURL.getConnectionParameters().get( "port" );
+ mPipe = aURL.getConnectionParameters().get( "pipe" );
+ mPort = aURL.getConnectionParameters().get( "port" );
mProtocol = aURL.getProtocol();
mInitialObject = aURL.getRootOid();
}
@@ -251,7 +251,7 @@ public class LocalOfficeConnection
//to the office including the bridge needs to be terminated.
if (mBridge != null)
{
- XComponent comp = (XComponent)UnoRuntime.queryInterface(
+ XComponent comp = UnoRuntime.queryInterface(
XComponent.class, mBridge);
if (comp != null)
comp.dispose();
@@ -337,10 +337,9 @@ public class LocalOfficeConnection
// XComponentContext
if( null != aInitialObject )
{
- XPropertySet xPropertySet = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, aInitialObject);
+ XPropertySet xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, aInitialObject);
Object xContext = xPropertySet.getPropertyValue("DefaultContext");
- XComponentContext xComponentContext = (XComponentContext) UnoRuntime.queryInterface(
+ XComponentContext xComponentContext = UnoRuntime.queryInterface(
XComponentContext.class, xContext);
return xComponentContext;
}
@@ -419,7 +418,7 @@ public class LocalOfficeConnection
XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager();
try {
- xBridgeFactory = (XBridgeFactory)UnoRuntime.queryInterface(
+ xBridgeFactory = UnoRuntime.queryInterface(
XBridgeFactory.class,
xLocalServiceManager.createInstanceWithContext(
"com.sun.star.bridge.BridgeFactory", xLocalContext));
@@ -435,7 +434,7 @@ public class LocalOfficeConnection
} catch (com.sun.star.uno.Exception e) {
throw new com.sun.star.uno.RuntimeException(e.getMessage());
}
- XConnector connector_xConnector = (XConnector)UnoRuntime.queryInterface(XConnector.class, connector);
+ XConnector connector_xConnector = UnoRuntime.queryInterface(XConnector.class, connector);
// connect to the server
XConnection xConnection = connector_xConnector.connect(conDcp);
// create the bridge name. This should not be necessary if we pass an
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
index 76f73d9..9e471b0 100644
--- a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
+++ b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
@@ -62,7 +62,7 @@ public class LocalOfficeWindow
protected LocalOfficeWindow(OfficeConnection connection)
{
mConnection = connection;
- mConnection.addEventListener((XEventListener)this);
+ mConnection.addEventListener(this);
}
/**
@@ -113,10 +113,10 @@ public class LocalOfficeWindow
{
compfactory = mConnection.getComponentContext().getServiceManager();
XMultiServiceFactory factory;
- factory = (XMultiServiceFactory)UnoRuntime.queryInterface(
+ factory = UnoRuntime.queryInterface(
XMultiServiceFactory.class, compfactory);
Object object = factory.createInstance( "com.sun.star.awt.Toolkit");
- return (XToolkit)UnoRuntime.queryInterface(XToolkit.class, object);
+ return UnoRuntime.queryInterface(XToolkit.class, object);
}
else
return null;
@@ -128,13 +128,13 @@ public class LocalOfficeWindow
if ( !bPeer )
{
// set real parent
- XVclWindowPeer xVclWindowPeer = (XVclWindowPeer)UnoRuntime.queryInterface(
+ XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(
XVclWindowPeer.class, mWindow);
xVclWindowPeer.setProperty( "PluginParent", getWrappedWindowHandle());
bPeer = true;
// show document window
- XWindow aWindow = (XWindow)UnoRuntime.queryInterface(XWindow.class, mWindow);
+ XWindow aWindow = UnoRuntime.queryInterface(XWindow.class, mWindow);
aWindow.setVisible( true );
}
}
@@ -145,11 +145,11 @@ public class LocalOfficeWindow
if ( bPeer )
{
// hide document window
- XWindow aWindow = (XWindow)UnoRuntime.queryInterface(XWindow.class, mWindow);
+ XWindow aWindow = UnoRuntime.queryInterface(XWindow.class, mWindow);
aWindow.setVisible( false );
// set null parent
- XVclWindowPeer xVclWindowPeer = (XVclWindowPeer)UnoRuntime.queryInterface(
+ XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(
XVclWindowPeer.class, mWindow);
xVclWindowPeer.setProperty( "PluginParent", new Long(0) );
bPeer = false;
@@ -209,7 +209,7 @@ public class LocalOfficeWindow
// set initial visibility
- XWindow aWindow = (XWindow)UnoRuntime.queryInterface(XWindow.class, mWindow);
+ XWindow aWindow = UnoRuntime.queryInterface(XWindow.class, mWindow);
aWindow.setVisible( bPeer );
}
catch (com.sun.star.uno.Exception exp) {
diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java
index 2c7a720..9c30201 100644
--- a/bean/com/sun/star/comp/beans/OOoBean.java
+++ b/bean/com/sun/star/comp/beans/OOoBean.java
@@ -295,9 +295,8 @@ public class OOoBean
{
com.sun.star.lang.XMultiComponentFactory aFactory =
iConn.getComponentContext().getServiceManager();
- xServiceFactory = (com.sun.star.lang.XMultiServiceFactory)
- UnoRuntime.queryInterface(
- com.sun.star.lang.XMultiServiceFactory.class, aFactory );
+ xServiceFactory = UnoRuntime.queryInterface(
+ com.sun.star.lang.XMultiServiceFactory.class, aFactory );
}
};
aConnectorThread.start();
@@ -324,7 +323,7 @@ public class OOoBean
try
{
Object aObject = getMultiServiceFactory().createInstance( "com.sun.star.frame.Desktop");
- xDesktop = (com.sun.star.frame.XDesktop) UnoRuntime.queryInterface(
+ xDesktop = UnoRuntime.queryInterface(
com.sun.star.frame.XDesktop.class, aObject );
}
catch ( com.sun.star.uno.Exception aExc )
@@ -381,8 +380,7 @@ public class OOoBean
new CallWatchThread( nOOoCallTimeOut, "clear" );
//By closing the frame we avoid that dialogs are displayed, for example when
//the document is modified.
- com.sun.star.util.XCloseable xCloseable = (com.sun.star.util.XCloseable)
- UnoRuntime.queryInterface( com.sun.star.util.XCloseable.class, aFrame );
+ com.sun.star.util.XCloseable xCloseable = UnoRuntime.queryInterface( com.sun.star.util.XCloseable.class, aFrame );
if ( xCloseable != null )
{
try
@@ -415,9 +413,8 @@ public class OOoBean
{
try
{
- com.sun.star.lang.XComponent xComp = (com.sun.star.lang.XComponent)
- UnoRuntime.queryInterface(
- com.sun.star.lang.XComponent.class, xURLTransformer );
+ com.sun.star.lang.XComponent xComp = UnoRuntime.queryInterface(
+ com.sun.star.lang.XComponent.class, xURLTransformer );
if ( xComp != null )
xComp.dispose();
}
@@ -573,23 +570,23 @@ public class OOoBean
{
// create the frame
com.sun.star.awt.XWindow xWindow =
- (com.sun.star.awt.XWindow) UnoRuntime.queryInterface(
- com.sun.star.awt.XWindow.class, xFrameWindow.getUNOWindowPeer());
+ UnoRuntime.queryInterface(
+ com.sun.star.awt.XWindow.class, xFrameWindow.getUNOWindowPeer());
Object xFrame = xServiceFactory.createInstance( "com.sun.star.frame.Frame");
- aFrame = new Frame( (com.sun.star.frame.XFrame)UnoRuntime.queryInterface(
+ aFrame = new Frame( UnoRuntime.queryInterface(
com.sun.star.frame.XFrame.class, xFrame ) );
aFrame.initialize( xWindow );
aFrame.setName( aFrame.toString() );
// register the frame at the desktop
com.sun.star.frame.XFrames xFrames =
- ( (com.sun.star.frame.XFramesSupplier)UnoRuntime.queryInterface(
- com.sun.star.frame.XFramesSupplier.class, getOOoDesktop() ) ).getFrames();
+ UnoRuntime.queryInterface(
+ com.sun.star.frame.XFramesSupplier.class, getOOoDesktop() ).getFrames();
xFrames.append( aFrame );
}
// Initializes the slot command execution environment.
- xURLTransformer = (com.sun.star.util.XURLTransformer) UnoRuntime.queryInterface(
+ xURLTransformer = UnoRuntime.queryInterface(
com.sun.star.util.XURLTransformer.class,
xServiceFactory.createInstance( "com.sun.star.util.URLTransformer") );
@@ -603,8 +600,7 @@ public class OOoBean
}
// get XComponentLoader from frame
- com.sun.star.frame.XComponentLoader xLoader = (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface( com.sun.star.frame.XComponentLoader.class, aFrame );
+ com.sun.star.frame.XComponentLoader xLoader = UnoRuntime.queryInterface( com.sun.star.frame.XComponentLoader.class, aFrame );
if ( xLoader == null )
{
throw new java.lang.RuntimeException(
@@ -668,7 +664,7 @@ public class OOoBean
// Get document's XModifiable interface if any.
aDocument = new OfficeDocument(
- (com.sun.star.frame.XModel) UnoRuntime.queryInterface(
+ UnoRuntime.queryInterface(
com.sun.star.frame.XModel.class, xComponent ) );
bLoaded = true;
}
@@ -1088,12 +1084,12 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
try
{
com.sun.star.beans.XPropertySet xPropSet =
- (com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class, aFrame );
+ UnoRuntime.queryInterface(
+ com.sun.star.beans.XPropertySet.class, aFrame );
com.sun.star.frame.XLayoutManager xLayoutManager =
- (com.sun.star.frame.XLayoutManager) UnoRuntime.queryInterface(
- com.sun.star.frame.XLayoutManager.class,
- xPropSet.getPropertyValue( "LayoutManager" ) );
+ UnoRuntime.queryInterface(
+ com.sun.star.frame.XLayoutManager.class,
+ xPropSet.getPropertyValue( "LayoutManager" ) );
if ( bNewValue )
xLayoutManager.showElement( aResourceURL );
else
diff --git a/bean/com/sun/star/comp/beans/OfficeDocument.java b/bean/com/sun/star/comp/beans/OfficeDocument.java
index a7d0150..380bcea 100644
--- a/bean/com/sun/star/comp/beans/OfficeDocument.java
+++ b/bean/com/sun/star/comp/beans/OfficeDocument.java
@@ -47,15 +47,12 @@ public class OfficeDocument extends Wrapper
super( xModel );
this.xModel = xModel;
- this.xModifiable = (com.sun.star.util.XModifiable)
- UnoRuntime.queryInterface(
- com.sun.star.util.XModifiable.class, xModel );
- this.xPrintable = (com.sun.star.view.XPrintable)
- UnoRuntime.queryInterface(
- com.sun.star.view.XPrintable.class, xModel );
- this.xStorable = (com.sun.star.frame.XStorable)
- UnoRuntime.queryInterface(
- com.sun.star.frame.XStorable.class, xModel );
+ this.xModifiable = UnoRuntime.queryInterface(
+ com.sun.star.util.XModifiable.class, xModel );
+ this.xPrintable = UnoRuntime.queryInterface(
+ com.sun.star.view.XPrintable.class, xModel );
+ this.xStorable = UnoRuntime.queryInterface(
+ com.sun.star.frame.XStorable.class, xModel );
}
//==========================================================
diff --git a/bean/com/sun/star/comp/beans/Wrapper.java b/bean/com/sun/star/comp/beans/Wrapper.java
index 4eefcf5..9303c86 100644
--- a/bean/com/sun/star/comp/beans/Wrapper.java
+++ b/bean/com/sun/star/comp/beans/Wrapper.java
@@ -51,9 +51,8 @@ class Wrapper
public Wrapper( com.sun.star.uno.XInterface xProxy )
{
xQueryInterface = (com.sun.star.uno.IQueryInterface) xProxy;
- xComponent = (com.sun.star.lang.XComponent)
- UnoRuntime.queryInterface(
- com.sun.star.lang.XComponent.class, xProxy );
+ xComponent = UnoRuntime.queryInterface(
+ com.sun.star.lang.XComponent.class, xProxy );
}
//==============================================================
diff --git a/bean/qa/complex/bean/OOoBeanTest.java b/bean/qa/complex/bean/OOoBeanTest.java
index a644993..8a394d2 100644
--- a/bean/qa/complex/bean/OOoBeanTest.java
+++ b/bean/qa/complex/bean/OOoBeanTest.java
@@ -95,7 +95,7 @@ public class OOoBeanTest
private String getText(OOoBean bean) throws Exception
{
- com.sun.star.frame.XModel model = (com.sun.star.frame.XModel)bean.getDocument();
+ com.sun.star.frame.XModel model = bean.getDocument();
com.sun.star.text.XTextDocument myDoc =
UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class, model);
com.sun.star.text.XText xText = myDoc.getText();
diff --git a/bean/qa/complex/bean/WriterFrame.java b/bean/qa/complex/bean/WriterFrame.java
index a12bf8f..525ddf7 100644
--- a/bean/qa/complex/bean/WriterFrame.java
+++ b/bean/qa/complex/bean/WriterFrame.java
@@ -77,7 +77,7 @@ class WriterFrame extends java.awt.Frame
public void setText(String s) throws Exception
{
- com.sun.star.frame.XModel model = (com.sun.star.frame.XModel)m_bean.getDocument();
+ com.sun.star.frame.XModel model = m_bean.getDocument();
com.sun.star.text.XTextDocument myDoc =
UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class, model);
com.sun.star.text.XText xText = myDoc.getText();
@@ -88,7 +88,7 @@ class WriterFrame extends java.awt.Frame
public String getText() throws Exception
{
- com.sun.star.frame.XModel model = (com.sun.star.frame.XModel)m_bean.getDocument();
+ com.sun.star.frame.XModel model = m_bean.getDocument();
com.sun.star.text.XTextDocument myDoc =
UnoRuntime.queryInterface(com.sun.star.text.XTextDocument.class, model);
com.sun.star.text.XText xText = myDoc.getText();
@@ -112,7 +112,7 @@ class WriterFrame extends java.awt.Frame
*/
public void goToStart() throws Exception
{
- com.sun.star.frame.XModel xModel = (com.sun.star.frame.XModel)m_bean.getDocument();
+ com.sun.star.frame.XModel xModel = m_bean.getDocument();
com.sun.star.frame.XController xController = xModel.getCurrentController();
com.sun.star.text.XTextViewCursorSupplier xVCSupplier =
@@ -125,7 +125,7 @@ class WriterFrame extends java.awt.Frame
public void pageDown() throws Exception
{
- com.sun.star.frame.XModel xModel = (com.sun.star.frame.XModel)m_bean.getDocument();
+ com.sun.star.frame.XModel xModel = m_bean.getDocument();
com.sun.star.frame.XController xController = xModel.getCurrentController();
com.sun.star.text.XTextViewCursorSupplier xVCSupplier =
diff --git a/filter/qa/complex/filter/detection/typeDetection/Helper.java b/filter/qa/complex/filter/detection/typeDetection/Helper.java
index 2ed403f..70cf7c4 100644
--- a/filter/qa/complex/filter/detection/typeDetection/Helper.java
+++ b/filter/qa/complex/filter/detection/typeDetection/Helper.java
@@ -27,9 +27,10 @@ import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.HashMap;
import java.util.StringTokenizer;
-import java.util.Vector;
+import java.util.ArrayList;
import lib.TestParameters;
import share.LogWriter;
import util.utils;
@@ -43,10 +44,10 @@ public class Helper {
/** The runner log writer
* @member m_log for log purposes
- * @member m_sTestDocPath directory for seraching files to load
- * @member m_vFiles list of all files describet in "files.csv"
- * @member m_hFileURLs contains the postition of a file name in the m_vFiles Vector
- * @member m_hFileTypes contains the postition of a file type in the m_vFiles Vector
+ * @member m_sTestDocPath directory for searching files to load
+ * @member m_vFiles list of all files described in "files.csv"
+ * @member m_hFileURLs contains the position of a file name in the m_vFiles Vector
+ * @member m_hFileTypes contains the position of a file type in the m_vFiles Vector
* @member m_param the test parameters
*/
@@ -54,11 +55,11 @@ public class Helper {
String m_sTestDocPath = null;
- Vector m_vFiles = null;
+ ArrayList<ArrayList<String>> m_vFiles = null;
- Hashtable m_hFileURLs = new Hashtable();
+ HashMap<String,String> m_hFileURLs = new HashMap<String,String>();
- Hashtable m_hFileTypes = new Hashtable();
+ HashMap<String,String> m_hFileTypes = new HashMap<String,String>();
TestParameters m_param = null;
@@ -89,22 +90,22 @@ public class Helper {
/** Reads a comma separated file (CSV). Every line of the file is
- * repesented by an <code>Vector</code> entry. Every data entry of a row is
+ * represented by an <code>Vector</code> entry. Every data entry of a row is
* also stored in a <code>Vector</code>. So the returned value is a
* <code>Vector[][]</code> where the first dimension represents a row
- * and the second dimenesion inclueds the data values.
+ * and the second dimension includes the data values.
* @param csvFileName the name of the csv file
* @return Vector filled with Vector filled with data of a row
*/
- public Vector getToDoList(String csvFileName){
+ public ArrayList<ArrayList<String>> getToDoList(String csvFileName){
try {
- Vector vAll = new Vector();
- Vector vFields = new Vector();
+ ArrayList<ArrayList<String>> vAll = new ArrayList<ArrayList<String>>();
+ ArrayList<String> vFields = new ArrayList<String>();
// get content of file
- Vector content = getCSVFileContent(csvFileName);
+ ArrayList<String> content = getCSVFileContent(csvFileName);
// remove superfluous content like "#" started lines
content = removeSuperfluousContent(content);
@@ -113,24 +114,24 @@ public class Helper {
content = replacePlaceHolder(content);
// create Enumeration
- Enumeration contentEnum = content.elements();
+ Iterator<String> contentEnum = content.iterator();
// the first line contains field names of the columns
// split line by ";"
StringTokenizer fields = new StringTokenizer(
- contentEnum.nextElement().toString(),";");
+ contentEnum.next(),";");
int fieldCount = 0;
while (fields.hasMoreElements()){
- vFields.add(fields.nextElement());
+ vFields.add(fields.nextToken());
fieldCount++;
}
// fill vData with data of CSV-row
- while (contentEnum.hasMoreElements()){
- Vector vData = new Vector();
+ while (contentEnum.hasNext()){
+ ArrayList<String> vData = new ArrayList<String>();
StringTokenizer data = new StringTokenizer(
- contentEnum.nextElement().toString(),";", true);
+ contentEnum.next(),";", true);
// example: data = "firstData;secondData;;forthData"
// => three tokens => missing one data because the imagine
@@ -139,7 +140,7 @@ public class Helper {
boolean nextIsData = false;
int dataCount = 0;
while (data.hasMoreTokens()) {
- Object myToken = data.nextToken();
+ String myToken = data.nextToken();
// if the "thirdData" will be recieved, myToken=";" but
// vData must add an empty String
if (myToken.equals(";")){
@@ -176,9 +177,9 @@ public class Helper {
* cannot be read
*/
- public Vector getCSVFileContent(String csvFileName) {
+ public ArrayList<String> getCSVFileContent(String csvFileName) {
try {
- Vector content = new Vector();
+ ArrayList<String> content = new ArrayList<String>();
BufferedReader br;
String line;
if ( m_param.DebugIsActive ) {
@@ -194,7 +195,7 @@ public class Helper {
br = new BufferedReader(new InputStreamReader(in));
try {
while( ( line = br.readLine() ) != null ) {
- content.addElement( line );
+ content.add( line );
}
} catch (IOException e) {
br.close();
@@ -230,34 +231,34 @@ public class Helper {
* @param content the content of a csv file
* @return changed file content
*/
- private Vector replacePlaceHolder(Vector content){
+ private ArrayList<String> replacePlaceHolder(ArrayList<String> content){
- Vector vReturn = new Vector();
+ ArrayList<String> vReturn = new ArrayList<String>();
- Vector placeHolders = new Vector();
- Enumeration m_params = m_param.keys();
+ ArrayList<String> placeHolders = new ArrayList<String>();
+ Iterator<String> m_params = m_param.keySet().iterator();
String placeHolder = (String)m_param.get("placeHolder");
- // get all place holdes from typeDetection.csv
- while (m_params.hasMoreElements()){
- String holderKey = (String) m_params.nextElement();
+ // get all place holders from typeDetection.csv
+ while (m_params.hasNext()){
+ String holderKey = m_params.next();
if (holderKey.startsWith(placeHolder)){
placeHolders.add(holderKey);
}
}
// replace all occurrences of place holders in 'CSVData'
- Enumeration cont = content.elements();
+ Iterator<String> cont = content.iterator();
- while( cont.hasMoreElements() ) {
+ while( cont.hasNext() ) {
- String line = (String) cont.nextElement();
+ String line = cont.next();
String newLine = line;
- Enumeration holders = placeHolders.elements();
+ Iterator<String> holders = placeHolders.iterator();
- while( holders.hasMoreElements() ) {
+ while( holders.hasNext() ) {
- String holder = (String) holders.nextElement();
+ String holder = holders.next();
int startPos = line.indexOf(holder);
if (startPos > -1){
@@ -280,29 +281,25 @@ public class Helper {
/** Removes lines of an ascii file content which starts with "#"
* or are empty
- * @param content content of a csv fiöe
+ * @param content content of a csv file
* @return a stripped Vector
*/
- public Vector removeSuperfluousContent(Vector content){
- try{
- Vector newContent = new Vector();
- Enumeration cont = content.elements();
- while( cont.hasMoreElements() ) {
- String line = (String) cont.nextElement();
- if (( ! line.startsWith( "#" ))&& ( line.length() != 0 )) {
- newContent.addElement( line );
- }
- }
- return newContent;
- } catch (ClassCastException e){
- return null;
+ public ArrayList<String> removeSuperfluousContent(ArrayList<String> content){
+ ArrayList<String> newContent = new ArrayList<String>();
+ Iterator<String> cont = content.iterator();
+ while( cont.hasNext() ) {
+ String line = cont.next();
+ if (( ! line.startsWith( "#" ))&& ( line.length() != 0 )) {
+ newContent.add( line );
+ }
}
+ return newContent;
}
/** returns a <code>MediaDescripto</code> filled with given properties and
* values.
- * @param propNames String Array of propertie names
- * @param values Objecr Array of propertie values
+ * @param propNames String Array of property names
+ * @param values Object Array of property values
* @return <code>PropertyValue[]<code>
* @see com.sun.star.beans.PropertyValue
* @see com.sun.star.document.MediaDescriptor
@@ -342,7 +339,7 @@ public class Helper {
public String getURLforfileAlias(String fileAlias)
throws FileAliasNotFoundException{
try{
- String fileURL = (String) m_hFileURLs.get(fileAlias).toString();
+ String fileURL = m_hFileURLs.get(fileAlias).toString();
return utils.getFullURL(ensureEndingFileSep(m_sTestDocPath) + fileURL);
} catch (java.lang.NullPointerException e){
throw new FileAliasNotFoundException(fileAlias);
@@ -358,25 +355,23 @@ public class Helper {
public String getTypeforfileAlias(String fileAlias)
throws FileAliasNotFoundException{
try{
- return (String) m_hFileTypes.get(fileAlias).toString();
+ return m_hFileTypes.get(fileAlias).toString();
} catch (java.lang.NullPointerException e){
throw new FileAliasNotFoundException(fileAlias);
}
}
/**
- * Filles the Hashtable m_hFileURLs with all file names and their URL
- * and the Hashtable m_hFilesTypes with all file names and thier file
- * typ name. This informations are extracted from "files.csv"
- * This is for faster acccess to get fileURL and fileType of fileAlias
+ * Fills the Hashtable m_hFileURLs with all file names and their URL
+ * and the Hashtable m_hFilesTypes with all file names and their file
+ * type name. This informations are extracted from "files.csv"
+ * This is for faster access to get fileURL and fileType of fileAlias
*/
public void createFilesList(){
for (int i = 0; i < m_vFiles.size();i++){
- Vector toDo = (Vector) m_vFiles.get(i);
- m_hFileURLs.put((String) toDo.get(0).toString(),
- (String) toDo.get(1).toString());
- m_hFileTypes.put((String) toDo.get(0).toString(),
- (String) toDo.get(2).toString());
+ ArrayList<String> toDo = m_vFiles.get(i);
+ m_hFileURLs.put(toDo.get(0), toDo.get(1));
+ m_hFileTypes.put(toDo.get(0), toDo.get(2));
}
}
@@ -423,7 +418,7 @@ public class Helper {
}
-/** This exeception should be thrown if a method seeks for an invalid alias name */
+/** This exception should be thrown if a method seeks for an invalid alias name */
class FileAliasNotFoundException extends java.lang.Exception{
/** throws error message with wrong alias name
* @param fileAlias the alias name
diff --git a/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java b/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java
index 770dc98..094a2dd 100644
--- a/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java
+++ b/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java
@@ -27,9 +27,11 @@ import com.sun.star.uno.XInterface;
import complexlib.ComplexTestCase;
import java.io.File;
+import java.util.Iterator;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
+import java.util.ArrayList;
import util.utils;
@@ -218,11 +220,10 @@ public class TypeDetection extends ComplexTestCase {
XInterface oObj = (XInterface) oInterface ;
log.println("ImplName: "+utils.getImplName(oObj));
- m_xDetection = (XTypeDetection)
- UnoRuntime.queryInterface(XTypeDetection.class, oInterface);
- Enumeration k = param.keys();
- while (k.hasMoreElements()){
- String kName = ((String)k.nextElement()).toString();
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list