summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_sw/SwXTextView.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/mod/_sw/SwXTextView.java')
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextView.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextView.java b/qadevOOo/tests/java/mod/_sw/SwXTextView.java
index b27c77da8510..b01971dab125 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextView.java
@@ -175,12 +175,10 @@ public class SwXTextView extends TestCase {
tEnv.addObjRelation("Selections", new Object[] {
oFrame1, oFrame2, textRanges1, textRanges2});
- tEnv.addObjRelation("Comparer", new Comparator() {
+ tEnv.addObjRelation("Comparer", new Comparator<Object>() {
public int compare(Object o1, Object o2) {
- XServiceInfo serv1 = (XServiceInfo)
- UnoRuntime.queryInterface(XServiceInfo.class, o1);
- XServiceInfo serv2 = (XServiceInfo)
- UnoRuntime.queryInterface(XServiceInfo.class, o2);
+ XServiceInfo serv1 = UnoRuntime.queryInterface(XServiceInfo.class, o1);
+ XServiceInfo serv2 = UnoRuntime.queryInterface(XServiceInfo.class, o2);
String implName1 = serv1.getImplementationName();
String implName2 = serv2.getImplementationName();
@@ -206,9 +204,7 @@ public class SwXTextView extends TestCase {
return -1;
}
- public boolean equals(Object obj) {
- return compare(this, obj) == 0;
- } });
+ });
XSelectionSupplier xsel = UnoRuntime.queryInterface(XSelectionSupplier.class,xContr);
try {
@@ -237,7 +233,7 @@ public class SwXTextView extends TestCase {
log.println("adding relation for com.sun.star.view.XFormLayerAccess: XForm");
- WriterTools.getDrawPage(xTextDoc).add((XShape) aShape);
+ WriterTools.getDrawPage(xTextDoc).add(aShape);
try {