diff options
author | Stephan Wunderlich <sw@openoffice.org> | 2003-02-04 12:26:12 +0000 |
---|---|---|
committer | Stephan Wunderlich <sw@openoffice.org> | 2003-02-04 12:26:12 +0000 |
commit | 61a89771d57e58d70e1d675047862846b94b1a88 (patch) | |
tree | 37d5a9c562920162ec83d6c9cbc47f6b1d676b7c /qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java | |
parent | 840c50f599e3c1748e4b238d2599a4e20e2ec9f8 (diff) |
CHG: using AnyConverter instead of simple cast
Diffstat (limited to 'qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java b/qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java index c9a5497131b5..87d4b70e97b5 100644 --- a/qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScDrawPageObj.java @@ -2,9 +2,9 @@ * * $RCSfile: ScDrawPageObj.java,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change:$Date: 2003-01-27 18:16:31 $ + * last change:$Date: 2003-02-04 13:05:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,6 +79,9 @@ import util.InstCreator; import util.SOfficeFactory; import util.ShapeDsc; +import com.sun.star.uno.AnyConverter; +import com.sun.star.uno.Type; + public class ScDrawPageObj extends TestCase { XSpreadsheetDocument xDoc = null; @@ -148,7 +151,8 @@ public class ScDrawPageObj extends TestCase { oDP = (XDrawPages) oDPS.getDrawPages(); oDP.insertNewByIndex(1); oDP.insertNewByIndex(2); - oObj = (XDrawPage) oDP.getByIndex(0); + oObj = (XDrawPage) AnyConverter.toObject( + new Type(XDrawPage.class),oDP.getByIndex(0)); SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF()); @@ -165,6 +169,10 @@ public class ScDrawPageObj extends TestCase { log.println("Couldn't create insance"); e.printStackTrace(log); throw new StatusException("Can't create enviroment", e) ; + } catch (com.sun.star.lang.IllegalArgumentException e) { + log.println("Couldn't create insance"); + e.printStackTrace(log); + throw new StatusException("Can't create enviroment", e) ; } // create test environment here |