summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qadevOOo/tests/java/ifc/frame/_XDesktop.java15
-rw-r--r--qadevOOo/tests/java/ifc/xml/_UserDefinedAttributeSupplier.java15
2 files changed, 23 insertions, 7 deletions
diff --git a/qadevOOo/tests/java/ifc/frame/_XDesktop.java b/qadevOOo/tests/java/ifc/frame/_XDesktop.java
index 9960cb2298fa..2d0d612f6ebc 100644
--- a/qadevOOo/tests/java/ifc/frame/_XDesktop.java
+++ b/qadevOOo/tests/java/ifc/frame/_XDesktop.java
@@ -2,9 +2,9 @@
*
* $RCSfile: _XDesktop.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change:$Date: 2003-01-27 18:10:24 $
+ * last change:$Date: 2003-01-31 12:36:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,6 +68,9 @@ import com.sun.star.frame.XDesktop;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.uno.XInterface;
import lib.MultiMethodTest;
+import com.sun.star.uno.Any;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
/**
* Testing <code>com.sun.star.frame.XDesktop</code>
@@ -97,7 +100,13 @@ public class _XDesktop extends MultiMethodTest {
try {
for (; xEnum.hasMoreElements();) {
- XInterface xInt = (XInterface) xEnum.nextElement();
+ XInterface xInt = null;
+ try {
+ xInt = (XInterface) AnyConverter.toObject(
+ new Type(XInterface.class), xEnum.nextElement());
+ } catch (com.sun.star.lang.IllegalArgumentException iae) {
+ log.println("Can't convert any");
+ }
}
result = true;
} catch (WrappedTargetException e) {
diff --git a/qadevOOo/tests/java/ifc/xml/_UserDefinedAttributeSupplier.java b/qadevOOo/tests/java/ifc/xml/_UserDefinedAttributeSupplier.java
index ae086a4f5d0d..281704dbd3ac 100644
--- a/qadevOOo/tests/java/ifc/xml/_UserDefinedAttributeSupplier.java
+++ b/qadevOOo/tests/java/ifc/xml/_UserDefinedAttributeSupplier.java
@@ -2,9 +2,9 @@
*
* $RCSfile: _UserDefinedAttributeSupplier.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change:$Date: 2003-01-27 18:14:13 $
+ * last change:$Date: 2003-01-31 12:40:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,6 +62,9 @@
package ifc.xml;
import com.sun.star.container.XNameContainer;
import com.sun.star.xml.AttributeData;
+import com.sun.star.uno.Any;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
public class _UserDefinedAttributeSupplier extends lib.MultiPropertyTest {
@@ -69,7 +72,9 @@ public class _UserDefinedAttributeSupplier extends lib.MultiPropertyTest {
XNameContainer uda = null;
boolean res = false;
try {
- uda = (XNameContainer) oObj.getPropertyValue("UserDefinedAttributes");
+ uda = (XNameContainer) AnyConverter.toObject(
+ new Type(XNameContainer.class),
+ oObj.getPropertyValue("UserDefinedAttributes"));
AttributeData attr = new AttributeData();
attr.Namespace = "http://www.sun.com/staroffice/apitest/Chartprop";
attr.Type="CDATA";
@@ -77,7 +82,9 @@ public class _UserDefinedAttributeSupplier extends lib.MultiPropertyTest {
uda.insertByName("Chartprop:has-first-alien-attribute",attr);
String[] els = uda.getElementNames();
oObj.setPropertyValue("UserDefinedAttributes",uda);
- uda = (XNameContainer) oObj.getPropertyValue("UserDefinedAttributes");
+ uda = (XNameContainer) AnyConverter.toObject(
+ new Type(XNameContainer.class),
+ oObj.getPropertyValue("UserDefinedAttributes"));
els = uda.getElementNames();
Object obj = uda.getByName("Chartprop:has-first-alien-attribute");
res = true;