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/_toolkit/UnoControlDialogModel.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/_toolkit/UnoControlDialogModel.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_toolkit/UnoControlDialogModel.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qadevOOo/tests/java/mod/_toolkit/UnoControlDialogModel.java b/qadevOOo/tests/java/mod/_toolkit/UnoControlDialogModel.java index f254bf745f33..1d8f50e365f8 100644 --- a/qadevOOo/tests/java/mod/_toolkit/UnoControlDialogModel.java +++ b/qadevOOo/tests/java/mod/_toolkit/UnoControlDialogModel.java @@ -84,7 +84,7 @@ public class UnoControlDialogModel extends TestCase { "com.sun.star.awt.UnoControlDialogModel"); // create the dialog model and set the properties - XPropertySet xPSetDialog = (XPropertySet) UnoRuntime.queryInterface( + XPropertySet xPSetDialog = UnoRuntime.queryInterface( XPropertySet.class, dialogModel); xPSetDialog.setPropertyValue("PositionX", new Integer(100)); xPSetDialog.setPropertyValue("PositionY", new Integer(100)); @@ -102,7 +102,7 @@ public class UnoControlDialogModel extends TestCase { // create the button model and set the properties Object buttonModel = xMultiServiceFactory.createInstance( "com.sun.star.awt.UnoControlButtonModel"); - XPropertySet xPSetButton = (XPropertySet) UnoRuntime.queryInterface( + XPropertySet xPSetButton = UnoRuntime.queryInterface( XPropertySet.class, buttonModel); xPSetButton.setPropertyValue("PositionX", new Integer(50)); xPSetButton.setPropertyValue("PositionY", new Integer(30)); @@ -115,7 +115,7 @@ public class UnoControlDialogModel extends TestCase { // create the label model and set the properties Object labelModel = xMultiServiceFactory.createInstance( "com.sun.star.awt.UnoControlFixedTextModel"); - XPropertySet xPSetLabel = (XPropertySet) UnoRuntime.queryInterface( + XPropertySet xPSetLabel = UnoRuntime.queryInterface( XPropertySet.class, labelModel); xPSetLabel.setPropertyValue("PositionX", new Integer(40)); xPSetLabel.setPropertyValue("PositionY", new Integer(60)); @@ -126,7 +126,7 @@ public class UnoControlDialogModel extends TestCase { xPSetLabel.setPropertyValue("Label", _labelPrefix); // insert the control models into the dialog model - XNameContainer xNameCont = (XNameContainer) UnoRuntime.queryInterface( + XNameContainer xNameCont = UnoRuntime.queryInterface( XNameContainer.class, dialogModel); xNameCont.insertByName(_buttonName, buttonModel); |