diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-27 16:08:28 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-29 22:03:01 +0200 |
commit | 453d7edc424d6652e209ace4915d96193a79be71 (patch) | |
tree | 0a6af928cf7d1fd90ec995ae7d114f08eaf617fd /qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java | |
parent | Java5 update - usage generics where possible (diff) | |
download | core-453d7edc424d6652e209ace4915d96193a79be71.tar.gz core-453d7edc424d6652e209ace4915d96193a79be71.zip |
Java5 update - convert more code to use generics:wq
Change-Id: I7ea32cad40a6657e4e5886d04af008cb6d67ac6e
Diffstat (limited to 'qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java')
-rw-r--r-- | qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java b/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java index f2f943a7069d..345e07cdfe8d 100644 --- a/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java +++ b/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java @@ -58,7 +58,7 @@ public class _XSheetAuditing extends MultiMethodTest { xDrawPage = (XDrawPage)tEnv.getObjRelation("XSheetAuditing.DrawPage"); if (xDrawPage == null) { // get from object XDrawPageSupplier oDPS = UnoRuntime.queryInterface(XDrawPageSupplier.class, oObj); - xDrawPage = (XDrawPage) oDPS.getDrawPage(); + xDrawPage = oDPS.getDrawPage(); } if (xDrawPage == null) { throw new StatusException(Status.failed("'XSheetAuditing.DrawPage' object relation not found.")); @@ -70,7 +70,7 @@ public class _XSheetAuditing extends MultiMethodTest { // get a sheet for changing the cells XSpreadsheet xSheet = (XSpreadsheet)tEnv.getObjRelation("XSheetAuditing.Spreadsheet"); if (xSheet == null) // query on ther object - xSheet = (XSpreadsheet)UnoRuntime.queryInterface(XSpreadsheet.class, oObj); + xSheet = UnoRuntime.queryInterface(XSpreadsheet.class, oObj); if (xSheet == null) throw new StatusException(Status.failed("'XSheetAuditing.Spreadsheet' object relation not found.")); try { @@ -136,9 +136,9 @@ public class _XSheetAuditing extends MultiMethodTest { xAddress.setValue(2.5); try { // add a validitation to a cell: only whole numbers are allowed - XPropertySet xPropertySet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xAddress); + XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xAddress); Object o = xPropertySet.getPropertyValue("Validation"); - XPropertySet xValidation = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, o); + XPropertySet xValidation = UnoRuntime.queryInterface(XPropertySet.class, o); xValidation.setPropertyValue("Type", ValidationType.WHOLE); xPropertySet.setPropertyValue("Validation", xValidation); // test @@ -154,7 +154,7 @@ public class _XSheetAuditing extends MultiMethodTest { result &= hasRightAmountOfShapes(0); } catch(com.sun.star.uno.Exception e) { - e.printStackTrace((java.io.PrintWriter)log); + e.printStackTrace(log); result = false; } |