diff options
author | Stephan Wunderlich <sw@openoffice.org> | 2003-01-31 13:14:51 +0000 |
---|---|---|
committer | Stephan Wunderlich <sw@openoffice.org> | 2003-01-31 13:14:51 +0000 |
commit | 0ad01298ff2ff26f7a036e1d1221313fe063120e (patch) | |
tree | c10b1c7dc3f1d6c0a64ad8abdd865d5352816308 /qadevOOo/tests/java/mod/_sc/ScAreaLinksObj.java | |
parent | 3a5eadba4146a43fbc6ae122c055b9f7b942b671 (diff) |
CHG: using AnyConverter instead of simple cast
Diffstat (limited to 'qadevOOo/tests/java/mod/_sc/ScAreaLinksObj.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_sc/ScAreaLinksObj.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/qadevOOo/tests/java/mod/_sc/ScAreaLinksObj.java b/qadevOOo/tests/java/mod/_sc/ScAreaLinksObj.java index 37c008907d84..555ee2f13c93 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAreaLinksObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScAreaLinksObj.java @@ -2,9 +2,9 @@ * * $RCSfile: ScAreaLinksObj.java,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change:$Date: 2003-01-27 18:16:42 $ + * last change:$Date: 2003-01-31 14:14:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,6 +75,10 @@ import lib.TestEnvironment; import lib.TestParameters; import util.SOfficeFactory; +import com.sun.star.uno.AnyConverter; +import com.sun.star.uno.Type; + + /** * Test for object which is represented by service * <code>com.sun.star.sheet.CellAreaLinks</code>. @@ -145,7 +149,8 @@ public class ScAreaLinksObj extends TestCase { // creation of testobject here XPropertySet props = (XPropertySet)UnoRuntime.queryInterface (XPropertySet.class, xSheetDoc); - oObj = (XInterface) props.getPropertyValue("AreaLinks") ; + oObj = (XInterface) AnyConverter.toObject( + new Type(XInterface.class),props.getPropertyValue("AreaLinks")) ; XAreaLinks links = null ; // adding one link into collection (for best testing) @@ -164,6 +169,10 @@ public class ScAreaLinksObj extends TestCase { log.println ("Exception occured while creating test Object.") ; e.printStackTrace(log) ; throw new StatusException("Couldn't create test object", e); + } catch (com.sun.star.lang.IllegalArgumentException e) { + log.println ("Exception occured while creating test Object.") ; + e.printStackTrace(log) ; + throw new StatusException("Couldn't create test object", e); } return tEnv ; |