diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-27 15:40:17 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-29 22:03:01 +0200 |
commit | b65017a2a7af290f6681da7b197a52efe83d5185 (patch) | |
tree | 06f71a435ba200d044109469b13be7c8f5dbe950 /qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java | |
parent | Java5 update - Convert Hashtable to HashMap (diff) | |
download | core-b65017a2a7af290f6681da7b197a52efe83d5185.tar.gz core-b65017a2a7af290f6681da7b197a52efe83d5185.zip |
Java5 update - usage generics where possible
Change-Id: I12f8c448961919e153047e28fee2a0acf3af1002
Diffstat (limited to 'qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java b/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java index c880e47671fb..d0902ae695ad 100644 --- a/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java +++ b/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java @@ -104,11 +104,9 @@ public class SvxShapeGroup extends TestCase { // get the drawpage of drawing here try { log.println( "getting Drawpage" ); - XDrawPagesSupplier oDPS = (XDrawPagesSupplier) - UnoRuntime.queryInterface(XDrawPagesSupplier.class,xDrawDoc); + XDrawPagesSupplier oDPS = UnoRuntime.queryInterface(XDrawPagesSupplier.class,xDrawDoc); XDrawPages oDPn = oDPS.getDrawPages(); - XIndexAccess oDPi = (XIndexAccess) - UnoRuntime.queryInterface(XIndexAccess.class,oDPn); + XIndexAccess oDPi = UnoRuntime.queryInterface(XIndexAccess.class,oDPn); oObj = (XDrawPage) AnyConverter.toObject( new Type(XDrawPage.class),oDPi.getByIndex(0)); } catch ( Exception e ) { @@ -125,7 +123,7 @@ public class SvxShapeGroup extends TestCase { //put something on the drawpage log.println( "inserting some Shapes" ); - oShapes = (XShapes) UnoRuntime.queryInterface(XShapes.class,oObj); + oShapes = UnoRuntime.queryInterface(XShapes.class,oObj); XShape Shape1 = SOF.createShape(xDrawDoc, 3000,4500,15000,1000,"Ellipse"); oShapes.add(SOF.createShape(xDrawDoc, @@ -155,7 +153,7 @@ public class SvxShapeGroup extends TestCase { //get the XShapeGrouper try{ log.println("get XShapeGroup"); - XShapeGrouper oSG = (XShapeGrouper)UnoRuntime.queryInterface + XShapeGrouper oSG = UnoRuntime.queryInterface (XShapeGrouper.class, oObj); oObj = oSG.group(oShapes); } catch ( Exception e) { |