summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java
diff options
context:
space:
mode:
authorStephan Wunderlich <sw@openoffice.org>2003-01-31 13:01:05 +0000
committerStephan Wunderlich <sw@openoffice.org>2003-01-31 13:01:05 +0000
commit3a5eadba4146a43fbc6ae122c055b9f7b942b671 (patch)
tree56ec86777e6bfcf0b504a30f204c0a8c0b3e3857 /qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java
parentaf2992bb4c8acc46e81f2d0ee0614c2627a02d76 (diff)
CHG: using AnyConverter instead of simple cast
Diffstat (limited to 'qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java')
-rw-r--r--qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java
index 896f8fc2fca7..5644a71bb989 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java
@@ -2,9 +2,9 @@
*
* $RCSfile: ScAccessiblePreviewHeaderCell.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change:$Date: 2003-01-27 18:16:44 $
+ * last change:$Date: 2003-01-31 13:47:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -96,6 +96,9 @@ import com.sun.star.sheet.XHeaderFooterContent;
import com.sun.star.style.XStyle;
import com.sun.star.text.XText;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
+
/**
* Object implements the following interfaces:
* <ul>
@@ -183,7 +186,8 @@ public class ScAccessiblePreviewHeaderCell extends TestCase {
XSpreadsheets oSheets = xSheetDoc.getSheets() ;
XIndexAccess oIndexSheets = (XIndexAccess)
UnoRuntime.queryInterface(XIndexAccess.class, oSheets);
- XSpreadsheet oSheet = (XSpreadsheet) oIndexSheets.getByIndex(0);
+ XSpreadsheet oSheet = (XSpreadsheet) AnyConverter.toObject(
+ new Type(XSpreadsheet.class),oIndexSheets.getByIndex(0));
log.println("Getting a cell from sheet") ;
xCell = oSheet.getCellByPosition(0, 0);
@@ -195,6 +199,10 @@ public class ScAccessiblePreviewHeaderCell extends TestCase {
e.printStackTrace(log);
throw new StatusException(
"Error getting cell object from spreadsheet document", e);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ e.printStackTrace(log);
+ throw new StatusException(
+ "Error getting cell object from spreadsheet document", e);
}
xCell.setFormula("Value");