summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-27 15:40:17 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-29 22:03:01 +0200
commitb65017a2a7af290f6681da7b197a52efe83d5185 (patch)
tree06f71a435ba200d044109469b13be7c8f5dbe950 /qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java
parent33ec740d1438c3dddf8e1974757ed05bb76425ca (diff)
Java5 update - usage generics where possible
Change-Id: I12f8c448961919e153047e28fee2a0acf3af1002
Diffstat (limited to 'qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java')
-rw-r--r--qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java
index 8d89b7e6eba6..df2b4a5cc841 100644
--- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java
@@ -87,7 +87,7 @@ public class ScDataPilotFieldGroupItemObj extends TestCase
{
log.println (" disposing xSheetDoc ");
- XComponent oComp = (XComponent) UnoRuntime.queryInterface (
+ XComponent oComp = UnoRuntime.queryInterface (
XComponent.class, xSheetDoc);
util.DesktopTools.closeDoc (oComp);
}
@@ -122,7 +122,7 @@ public class ScDataPilotFieldGroupItemObj extends TestCase
XSpreadsheets xSpreadsheets = (XSpreadsheets) xSheetDoc.getSheets ();
XSpreadsheet oSheet = null;
XSpreadsheet oSheet2 = null;
- XIndexAccess oIndexAccess = (XIndexAccess) UnoRuntime.queryInterface (
+ XIndexAccess oIndexAccess = UnoRuntime.queryInterface (
XIndexAccess.class, xSpreadsheets);
// Make sure there are at least two sheets
xSpreadsheets.insertNewByName("Some Sheet", (short)0);
@@ -215,7 +215,7 @@ public class ScDataPilotFieldGroupItemObj extends TestCase
// create the test objects
log.println ("Getting test objects");
- XDataPilotTablesSupplier DPTS = (XDataPilotTablesSupplier) UnoRuntime.queryInterface (
+ XDataPilotTablesSupplier DPTS = UnoRuntime.queryInterface (
XDataPilotTablesSupplier.class,
oSheet);
XDataPilotTables DPT = DPTS.getDataPilotTables ();
@@ -278,11 +278,11 @@ public class ScDataPilotFieldGroupItemObj extends TestCase
}
DPT.insertNewByName ("DataPilotTable", sCellAdress, DPDsc);
- XIndexAccess xIA = (XIndexAccess) UnoRuntime.queryInterface (XIndexAccess.class,DPTS.getDataPilotTables ());
+ XIndexAccess xIA = UnoRuntime.queryInterface (XIndexAccess.class,DPTS.getDataPilotTables ());
XIndexAccess IA = null;
try
{
- XDataPilotDescriptor xDPT = (XDataPilotDescriptor) UnoRuntime.queryInterface (XDataPilotDescriptor.class,xIA.getByIndex (0));
+ XDataPilotDescriptor xDPT = UnoRuntime.queryInterface (XDataPilotDescriptor.class,xIA.getByIndex (0));
IA = xDPT.getRowFields ();
//getSRange(IA);
System.out.println ("COUNT: "+IA.getCount ());
@@ -307,14 +307,14 @@ public class ScDataPilotFieldGroupItemObj extends TestCase
try
{
- XDataPilotFieldGrouping dpfg = (XDataPilotFieldGrouping) UnoRuntime.queryInterface (XDataPilotFieldGrouping.class, datapilotfield);
+ XDataPilotFieldGrouping dpfg = UnoRuntime.queryInterface (XDataPilotFieldGrouping.class, datapilotfield);
String[] elements = new String[]{"aName","otherName"};
dpfg.createNameGroup (elements);
DataPilotFieldGroupInfo dpgi=null;
- xIA = (XIndexAccess) UnoRuntime.queryInterface (XIndexAccess.class,DPTS.getDataPilotTables ());
+ xIA = UnoRuntime.queryInterface (XIndexAccess.class,DPTS.getDataPilotTables ());
try
{
- XDataPilotDescriptor xDPT = (XDataPilotDescriptor) UnoRuntime.queryInterface (XDataPilotDescriptor.class,xIA.getByIndex (0));
+ XDataPilotDescriptor xDPT = UnoRuntime.queryInterface (XDataPilotDescriptor.class,xIA.getByIndex (0));
IA = xDPT.getRowFields ();
}
catch (com.sun.star.lang.WrappedTargetException e)
@@ -335,13 +335,13 @@ public class ScDataPilotFieldGroupItemObj extends TestCase
if (((Boolean)xPropertySet.getPropertyValue ("IsGroupField")).booleanValue ())
{
xPropertySet = (XPropertySet) UnoRuntime.queryInterface (XPropertySet.class, datapilotfield);
- XNamed xNamed = (XNamed) UnoRuntime.queryInterface (XNamed.class, IA.getByIndex (i));
+ XNamed xNamed = UnoRuntime.queryInterface (XNamed.class, IA.getByIndex (i));
System.out.println ("name: "+xNamed.getName ());
dpgi = (DataPilotFieldGroupInfo) xPropertySet.getPropertyValue ("GroupInfo");
}
}
groups = dpgi.Groups;
- XIndexAccess groupAccess = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, 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"));
}