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/ifc/chart | |
parent | b65017a2a7af290f6681da7b197a52efe83d5185 (diff) |
Java5 update - convert more code to use generics:wq
Change-Id: I7ea32cad40a6657e4e5886d04af008cb6d67ac6e
Diffstat (limited to 'qadevOOo/tests/java/ifc/chart')
13 files changed, 14 insertions, 27 deletions
diff --git a/qadevOOo/tests/java/ifc/chart/_BarDiagram.java b/qadevOOo/tests/java/ifc/chart/_BarDiagram.java index f188abe5896a..601b6e0e570a 100644 --- a/qadevOOo/tests/java/ifc/chart/_BarDiagram.java +++ b/qadevOOo/tests/java/ifc/chart/_BarDiagram.java @@ -72,8 +72,7 @@ public class _BarDiagram extends MultiPropertyTest { oldDiagram = doc.getDiagram(); doc.setDiagram(bar); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); log.println("Set it to 3D"); try { oObj.setPropertyValue("Dim3D", new Boolean(true)); diff --git a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java index 1bb49c0558c0..99bb00065ddb 100644 --- a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java +++ b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java @@ -62,8 +62,7 @@ public class _Chart3DBarProperties extends MultiPropertyTest { doc.setDiagram(bar); log.println("Change Diagram to 3D"); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); try { oObj.setPropertyValue("Dim3D", new Boolean(true)); } catch(com.sun.star.lang.WrappedTargetException e) { @@ -95,8 +94,7 @@ public class _Chart3DBarProperties extends MultiPropertyTest { ("Relation 'CHARTDOC' not found")); log.println("Change Diagram to 3D"); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); try { oObj.setPropertyValue("Dim3D", new Boolean(false)); } catch(com.sun.star.lang.WrappedTargetException e) { diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java index 92bdde4b284b..0253e8c34cfe 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartAxisYSupplier.java @@ -54,8 +54,7 @@ public class _ChartAxisYSupplier extends MultiPropertyTest { if (doc == null) throw new StatusException(Status.failed ("Relation 'CHARTDOC' not found")); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); } public void _HasYAxis() { diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java index c0debc4a6be7..42ba8b17af78 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartAxisZSupplier.java @@ -64,8 +64,7 @@ public class _ChartAxisZSupplier extends MultiPropertyTest { doc.setDiagram(bar); log.println("Set it to 3D"); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); try { oObj.setPropertyValue("Dim3D", new Boolean(true)); } catch(com.sun.star.lang.WrappedTargetException e) { diff --git a/qadevOOo/tests/java/ifc/chart/_ChartStatistics.java b/qadevOOo/tests/java/ifc/chart/_ChartStatistics.java index 54852ff7f9d1..d7f3be6cf9e4 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartStatistics.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartStatistics.java @@ -58,8 +58,7 @@ public class _ChartStatistics extends MultiPropertyTest { if (doc == null) throw new StatusException(Status.failed ("Relation 'CHARTDOC' not found")); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); } } diff --git a/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java index 814be9287f3a..10b1345a6248 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisXSupplier.java @@ -66,8 +66,7 @@ public class _ChartTwoAxisXSupplier extends MultiPropertyTest { doc.setDiagram(bar); log.println("Set it to 3D"); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); try { oObj.setPropertyValue("Dim3D", new Boolean(true)); } catch(com.sun.star.lang.WrappedTargetException e) { diff --git a/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java index 50cef10c98cd..1333c6011b89 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartTwoAxisYSupplier.java @@ -66,8 +66,7 @@ public class _ChartTwoAxisYSupplier extends MultiPropertyTest { doc.setDiagram(bar); log.println("Set it to 3D"); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); try { oObj.setPropertyValue("Dim3D", new Boolean(true)); } catch(com.sun.star.lang.WrappedTargetException e) { diff --git a/qadevOOo/tests/java/ifc/chart/_Diagram.java b/qadevOOo/tests/java/ifc/chart/_Diagram.java index 277c69ef3f3e..3ab90b84784c 100644 --- a/qadevOOo/tests/java/ifc/chart/_Diagram.java +++ b/qadevOOo/tests/java/ifc/chart/_Diagram.java @@ -52,8 +52,7 @@ public class _Diagram extends MultiPropertyTest { if (doc == null) throw new StatusException(Status.failed ("Relation 'CHARTDOC' not found")); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); } } diff --git a/qadevOOo/tests/java/ifc/chart/_Dim3DDiagram.java b/qadevOOo/tests/java/ifc/chart/_Dim3DDiagram.java index 4dfaf4feee6e..0288aeb6cbf5 100644 --- a/qadevOOo/tests/java/ifc/chart/_Dim3DDiagram.java +++ b/qadevOOo/tests/java/ifc/chart/_Dim3DDiagram.java @@ -51,8 +51,7 @@ public class _Dim3DDiagram extends MultiPropertyTest { if (doc == null) throw new StatusException(Status.failed ("Relation 'CHARTDOC' not found")); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); } } // EOF Dim3DDiagram diff --git a/qadevOOo/tests/java/ifc/chart/_LineDiagram.java b/qadevOOo/tests/java/ifc/chart/_LineDiagram.java index f5e5436dd74a..4632bc8f9e66 100644 --- a/qadevOOo/tests/java/ifc/chart/_LineDiagram.java +++ b/qadevOOo/tests/java/ifc/chart/_LineDiagram.java @@ -74,8 +74,7 @@ public class _LineDiagram extends MultiPropertyTest { oldDiagram = doc.getDiagram(); doc.setDiagram(Line); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); } /** diff --git a/qadevOOo/tests/java/ifc/chart/_StackableDiagram.java b/qadevOOo/tests/java/ifc/chart/_StackableDiagram.java index 4d6b07dbf1fd..bb7a36080197 100644 --- a/qadevOOo/tests/java/ifc/chart/_StackableDiagram.java +++ b/qadevOOo/tests/java/ifc/chart/_StackableDiagram.java @@ -65,8 +65,7 @@ public class _StackableDiagram extends MultiPropertyTest { oldDiagram = doc.getDiagram(); doc.setDiagram(stack); - oObj = (XPropertySet) - UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + oObj = UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); } /** diff --git a/qadevOOo/tests/java/ifc/chart/_StockDiagram.java b/qadevOOo/tests/java/ifc/chart/_StockDiagram.java index 013edc6da8a9..d54a0e7aab44 100644 --- a/qadevOOo/tests/java/ifc/chart/_StockDiagram.java +++ b/qadevOOo/tests/java/ifc/chart/_StockDiagram.java @@ -64,8 +64,7 @@ public class _StockDiagram extends MultiPropertyTest { oldDiagram = doc.getDiagram(); doc.setDiagram(stock); - oObj = (XPropertySet) - UnoRuntime.queryInterface(XPropertySet.class, doc.getDiagram()); + oObj = UnoRuntime.queryInterface(XPropertySet.class, doc.getDiagram()); } /** diff --git a/qadevOOo/tests/java/ifc/chart/_XChartDataArray.java b/qadevOOo/tests/java/ifc/chart/_XChartDataArray.java index d8fa658111bd..5233db64848d 100644 --- a/qadevOOo/tests/java/ifc/chart/_XChartDataArray.java +++ b/qadevOOo/tests/java/ifc/chart/_XChartDataArray.java @@ -56,7 +56,7 @@ public class _XChartDataArray extends MultiMethodTest { msExcludeMessage = (String)o; } if (!mbExcludeSetRowAndSetColumn) { - XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, oObj); + XPropertySet xProp = UnoRuntime.queryInterface(XPropertySet.class, oObj); if(xProp != null) { try { boolean columnAsLabel = ((Boolean)xProp.getPropertyValue("ChartColumnAsLabel")).booleanValue(); |