diff options
Diffstat (limited to 'odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java')
-rw-r--r-- | odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java | 9 |
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(); |