summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/ifc/container/_XNameReplace.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/ifc/container/_XNameReplace.java')
-rw-r--r--qadevOOo/tests/java/ifc/container/_XNameReplace.java48
1 files changed, 24 insertions, 24 deletions
diff --git a/qadevOOo/tests/java/ifc/container/_XNameReplace.java b/qadevOOo/tests/java/ifc/container/_XNameReplace.java
index a56edc5ce3db..91ad64e51051 100644
--- a/qadevOOo/tests/java/ifc/container/_XNameReplace.java
+++ b/qadevOOo/tests/java/ifc/container/_XNameReplace.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -136,24 +136,24 @@ public class _XNameReplace extends MultiMethodTest {
log.println("replace object '" + oNames[0] + "' with another instance");
oObj.replaceByName(oNames[0],oInstance);
Object newEl = oObj.getByName(oNames[0]) ;
-
+
if (tEnv.getTestCase().getObjectName().equals("ScCellRangesObj")) {
ok = compareRanges(old, newEl);
} else {
- ok = ! ValueComparer.equalValue(old, newEl);
+ ok = ! ValueComparer.equalValue(old, newEl);
}
result &= ok;
log.println("result of replace: " + ok);
log.println("replace back the old object");
- oObj.replaceByName(oNames[0],old);
+ oObj.replaceByName(oNames[0],old);
Object origEl = oObj.getByName(oNames[0]) ;
-
+
if (tEnv.getTestCase().getObjectName().equals("ScCellRangesObj")) {
ok = ! compareRanges(old, origEl);
} else {
ok = ValueComparer.equalValue(old, origEl);
}
-
+
result &= ok;
log.println("result of replace back: " + ok);
} catch (com.sun.star.lang.IllegalArgumentException e ) {
@@ -177,48 +177,48 @@ public class _XNameReplace extends MultiMethodTest {
public void after() {
disposeEnvironment() ;
}
-
+
// method returns false if the ranges are equal and true otherwise
-
+
private boolean compareRanges(Object old, Object newEl) {
- XCellRangeAddressable xCRA = (XCellRangeAddressable)
+ XCellRangeAddressable xCRA = (XCellRangeAddressable)
UnoRuntime.queryInterface(XCellRangeAddressable.class,old);
-
- XCellRangeAddressable xCRA2 = (XCellRangeAddressable)
+
+ XCellRangeAddressable xCRA2 = (XCellRangeAddressable)
UnoRuntime.queryInterface(XCellRangeAddressable.class,newEl);
-
+
int orgStartCol = xCRA.getRangeAddress().StartColumn;
- int orgEndCol = xCRA.getRangeAddress().EndColumn;
+ int orgEndCol = xCRA.getRangeAddress().EndColumn;
int orgStartRow = xCRA.getRangeAddress().StartRow;
- int orgEndRow = xCRA.getRangeAddress().EndRow;
-
+ int orgEndRow = xCRA.getRangeAddress().EndRow;
+
int newStartCol = xCRA2.getRangeAddress().StartColumn;
- int newEndCol = xCRA2.getRangeAddress().EndColumn;
+ int newEndCol = xCRA2.getRangeAddress().EndColumn;
int newStartRow = xCRA2.getRangeAddress().StartRow;
int newEndRow = xCRA2.getRangeAddress().EndRow;
-
+
boolean ret = true;
-
+
if (orgStartCol == newStartCol) {
log.println("\t StartColumn is the same");
ret = false;
}
-
+
if (orgEndCol == newEndCol) {
log.println("\t EndColumn is the same");
ret = false;
- }
+ }
if (orgStartRow == newStartRow) {
log.println("\t StartRow is the same");
ret = false;
}
-
+
if (orgEndRow == newEndRow) {
log.println("\t EndRow is the same");
ret = false;
- }
-
- return ret;
+ }
+
+ return ret;
}
}