summaryrefslogtreecommitdiffstats
path: root/qadevOOo/tests/java/mod/_svx
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/mod/_svx')
-rw-r--r--qadevOOo/tests/java/mod/_svx/AccessibleOLEShape.java3
-rw-r--r--qadevOOo/tests/java/mod/_svx/AccessiblePageShape.java3
-rw-r--r--qadevOOo/tests/java/mod/_svx/AccessiblePresentationGraphicShape.java3
-rw-r--r--qadevOOo/tests/java/mod/_svx/AccessiblePresentationOLEShape.java3
-rw-r--r--qadevOOo/tests/java/mod/_svx/AccessiblePresentationShape.java3
-rw-r--r--qadevOOo/tests/java/mod/_svx/GraphicExporter.java4
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxDrawPage.java2
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java3
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxGraphicObject.java9
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxShape.java5
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxShapeCircle.java8
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxShapeConnector.java6
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxShapeControl.java6
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java6
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java6
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygon.java10
-rw-r--r--qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygonBezier.java8
17 files changed, 32 insertions, 56 deletions
diff --git a/qadevOOo/tests/java/mod/_svx/AccessibleOLEShape.java b/qadevOOo/tests/java/mod/_svx/AccessibleOLEShape.java
index 6ccca61e0087..429e061671ca 100644
--- a/qadevOOo/tests/java/mod/_svx/AccessibleOLEShape.java
+++ b/qadevOOo/tests/java/mod/_svx/AccessibleOLEShape.java
@@ -85,8 +85,7 @@ public class AccessibleOLEShape extends TestCase {
DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0)).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/_svx/AccessiblePageShape.java b/qadevOOo/tests/java/mod/_svx/AccessiblePageShape.java
index c84cebb013a9..d0f723e97248 100644
--- a/qadevOOo/tests/java/mod/_svx/AccessiblePageShape.java
+++ b/qadevOOo/tests/java/mod/_svx/AccessiblePageShape.java
@@ -99,8 +99,7 @@ public class AccessiblePageShape extends TestCase {
// UnoRuntime.queryInterface
// (XAccessibleValue.class, at.SearchedContext) ;
oPage = DrawTools.getDrawPage(xDrawDoc,0);
- final XPropertySet PageProps = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class, oPage);
+ final XPropertySet PageProps = UnoRuntime.queryInterface(XPropertySet.class, oPage);
tEnv.addObjRelation("EventProducer",
new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
diff --git a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationGraphicShape.java b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationGraphicShape.java
index 43c9df187313..61fbd7cf0e0d 100644
--- a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationGraphicShape.java
+++ b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationGraphicShape.java
@@ -91,8 +91,7 @@ public class AccessiblePresentationGraphicShape extends TestCase {
DrawTools.getShapes(DrawTools.getDrawPage(xDoc,0)).add(oShape);
- XPropertySet oShapeProps = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class,oShape);
+ XPropertySet oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oShape);
try {
oShapeProps.setPropertyValue(
"GraphicURL",util.utils.getFullTestURL("space-metal.jpg"));
diff --git a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationOLEShape.java b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationOLEShape.java
index 3e9773585f19..d4cbf2fcd8f2 100644
--- a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationOLEShape.java
+++ b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationOLEShape.java
@@ -91,8 +91,7 @@ public class AccessiblePresentationOLEShape extends TestCase {
//DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0)).add(oShape);
- XPropertySet oShapeProps = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class,oShape);
+ XPropertySet oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oShape);
try {
oShapeProps.setPropertyValue("IsEmptyPresentationObject", new Boolean(false));
} catch (com.sun.star.lang.WrappedTargetException e) {
diff --git a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationShape.java b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationShape.java
index 42beb8b234a7..13fb69e5c269 100644
--- a/qadevOOo/tests/java/mod/_svx/AccessiblePresentationShape.java
+++ b/qadevOOo/tests/java/mod/_svx/AccessiblePresentationShape.java
@@ -92,8 +92,7 @@ public class AccessiblePresentationShape extends TestCase {
DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0)).add(oShape);
- XPropertySet shapeProps = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class, oShape);
+ XPropertySet shapeProps = UnoRuntime.queryInterface(XPropertySet.class, oShape);
try {
shapeProps.setPropertyValue(
diff --git a/qadevOOo/tests/java/mod/_svx/GraphicExporter.java b/qadevOOo/tests/java/mod/_svx/GraphicExporter.java
index bbabd04c83e9..d4d430a8d637 100644
--- a/qadevOOo/tests/java/mod/_svx/GraphicExporter.java
+++ b/qadevOOo/tests/java/mod/_svx/GraphicExporter.java
@@ -141,7 +141,7 @@ public class GraphicExporter extends TestCase {
"GraphicObject");
DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc, 0)).add(oShape);
- XPropertySet oShapeProps = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet oShapeProps = UnoRuntime.queryInterface(
XPropertySet.class, oShape);
XComponent xComp = null;
@@ -153,7 +153,7 @@ public class GraphicExporter extends TestCase {
oShape);
XExporter xEx = UnoRuntime.queryInterface(
- XExporter.class, (XInterface) go);
+ XExporter.class, go);
xEx.setSourceDocument(xComp);
} catch (com.sun.star.lang.WrappedTargetException e) {
e.printStackTrace(log);
diff --git a/qadevOOo/tests/java/mod/_svx/SvxDrawPage.java b/qadevOOo/tests/java/mod/_svx/SvxDrawPage.java
index ba2b953cbe23..55b93eeb2d1e 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxDrawPage.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxDrawPage.java
@@ -155,7 +155,7 @@ public class SvxDrawPage extends TestCase {
XDrawPagesSupplier oDPS = UnoRuntime.queryInterface(
XDrawPagesSupplier.class, xDoc);
- oDP = (XDrawPages) oDPS.getDrawPages();
+ oDP = oDPS.getDrawPages();
oDP.insertNewByIndex(1);
oDP.insertNewByIndex(2);
oObj = (XDrawPage) AnyConverter.toObject(new Type(XDrawPage.class),
diff --git a/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java b/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java
index cc70da81de69..db6146c79d9c 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxGraphCtrlAccessibleContext.java
@@ -87,8 +87,7 @@ public class SvxGraphCtrlAccessibleContext extends TestCase{
DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0)).add(oShape);
- XPropertySet shapeProps = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class, oShape);
+ XPropertySet shapeProps = UnoRuntime.queryInterface(XPropertySet.class, oShape);
String url = util.utils.getFullTestURL("space-metal.jpg");
diff --git a/qadevOOo/tests/java/mod/_svx/SvxGraphicObject.java b/qadevOOo/tests/java/mod/_svx/SvxGraphicObject.java
index 716bbf97290c..f1641f9c1d81 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxGraphicObject.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxGraphicObject.java
@@ -168,8 +168,7 @@ public class SvxGraphicObject extends TestCase {
oShape = SOF.createShape(xDrawDoc,3000,4500,15000,1000,"Ellipse");
DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0)).add(oShape);
- XPropertySet oShapeProps = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class,oObj);
+ XPropertySet oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oObj);
XStyle aStyle = null;
try {
aStyle = (XStyle) AnyConverter.toObject(
@@ -180,8 +179,7 @@ public class SvxGraphicObject 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"));
@@ -193,8 +191,7 @@ public class SvxGraphicObject extends TestCase {
// adding graphic as ObjRelation for GraphicObjectShape
- oShapeProps = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class,oObj);
+ oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oObj);
XBitmap aBitmap = null;
try {
oShapeProps.setPropertyValue(
diff --git a/qadevOOo/tests/java/mod/_svx/SvxShape.java b/qadevOOo/tests/java/mod/_svx/SvxShape.java
index 7a4eb70802da..c6f364aea036 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxShape.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxShape.java
@@ -183,8 +183,7 @@ public class SvxShape extends TestCase {
DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0)).add(oShape);
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(
@@ -195,7 +194,7 @@ public class SvxShape extends TestCase {
}
tEnv.addObjRelation("Style1",aStyle);
- oShapeProps = (XPropertySet) UnoRuntime.queryInterface
+ oShapeProps = UnoRuntime.queryInterface
(XPropertySet.class,oShape);
try {
aStyle = (XStyle) AnyConverter.toObject(
diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeCircle.java b/qadevOOo/tests/java/mod/_svx/SvxShapeCircle.java
index b0a6db52e0d6..15a00912a0fc 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxShapeCircle.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxShapeCircle.java
@@ -170,7 +170,7 @@ public class SvxShapeCircle extends TestCase {
SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory)tParam.getMSF()) ;
oShape = SOF.createShape(xDrawDoc,5000,5000,3000,3000,"Ellipse");
- XPropertySet props = (XPropertySet) UnoRuntime.queryInterface
+ XPropertySet props = UnoRuntime.queryInterface
(XPropertySet.class, oShape) ;
DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0)).add(oShape) ;
@@ -202,8 +202,7 @@ public class SvxShapeCircle extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
log.println( "adding two styles as ObjRelation for ShapeDescriptor" );
- XPropertySet oShapeProps = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class,oObj);
+ XPropertySet oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,oObj);
XStyle aStyle = null;
try {
@@ -215,8 +214,7 @@ public class SvxShapeCircle 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"));
diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeConnector.java b/qadevOOo/tests/java/mod/_svx/SvxShapeConnector.java
index 4ce666cf608e..f1c080d9eda2 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxShapeConnector.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxShapeConnector.java
@@ -156,8 +156,7 @@ public class SvxShapeConnector extends TestCase {
}
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(
@@ -165,8 +164,7 @@ public class SvxShapeConnector extends TestCase {
} catch (Exception e) {}
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"));
diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeControl.java b/qadevOOo/tests/java/mod/_svx/SvxShapeControl.java
index bdff0c54982d..d7965e20ae43 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxShapeControl.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxShapeControl.java
@@ -123,16 +123,14 @@ public class SvxShapeControl extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
log.println( "adding two styles 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(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {}
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"));
diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java b/qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java
index 0e6ad96e57ac..57a56803f18b 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java
@@ -132,16 +132,14 @@ public class SvxShapeDimensioning extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
log.println( "adding two styles 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(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {}
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"));
diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java b/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java
index d0902ae695ad..5abdc141e705 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxShapeGroup.java
@@ -134,15 +134,13 @@ public class SvxShapeGroup extends TestCase {
oShapes.add(Shape2);
log.println( "adding two style as ObjRelation for ShapeDescriptor" );
- XPropertySet oShapeProps = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class,Shape1);
+ XPropertySet oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,Shape1);
XStyle aStyle1 = null;
try {
aStyle1 = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {}
- oShapeProps = (XPropertySet)
- UnoRuntime.queryInterface(XPropertySet.class,Shape2);
+ oShapeProps = UnoRuntime.queryInterface(XPropertySet.class,Shape2);
XStyle aStyle2 = null;
try {
aStyle2 = (XStyle) AnyConverter.toObject(
diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygon.java b/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygon.java
index 7dd897328c8b..915976c6d995 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygon.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygon.java
@@ -207,8 +207,8 @@ public class SvxShapePolyPolygon extends TestCase {
Point[][] polygon = new Point[][] {square1, square2};
- ((XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,
- oShape)).setPropertyValue("PolyPolygon", polygon) ;
+ UnoRuntime.queryInterface(XPropertySet.class,
+ oShape).setPropertyValue("PolyPolygon", polygon) ;
oObj = oShape ;
@@ -226,16 +226,14 @@ public class SvxShapePolyPolygon extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
log.println( "adding two styles 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(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {}
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"));
diff --git a/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygonBezier.java b/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygonBezier.java
index abc012ae6477..3247af2e2fe4 100644
--- a/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygonBezier.java
+++ b/qadevOOo/tests/java/mod/_svx/SvxShapePolyPolygonBezier.java
@@ -220,7 +220,7 @@ public class SvxShapePolyPolygonBezier extends TestCase {
oObj = oShape ;
- XPropertySet shapeProps = (XPropertySet) UnoRuntime.queryInterface
+ XPropertySet shapeProps = UnoRuntime.queryInterface
(XPropertySet.class, oObj);
shapeProps.setPropertyValue("PolyPolygonBezier",coords);
@@ -239,16 +239,14 @@ public class SvxShapePolyPolygonBezier extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
log.println( "adding two styles 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(
new Type(XStyle.class),oShapeProps.getPropertyValue("Style"));
} catch (Exception e) {}
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"));