summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-04-17 14:59:35 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-04-19 07:52:08 +0000
commit8d87758d65e4a03271f76e354dfc84c1fcd5fe21 (patch)
treebc8f4f0df6981ad10fe1333db1a2b015ea079709 /odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java
parentd62425cc27e04a3237cfec2ea2663b8b11284ec8 (diff)
Java cleanup, remove the rest of the unnecessary casts
Change-Id: Ia61d250f6b3711abc29569c5ece38a6f87e38daa Reviewed-on: https://gerrit.libreoffice.org/3432 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java')
-rw-r--r--odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java b/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java
index fd407358a00a..0518e327bba3 100644
--- a/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java
@@ -77,8 +77,7 @@ public class ChangeOrderDemo
// create two rectangles
XDrawPage xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
- XShapes xShapes = (XShapes)
- UnoRuntime.queryInterface( XShapes.class, xPage );
+ XShapes xShapes = UnoRuntime.queryInterface( XShapes.class, xPage );
XShape xShape1 = ShapeHelper.createShape( xDrawDoc,
new Point( 1000, 1000 ), new Size( 5000, 5000 ),
@@ -93,10 +92,8 @@ public class ChangeOrderDemo
ShapeHelper.addPortion( xShape1, "by changing the ZOrder it lie now on top", true );
xShapes.add( xShape2 );
- XPropertySet xPropSet1 = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xShape1 );
- XPropertySet xPropSet2 = (XPropertySet)
- UnoRuntime.queryInterface( XPropertySet.class, xShape2 );
+ XPropertySet xPropSet1 = UnoRuntime.queryInterface( XPropertySet.class, xShape1 );
+ XPropertySet xPropSet2 = UnoRuntime.queryInterface( XPropertySet.class, xShape2 );
int nOrderOfShape1 = ((Integer)xPropSet1.getPropertyValue( "ZOrder" )).intValue();
int nOrderOfShape2 = ((Integer)xPropSet2.getPropertyValue( "ZOrder" )).intValue();