diff options
author | Stephan Wunderlich <sw@openoffice.org> | 2003-02-04 08:28:23 +0000 |
---|---|---|
committer | Stephan Wunderlich <sw@openoffice.org> | 2003-02-04 08:28:23 +0000 |
commit | b96a237b5e5f076b4cccdb24a5355d45fe972e3d (patch) | |
tree | 1d2bbd0d34f92b12ffb58abb37b704b8a87427bf /qadevOOo/tests/java/mod/_smgr | |
parent | 567a7ec52bcccebbae3ff43d6bb47e2b7be5a83f (diff) |
CHG: using AnyConverter instead of simple cast
Diffstat (limited to 'qadevOOo/tests/java/mod/_smgr')
-rw-r--r-- | qadevOOo/tests/java/mod/_smgr/OServiceManager.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/qadevOOo/tests/java/mod/_smgr/OServiceManager.java b/qadevOOo/tests/java/mod/_smgr/OServiceManager.java index 9811726b73fa..130a6860b6bc 100644 --- a/qadevOOo/tests/java/mod/_smgr/OServiceManager.java +++ b/qadevOOo/tests/java/mod/_smgr/OServiceManager.java @@ -2,9 +2,9 @@ * * $RCSfile: OServiceManager.java,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change:$Date: 2003-01-27 18:17:46 $ + * last change:$Date: 2003-02-04 09:28:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,6 +73,8 @@ import lib.StatusException; import lib.TestCase; import lib.TestEnvironment; import lib.TestParameters; +import com.sun.star.uno.AnyConverter; +import com.sun.star.uno.Type; /** * Test for object which is represented by service @@ -170,8 +172,9 @@ public class OServiceManager extends TestCase { XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, oInterface); if (xProp != null) { - xContext = (XComponentContext) - xProp.getPropertyValue("DefaultContext"); + xContext = (XComponentContext) AnyConverter.toObject( + new Type(XComponentContext.class), + xProp.getPropertyValue("DefaultContext")); } } catch (com.sun.star.uno.Exception e) { log.println("Can't insert a service to the ServiceManager") ; |