diff options
Diffstat (limited to 'qadevOOo/tests/java/mod/_sd')
15 files changed, 21 insertions, 35 deletions
diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java b/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java index eee7fd14cc05..166d3b2ce141 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_DrawView.java @@ -222,7 +222,7 @@ public class DrawController_DrawView extends TestCase { tEnv.addObjRelation("Selections", new Object[] { oDrawPage, oShapeCol1, oShapeCol2}); - tEnv.addObjRelation("Comparer", new Comparator() { + tEnv.addObjRelation("Comparer", new Comparator<Object>() { public int compare(Object o1, Object o2) { XIndexAccess indAc1 = UnoRuntime.queryInterface(XIndexAccess.class, o1); XIndexAccess indAc2 = UnoRuntime.queryInterface(XIndexAccess.class, o2); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java index fbe9eea1f4f1..f7d28e007b4b 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java @@ -251,7 +251,7 @@ public class DrawController_HandoutView extends TestCase { tEnv.addObjRelation("Selections", new Object[] { oDrawPage, oShapeCol1, oShapeCol2}); - tEnv.addObjRelation("Comparer", new Comparator() { + tEnv.addObjRelation("Comparer", new Comparator<Object>() { public int compare(Object o1, Object o2) { XIndexAccess indAc1 = UnoRuntime.queryInterface(XIndexAccess.class, o1); XIndexAccess indAc2 = UnoRuntime.queryInterface(XIndexAccess.class, o2); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java index 70a1c5aa4df2..f82f7f32c54b 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java @@ -248,7 +248,7 @@ public class DrawController_NotesView extends TestCase { tEnv.addObjRelation("Selections", new Object[] { oDrawPage, oShapeCol1, oShapeCol2}); - tEnv.addObjRelation("Comparer", new Comparator() { + tEnv.addObjRelation("Comparer", new Comparator<Object>() { public int compare(Object o1, Object o2) { XIndexAccess indAc1 = UnoRuntime.queryInterface(XIndexAccess.class, o1); XIndexAccess indAc2 = UnoRuntime.queryInterface(XIndexAccess.class, o2); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java index 7595155fafa4..8bdf5b0b12dd 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java @@ -248,7 +248,7 @@ public class DrawController_OutlineView extends TestCase { tEnv.addObjRelation("Selections", new Object[] { oDrawPage, oShapeCol1, oShapeCol2}); - tEnv.addObjRelation("Comparer", new Comparator() { + tEnv.addObjRelation("Comparer", new Comparator<Object>() { public int compare(Object o1, Object o2) { XIndexAccess indAc1 = UnoRuntime.queryInterface(XIndexAccess.class, o1); XIndexAccess indAc2 = UnoRuntime.queryInterface(XIndexAccess.class, o2); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java index c2c2f5f2c5c2..2a6590f1530b 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java @@ -248,7 +248,7 @@ public class DrawController_PresentationView extends TestCase { tEnv.addObjRelation("Selections", new Object[] { oDrawPage, oShapeCol1, oShapeCol2}); - tEnv.addObjRelation("Comparer", new Comparator() { + tEnv.addObjRelation("Comparer", new Comparator<Object>() { public int compare(Object o1, Object o2) { XIndexAccess indAc1 = UnoRuntime.queryInterface(XIndexAccess.class, o1); XIndexAccess indAc2 = UnoRuntime.queryInterface(XIndexAccess.class, o2); diff --git a/qadevOOo/tests/java/mod/_sd/SdDrawPage.java b/qadevOOo/tests/java/mod/_sd/SdDrawPage.java index 780c56ce4a17..8b362da646a8 100644 --- a/qadevOOo/tests/java/mod/_sd/SdDrawPage.java +++ b/qadevOOo/tests/java/mod/_sd/SdDrawPage.java @@ -189,7 +189,7 @@ public class SdDrawPage extends TestCase { XControlShape aShape = FormTools.createControlShape( xDrawDoc,3000,4500,15000,10000,"CommandButton"); - oShapes.add((XShape) aShape); + oShapes.add(aShape); ShapeDsc sDsc = new ShapeDsc(5000, 3500, 7500, 10000, "Rectangle"); log.println( "adding Shape as mod relation to environment" ); diff --git a/qadevOOo/tests/java/mod/_sd/SdDrawPagesAccess.java b/qadevOOo/tests/java/mod/_sd/SdDrawPagesAccess.java index b148ccbb5d5d..32ea7f77c91b 100644 --- a/qadevOOo/tests/java/mod/_sd/SdDrawPagesAccess.java +++ b/qadevOOo/tests/java/mod/_sd/SdDrawPagesAccess.java @@ -103,7 +103,7 @@ public class SdDrawPagesAccess extends TestCase { // get the drawpage of drawing here log.println( "getting Drawpages" ); XDrawPagesSupplier oDPS = UnoRuntime.queryInterface(XDrawPagesSupplier.class, xDrawDoc); - XDrawPages oDP = (XDrawPages) oDPS.getDrawPages(); + XDrawPages oDP = oDPS.getDrawPages(); oDP.insertNewByIndex(1); oDP.insertNewByIndex(2); XInterface oObj = oDP; diff --git a/qadevOOo/tests/java/mod/_sd/SdPageLinkTargets.java b/qadevOOo/tests/java/mod/_sd/SdPageLinkTargets.java index 7020cff676d9..852dba72537f 100644 --- a/qadevOOo/tests/java/mod/_sd/SdPageLinkTargets.java +++ b/qadevOOo/tests/java/mod/_sd/SdPageLinkTargets.java @@ -110,8 +110,7 @@ public class SdPageLinkTargets extends TestCase { SOF.createShape(xDrawDoc, 15000, 13500, 5000, 5000, "OLE2"); oShapes.add(oShape); - XPropertySet shape_props = (XPropertySet) - UnoRuntime.queryInterface(XPropertySet.class,oShape); + XPropertySet shape_props = UnoRuntime.queryInterface(XPropertySet.class,oShape); log.println("Inserting a Chart"); diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java b/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java index 881a2c17526d..aaa0040c0bcf 100644 --- a/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java +++ b/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java @@ -248,7 +248,7 @@ public class SdUnoDrawView extends TestCase { tEnv.addObjRelation("XComponent.DisposeThis", xDrawDoc); - tEnv.addObjRelation("Comparer", new Comparator() { + tEnv.addObjRelation("Comparer", new Comparator<Object>() { public int compare(Object o1, Object o2) { XIndexAccess indAc1 = UnoRuntime.queryInterface(XIndexAccess.class, o1); XIndexAccess indAc2 = UnoRuntime.queryInterface(XIndexAccess.class, o2); @@ -257,10 +257,7 @@ public class SdUnoDrawView extends TestCase { return 0; } return 1; - } - public boolean equals(Object obj) { - return compare(this, obj) == 0; - } }); + }}); return tEnv; diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java b/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java index 80e1afefd65f..db51a16fd3fa 100644 --- a/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java +++ b/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java @@ -216,7 +216,7 @@ public class SdUnoPresView extends TestCase { tEnv.addObjRelation("Selections", new Object[] { oDrawPage, secondDrawPage}); - tEnv.addObjRelation("Comparer", new Comparator() { + tEnv.addObjRelation("Comparer", new Comparator<Object>() { public int compare(Object o1, Object o2) { XIndexAccess indAc1 = UnoRuntime.queryInterface(XIndexAccess.class, o1); XIndexAccess indAc2 = UnoRuntime.queryInterface(XIndexAccess.class, o2); @@ -225,10 +225,7 @@ public class SdUnoPresView extends TestCase { return 0; } return 1; - } - public boolean equals(Object obj) { - return compare(this, obj) == 0; - } }); + }}); tEnv.addObjRelation("FirstPage", oDrawPage); tEnv.addObjRelation("SecondPage", secondDrawPage); diff --git a/qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java b/qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java index 2beb29244e9d..679fd3d6f94b 100644 --- a/qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java +++ b/qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java @@ -126,8 +126,7 @@ public class SdXCustomPresentation extends TestCase { XCustomPresentationSupplier.class, xImpressDoc); XInterface oObj = oPS.getCustomPresentations(); - XSingleServiceFactory oSingleMSF = (XSingleServiceFactory) - UnoRuntime.queryInterface(XSingleServiceFactory.class, oObj); + XSingleServiceFactory oSingleMSF = UnoRuntime.queryInterface(XSingleServiceFactory.class, oObj); XInterface oInstance = null; try { @@ -137,8 +136,7 @@ public class SdXCustomPresentation extends TestCase { throw new StatusException("Couldn't create instance", e); } - XNameContainer aContainer = (XNameContainer) - UnoRuntime.queryInterface(XNameContainer.class, oObj); + XNameContainer aContainer = UnoRuntime.queryInterface(XNameContainer.class, oObj); try { aContainer.insertByName("FirstPresentation", oInstance); diff --git a/qadevOOo/tests/java/mod/_sd/SdXCustomPresentationAccess.java b/qadevOOo/tests/java/mod/_sd/SdXCustomPresentationAccess.java index b0e10ade3ad5..e3a209ed1b07 100644 --- a/qadevOOo/tests/java/mod/_sd/SdXCustomPresentationAccess.java +++ b/qadevOOo/tests/java/mod/_sd/SdXCustomPresentationAccess.java @@ -125,8 +125,7 @@ public class SdXCustomPresentationAccess extends TestCase { XInterface oObj = oPS.getCustomPresentations(); - XSingleServiceFactory oSingleMSF = (XSingleServiceFactory) - UnoRuntime.queryInterface(XSingleServiceFactory.class, oObj); + XSingleServiceFactory oSingleMSF = UnoRuntime.queryInterface(XSingleServiceFactory.class, oObj); XInterface oInstance = null; XInterface oSecondInstance = null; @@ -138,8 +137,7 @@ public class SdXCustomPresentationAccess extends TestCase { throw new StatusException("Couldn't create instance", e); } - XNameContainer aContainer = (XNameContainer) - UnoRuntime.queryInterface(XNameContainer.class, oObj); + XNameContainer aContainer = UnoRuntime.queryInterface(XNameContainer.class, oObj); if (aContainer.hasByName("FirstPresentation")) { try { diff --git a/qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java b/qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java index 1fe938760f40..368bbafe93fc 100644 --- a/qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java +++ b/qadevOOo/tests/java/mod/_sd/SdXImpressDocument.java @@ -143,7 +143,7 @@ public class SdXImpressDocument extends TestCase { "Rectangle"); - XPropertySet xShapeProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, aShape); + XPropertySet xShapeProps = UnoRuntime.queryInterface(XPropertySet.class, aShape); try { xShapeProps.setPropertyValue("FillStyle", com.sun.star.drawing.FillStyle.SOLID); diff --git a/qadevOOo/tests/java/mod/_sd/SdXPresentation.java b/qadevOOo/tests/java/mod/_sd/SdXPresentation.java index a8f754690a59..a9eadb8260b4 100644 --- a/qadevOOo/tests/java/mod/_sd/SdXPresentation.java +++ b/qadevOOo/tests/java/mod/_sd/SdXPresentation.java @@ -116,8 +116,7 @@ public class SdXPresentation extends TestCase { XInterface oInstance = null; XInterface oInstance2 = null; - XSingleServiceFactory oSingleMSF = (XSingleServiceFactory) - UnoRuntime.queryInterface(XSingleServiceFactory.class, xCP); + XSingleServiceFactory oSingleMSF = UnoRuntime.queryInterface(XSingleServiceFactory.class, xCP); try{ oInstance = (XInterface) oSingleMSF.createInstance(); diff --git a/qadevOOo/tests/java/mod/_sd/SdXShape.java b/qadevOOo/tests/java/mod/_sd/SdXShape.java index 41c3b55b9ef7..7ca5704ce3a3 100644 --- a/qadevOOo/tests/java/mod/_sd/SdXShape.java +++ b/qadevOOo/tests/java/mod/_sd/SdXShape.java @@ -156,14 +156,13 @@ public class SdXShape extends TestCase { XShape oShape = SOF.createShape (xDrawDoc, 3000, 4500, 15000, 1000, "Ellipse"); oShapes.add((XShape) oObj); - oShapes.add((XShape) oShape); + oShapes.add(oShape); log.println( "creating a new environment for XShape object" ); TestEnvironment tEnv = new TestEnvironment( oObj ); log.println( "adding two style as ObjRelation for ShapeDescriptor" ); - XPropertySet oShapeProps = (XPropertySet) - UnoRuntime.queryInterface(XPropertySet.class, oObj); + XPropertySet oShapeProps = UnoRuntime.queryInterface(XPropertySet.class, oObj); XStyle aStyle = null; try { aStyle = (XStyle) AnyConverter.toObject( @@ -184,8 +183,7 @@ public class SdXShape extends TestCase { } tEnv.addObjRelation("Style1", aStyle); - oShapeProps = (XPropertySet) - UnoRuntime.queryInterface(XPropertySet.class, oShape); + oShapeProps = UnoRuntime.queryInterface(XPropertySet.class, oShape); try { aStyle = (XStyle) AnyConverter.toObject( new Type(XStyle.class),oShapeProps.getPropertyValue("Style")); |