summaryrefslogtreecommitdiffstats
path: root/qadevOOo/tests/java/mod/_svx/SvxShape.java
diff options
context:
space:
mode:
authorStephan Wunderlich <sw@openoffice.org>2003-02-10 08:08:56 +0000
committerStephan Wunderlich <sw@openoffice.org>2003-02-10 08:08:56 +0000
commit75288ef93fe3fd605fa5984705c7704ce94938d2 (patch)
treede8dc7bb43781257d21d0b876e8057106702969a /qadevOOo/tests/java/mod/_svx/SvxShape.java
parentCHG: using AnyConverter instead of simple cast (diff)
downloadcore-75288ef93fe3fd605fa5984705c7704ce94938d2.tar.gz
core-75288ef93fe3fd605fa5984705c7704ce94938d2.zip
CHG: using AnyConverter instead of simple cast
Diffstat (limited to 'qadevOOo/tests/java/mod/_svx/SvxShape.java')
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxShape.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/qadevOOo/tests/java/mod/_svx/SvxShape.java b/qadevOOo/tests/java/mod/_svx/SvxShape.java
index 45f259c608b5..514cef5492ba 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxShape.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxShape.java
@@ -2,9 +2,9 @@
*
* $RCSfile: SvxShape.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change:$Date: 2003-01-27 18:18:09 $
+ * last change:$Date: 2003-02-10 09:05:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,6 +77,8 @@ import util.DrawTools;
import util.InstCreator;
import util.SOfficeFactory;
import util.utils;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
/**
* Test for object which is represented by service
@@ -225,18 +227,22 @@ public class SvxShape extends TestCase {
UnoRuntime.queryInterface(XPropertySet.class,oObj);
XStyle aStyle = null;
try {
- aStyle = (XStyle) oShapeProps.getPropertyValue("Style");
+ aStyle = (XStyle) AnyConverter.toObject(
+ new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (com.sun.star.lang.WrappedTargetException e) {
} catch (com.sun.star.beans.UnknownPropertyException e) {
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
}
tEnv.addObjRelation("Style1",aStyle);
oShapeProps = (XPropertySet) UnoRuntime.queryInterface
(XPropertySet.class,oShape);
try {
- aStyle = (XStyle) oShapeProps.getPropertyValue("Style");
+ aStyle = (XStyle) AnyConverter.toObject(
+ new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (com.sun.star.lang.WrappedTargetException e) {
} catch (com.sun.star.beans.UnknownPropertyException e) {
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
}
tEnv.addObjRelation("Style2",aStyle);
@@ -249,5 +255,4 @@ public class SvxShape extends TestCase {
return tEnv;
} // finish method getTestEnvironment
-} // finish class SvxShape
-
+} // finish class SvxShape \ No newline at end of file