summaryrefslogtreecommitdiff
path: root/sc/qa/complex/sc/CalcRTL.java
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/complex/sc/CalcRTL.java')
-rw-r--r--sc/qa/complex/sc/CalcRTL.java98
1 files changed, 49 insertions, 49 deletions
diff --git a/sc/qa/complex/sc/CalcRTL.java b/sc/qa/complex/sc/CalcRTL.java
index 9528c34b9267..fb39b7ca069c 100644
--- a/sc/qa/complex/sc/CalcRTL.java
+++ b/sc/qa/complex/sc/CalcRTL.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
@@ -76,7 +76,7 @@ public class CalcRTL extends ComplexTestCase {
*/
public String[] getTestMethodNames() {
return new String[] {
- "checkSpreadsheetProperties", "checkShapeProperties",
+ "checkSpreadsheetProperties", "checkShapeProperties",
"checkInfluenceOfSpreadsheetChange"
};
}
@@ -97,19 +97,19 @@ public class CalcRTL extends ComplexTestCase {
XPropertySet set = (XPropertySet) UnoRuntime.queryInterface(
XPropertySet.class, getSpreadsheet());
- assure("Problems when setting property 'IsVisible'",
+ assure("Problems when setting property 'IsVisible'",
changeProperty(set, "IsVisible", Boolean.FALSE));
- assure("Problems when setting property 'IsVisible'",
+ assure("Problems when setting property 'IsVisible'",
changeProperty(set, "IsVisible", Boolean.TRUE));
- assure("Problems when setting property 'PageStyle'",
+ assure("Problems when setting property 'PageStyle'",
changeProperty(set, "PageStyle", "Report"));
- assure("Problems when setting property 'PageStyle'",
+ assure("Problems when setting property 'PageStyle'",
changeProperty(set, "PageStyle", "Default"));
- assure("Problems when setting property 'TableLayout'",
- changeProperty(set, "TableLayout",
+ assure("Problems when setting property 'TableLayout'",
+ changeProperty(set, "TableLayout",
new Short(com.sun.star.text.WritingMode2.RL_TB)));
- assure("Problems when setting property 'TableLayout'",
- changeProperty(set, "TableLayout",
+ assure("Problems when setting property 'TableLayout'",
+ changeProperty(set, "TableLayout",
new Short(com.sun.star.text.WritingMode2.LR_TB)));
assure("Couldn't close document", closeSpreadsheetDocument());
}
@@ -132,17 +132,17 @@ public class CalcRTL extends ComplexTestCase {
XPropertySet.class, getInsertedShape());
try {
- assure("Problems when setting property 'Anchor'",
- changeProperty(set, "Anchor",
+ assure("Problems when setting property 'Anchor'",
+ changeProperty(set, "Anchor",
getSpreadsheet().getCellByPosition(5, 5)));
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
assure("Problems when setting property 'Anchor'", false);
}
- assure("Problems when setting property 'HoriOrientPosition'",
+ assure("Problems when setting property 'HoriOrientPosition'",
changeProperty(set, "HoriOrientPosition", new Integer(1000)));
- assure("Problems when setting property 'VertOrientPosition'",
+ assure("Problems when setting property 'VertOrientPosition'",
changeProperty(set, "VertOrientPosition", new Integer(1000)));
assure("Couldn't close document", closeSpreadsheetDocument());
@@ -158,31 +158,31 @@ public class CalcRTL extends ComplexTestCase {
XPropertySet.class, oShape);
String[] previous = getShapeProps(shapeProps, oShape);
- assure("Problems when setting property 'TableLayout'",
- changeProperty(sheetProps, "TableLayout",
+ assure("Problems when setting property 'TableLayout'",
+ changeProperty(sheetProps, "TableLayout",
new Short(com.sun.star.text.WritingMode2.RL_TB)));
String[] RL_TB = getShapeProps(shapeProps, oShape);
- assure("Problems when setting property 'TableLayout'",
- changeProperty(sheetProps, "TableLayout",
+ assure("Problems when setting property 'TableLayout'",
+ changeProperty(sheetProps, "TableLayout",
new Short(com.sun.star.text.WritingMode2.LR_TB)));
String[] LR_TB = getShapeProps(shapeProps, oShape);
- assure("Anchor has changed",
+ assure("Anchor has changed",
(previous[0].equals(RL_TB[0]) && previous[0].equals(LR_TB[0])));
- assure("HoriOrientPosition has changed",
+ assure("HoriOrientPosition has changed",
(Integer.valueOf(previous[1]).intValue() + Integer.valueOf(
RL_TB[1])
- .intValue() +
+ .intValue() +
Integer.valueOf(LR_TB[1]).intValue() == 2099));
- assure("VertOrientPosition has changed",
+ assure("VertOrientPosition has changed",
(Integer.valueOf(previous[2]).intValue() + Integer.valueOf(
RL_TB[2])
- .intValue() +
+ .intValue() +
Integer.valueOf(LR_TB[2]).intValue() == 3*Integer.valueOf(previous[2]).intValue()));
- assure("x-position hasn't changed",
- (previous[3].equals(LR_TB[3]) &&
- ((Integer.valueOf(previous[3]).intValue() * (-1)) -
+ assure("x-position hasn't changed",
+ (previous[3].equals(LR_TB[3]) &&
+ ((Integer.valueOf(previous[3]).intValue() * (-1)) -
oShape.getSize().Width != Integer.valueOf(LR_TB[2])
.intValue())));
assure("Couldn't close document", closeSpreadsheetDocument());
@@ -203,7 +203,7 @@ public class CalcRTL extends ComplexTestCase {
log.println("\t Anchor :" + reValue[0]);
log.println("\t HoriOrientPosition :" + reValue[1]);
log.println("\t VertOrientPosition :" + reValue[2]);
- log.println("\t Shape Position (x,y) : (" + oShape.getPosition().X +
+ log.println("\t Shape Position (x,y) : (" + oShape.getPosition().X +
"," + oShape.getPosition().Y + ")");
return reValue;
@@ -292,7 +292,7 @@ public class CalcRTL extends ComplexTestCase {
* @param pName : The name of the Property that has to be changed
* @param pValue : The value, the property should be changed too.
*/
- protected boolean changeProperty(XPropertySet set, String pName,
+ protected boolean changeProperty(XPropertySet set, String pName,
Object pValue) {
boolean worked = true;
@@ -322,10 +322,10 @@ public class CalcRTL extends ComplexTestCase {
// checking results
- worked = checkResult(set, pName, oldValue, pValue, resValue,
+ worked = checkResult(set, pName, oldValue, pValue, resValue,
exception);
} catch (Exception e) {
- System.out.println("Exception occured while testing property '" +
+ System.out.println("Exception occured while testing property '" +
pName + "'");
e.printStackTrace();
worked = false;
@@ -344,8 +344,8 @@ public class CalcRTL extends ComplexTestCase {
* @param resValue : the value getPropertyValue returned for the property
* @param exception : the exeption thrown during the change of the property
*/
- protected boolean checkResult(XPropertySet set, String propName,
- Object oldValue, Object newValue,
+ protected boolean checkResult(XPropertySet set, String propName,
+ Object oldValue, Object newValue,
Object resValue, Exception exception)
throws Exception {
XPropertySetInfo info = set.getPropertySetInfo();
@@ -373,7 +373,7 @@ public class CalcRTL extends ComplexTestCase {
return false;
} else if (oldValue == null) {
- log.println(propName +
+ log.println(propName +
" has null value, and therefore can't be changed");
return true;
@@ -411,14 +411,14 @@ public class CalcRTL extends ComplexTestCase {
// if no exception - check that value
// has not changed
if (!ValueComparer.equalValue(resValue, oldValue)) {
- log.println("Read only property '" + propName +
+ log.println("Read only property '" + propName +
"' has changed");
try {
- if (!util.utils.isVoid(oldValue) &&
+ if (!util.utils.isVoid(oldValue) &&
oldValue instanceof Any) {
oldValue = AnyConverter.toObject(
- new Type(((Any) oldValue).getClass()),
+ new Type(((Any) oldValue).getClass()),
oldValue);
}
@@ -430,7 +430,7 @@ public class CalcRTL extends ComplexTestCase {
return false;
} else {
- log.println("Read only property '" + propName +
+ log.println("Read only property '" + propName +
"' hasn't changed");
log.println("Property '" + propName + "' OK");
@@ -441,16 +441,16 @@ public class CalcRTL extends ComplexTestCase {
if (exception == null) {
// if no exception thrown
// check that the new value is set
- if ((!ValueComparer.equalValue(resValue, newValue)) ||
+ if ((!ValueComparer.equalValue(resValue, newValue)) ||
(ValueComparer.equalValue(resValue, oldValue))) {
- log.println("Value for '" + propName +
+ log.println("Value for '" + propName +
"' hasn't changed as expected");
try {
- if (!util.utils.isVoid(oldValue) &&
+ if (!util.utils.isVoid(oldValue) &&
oldValue instanceof Any) {
oldValue = AnyConverter.toObject(
- new Type(((Any) oldValue).getClass()),
+ new Type(((Any) oldValue).getClass()),
oldValue);
}
@@ -461,7 +461,7 @@ public class CalcRTL extends ComplexTestCase {
}
if (resValue != null) {
- if ((!ValueComparer.equalValue(resValue, oldValue)) ||
+ if ((!ValueComparer.equalValue(resValue, oldValue)) ||
(!resValue.equals(oldValue))) {
log.println("But it has changed.");
@@ -478,10 +478,10 @@ public class CalcRTL extends ComplexTestCase {
log.println("Property '" + propName + "' OK");
try {
- if (!util.utils.isVoid(oldValue) &&
+ if (!util.utils.isVoid(oldValue) &&
oldValue instanceof Any) {
oldValue = AnyConverter.toObject(
- new Type(((Any) oldValue).getClass()),
+ new Type(((Any) oldValue).getClass()),
oldValue);
}
@@ -515,9 +515,9 @@ public class CalcRTL extends ComplexTestCase {
if (UnoRuntime.queryInterface(XCellRangeAddressable.class, obj) != null) {
XCellRangeAddressable aCell = (XCellRangeAddressable) UnoRuntime.queryInterface(
- XCellRangeAddressable.class,
+ XCellRangeAddressable.class,
obj);
- value = "Cell in Column " + aCell.getRangeAddress().StartColumn +
+ value = "Cell in Column " + aCell.getRangeAddress().StartColumn +
" and Row " + aCell.getRangeAddress().StartRow;
} else {
return obj;
@@ -536,18 +536,18 @@ public class CalcRTL extends ComplexTestCase {
log.println("getting Drawpages");
XDrawPagesSupplier oDPS = (XDrawPagesSupplier) UnoRuntime.queryInterface(
- XDrawPagesSupplier.class,
+ XDrawPagesSupplier.class,
xSheetDoc);
XDrawPages oDP = (XDrawPages) oDPS.getDrawPages();
XDrawPage firstDrawPage = (XDrawPage) UnoRuntime.queryInterface(
- XDrawPage.class,
+ XDrawPage.class,
oDP.getByIndex(0));
SOfficeFactory SOF = SOfficeFactory.getFactory(
(XMultiServiceFactory) param.getMSF());
XComponent xComp = (XComponent) UnoRuntime.queryInterface(
XComponent.class, xSheetDoc);
- insertedShape = SOF.createShape(xComp, 5000, 3500, 700, 500,
+ insertedShape = SOF.createShape(xComp, 5000, 3500, 700, 500,
"Rectangle");
DrawTools.getShapes(firstDrawPage).add(insertedShape);
} catch (com.sun.star.lang.WrappedTargetException e) {