summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_ScenariosEnumeration.java
diff options
context:
space:
mode:
authorStephan Wunderlich <sw@openoffice.org>2003-02-03 12:35:34 +0000
committerStephan Wunderlich <sw@openoffice.org>2003-02-03 12:35:34 +0000
commit73ddcdc680e269b1e372d5002e2409fd5feedebc (patch)
treec07f5d71db4366db8daebd827efd6289767a6f42 /qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_ScenariosEnumeration.java
parent0105ee238374d2d4352deff33c23f69364a42e2e (diff)
CHG: using AnyConverter instead of simple cast
Diffstat (limited to 'qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_ScenariosEnumeration.java')
-rw-r--r--qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_ScenariosEnumeration.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_ScenariosEnumeration.java b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_ScenariosEnumeration.java
index 18b2768cbd8c..186ec02c365f 100644
--- a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_ScenariosEnumeration.java
+++ b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_ScenariosEnumeration.java
@@ -2,9 +2,9 @@
*
* $RCSfile: ScIndexEnumeration_ScenariosEnumeration.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change:$Date: 2003-01-27 18:16:24 $
+ * last change:$Date: 2003-02-03 13:27:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,6 +80,9 @@ import lib.TestEnvironment;
import lib.TestParameters;
import util.SOfficeFactory;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
+
public class ScIndexEnumeration_ScenariosEnumeration extends TestCase {
public XSpreadsheetDocument xSpreadsheetDoc;
@@ -118,13 +121,17 @@ public class ScIndexEnumeration_ScenariosEnumeration extends TestCase {
XIndexAccess oIndexAccess = (XIndexAccess)
UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets);
try {
- oSheet = (XSpreadsheet)oIndexAccess.getByIndex(0);
+ oSheet = (XSpreadsheet) AnyConverter.toObject(
+ new Type(XSpreadsheet.class),oIndexAccess.getByIndex(0));
} catch (com.sun.star.lang.WrappedTargetException e) {
e.printStackTrace(log);
throw new StatusException( "Couldn't get a spreadsheet", e);
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
e.printStackTrace(log);
throw new StatusException( "Couldn't get a spreadsheet", e);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ e.printStackTrace(log);
+ throw new StatusException( "Couldn't get a spreadsheet", e);
}
log.println("filling some cells");