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/mod/_sc/ScDataPilotFieldGroupItemObj.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/mod/_sc/ScDataPilotFieldGroupItemObj.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java index df2b4a5cc841..2b7714422ff1 100644 --- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java @@ -119,7 +119,7 @@ public class ScDataPilotFieldGroupItemObj extends TestCase log.println ("Getting a sheet"); - XSpreadsheets xSpreadsheets = (XSpreadsheets) xSheetDoc.getSheets (); + XSpreadsheets xSpreadsheets = xSheetDoc.getSheets (); XSpreadsheet oSheet = null; XSpreadsheet oSheet2 = null; XIndexAccess oIndexAccess = UnoRuntime.queryInterface ( @@ -227,19 +227,19 @@ public class ScDataPilotFieldGroupItemObj extends TestCase try { Object oDataPilotField = DPDsc.getDataPilotFields ().getByIndex (0); - fieldPropSet = (XPropertySet) UnoRuntime.queryInterface ( + fieldPropSet = UnoRuntime.queryInterface ( XPropertySet.class, oDataPilotField); fieldPropSet.setPropertyValue ("Orientation", com.sun.star.sheet.DataPilotFieldOrientation.ROW); oDataPilotField = DPDsc.getDataPilotFields ().getByIndex (1); - fieldPropSet = (XPropertySet) UnoRuntime.queryInterface ( + fieldPropSet = UnoRuntime.queryInterface ( XPropertySet.class, oDataPilotField); fieldPropSet.setPropertyValue ("Function", com.sun.star.sheet.GeneralFunction.SUM); fieldPropSet.setPropertyValue ("Orientation", com.sun.star.sheet.DataPilotFieldOrientation.DATA); oDataPilotField = DPDsc.getDataPilotFields ().getByIndex (2); - fieldPropSet = (XPropertySet) UnoRuntime.queryInterface ( + fieldPropSet = UnoRuntime.queryInterface ( XPropertySet.class, oDataPilotField); fieldPropSet.setPropertyValue ("Orientation", com.sun.star.sheet.DataPilotFieldOrientation.COLUMN); @@ -331,10 +331,10 @@ public class ScDataPilotFieldGroupItemObj extends TestCase { datapilotfield = (XInterface) AnyConverter.toObject ( new Type (XInterface.class), IA.getByIndex (i)); - XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface (XPropertySet.class, IA.getByIndex (i)); + XPropertySet xPropertySet = UnoRuntime.queryInterface (XPropertySet.class, IA.getByIndex (i)); if (((Boolean)xPropertySet.getPropertyValue ("IsGroupField")).booleanValue ()) { - xPropertySet = (XPropertySet) UnoRuntime.queryInterface (XPropertySet.class, datapilotfield); + xPropertySet = UnoRuntime.queryInterface (XPropertySet.class, datapilotfield); XNamed xNamed = UnoRuntime.queryInterface (XNamed.class, IA.getByIndex (i)); System.out.println ("name: "+xNamed.getName ()); dpgi = (DataPilotFieldGroupInfo) xPropertySet.getPropertyValue ("GroupInfo"); @@ -342,8 +342,8 @@ public class ScDataPilotFieldGroupItemObj extends TestCase } groups = dpgi.Groups; XIndexAccess groupAccess = UnoRuntime.queryInterface(XIndexAccess.class, groups); - XNameAccess groupNames = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, groupAccess.getByIndex(0)); - oObj = (XInterface) UnoRuntime.queryInterface(XInterface.class, groupNames.getByName("aName")); + XNameAccess groupNames = UnoRuntime.queryInterface(XNameAccess.class, groupAccess.getByIndex(0)); + oObj = UnoRuntime.queryInterface(XInterface.class, groupNames.getByName("aName")); } catch (Exception e) { |