summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/ifc/sheet
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-27 15:40:17 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-29 22:03:01 +0200
commitb65017a2a7af290f6681da7b197a52efe83d5185 (patch)
tree06f71a435ba200d044109469b13be7c8f5dbe950 /qadevOOo/tests/java/ifc/sheet
parent33ec740d1438c3dddf8e1974757ed05bb76425ca (diff)
Java5 update - usage generics where possible
Change-Id: I12f8c448961919e153047e28fee2a0acf3af1002
Diffstat (limited to 'qadevOOo/tests/java/ifc/sheet')
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_Shape.java2
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_SpreadsheetDocumentSettings.java4
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XActivationBroadcaster.java2
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange.java3
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement.java15
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XCellRangeReferrer.java3
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java2
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XDataPilotDescriptor.java5
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XDataPilotFieldGrouping.java2
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java30
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing.java22
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java4
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XGoalSeek.java5
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XMultipleOperation.java6
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XNamedRanges.java23
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java19
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced.java2
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XSheetAnnotation.java6
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationAnchor.java6
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java7
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor.java84
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XSheetFilterable.java2
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx.java2
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XSheetOutline.java2
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XSpreadsheet.java3
-rw-r--r--qadevOOo/tests/java/ifc/sheet/_XUsedAreaCursor.java6
26 files changed, 114 insertions, 153 deletions
diff --git a/qadevOOo/tests/java/ifc/sheet/_Shape.java b/qadevOOo/tests/java/ifc/sheet/_Shape.java
index 24068962215d..beed8da55061 100644
--- a/qadevOOo/tests/java/ifc/sheet/_Shape.java
+++ b/qadevOOo/tests/java/ifc/sheet/_Shape.java
@@ -27,7 +27,7 @@ import lib.MultiPropertyTest;
public class _Shape extends MultiPropertyTest {
public void _Anchor() {
- XSpreadsheetDocument xSheetDoc = (XSpreadsheetDocument) UnoRuntime.queryInterface(
+ XSpreadsheetDocument xSheetDoc = UnoRuntime.queryInterface(
XSpreadsheetDocument.class,
tEnv.getObjRelation(
"DOCUMENT"));
diff --git a/qadevOOo/tests/java/ifc/sheet/_SpreadsheetDocumentSettings.java b/qadevOOo/tests/java/ifc/sheet/_SpreadsheetDocumentSettings.java
index 984992e0c066..b2a73a0b4533 100644
--- a/qadevOOo/tests/java/ifc/sheet/_SpreadsheetDocumentSettings.java
+++ b/qadevOOo/tests/java/ifc/sheet/_SpreadsheetDocumentSettings.java
@@ -72,10 +72,10 @@ public class _SpreadsheetDocumentSettings extends MultiPropertyTest {
protected boolean compare(Object obj1, Object obj2) {
Locale loc = new Locale("ru", "RU", "");
- XForbiddenCharacters fc1 = (XForbiddenCharacters) UnoRuntime.queryInterface(
+ XForbiddenCharacters fc1 = UnoRuntime.queryInterface(
XForbiddenCharacters.class,
obj1);
- XForbiddenCharacters fc2 = (XForbiddenCharacters) UnoRuntime.queryInterface(
+ XForbiddenCharacters fc2 = UnoRuntime.queryInterface(
XForbiddenCharacters.class,
obj2);
boolean has1 = fc1.hasForbiddenCharacters(loc);
diff --git a/qadevOOo/tests/java/ifc/sheet/_XActivationBroadcaster.java b/qadevOOo/tests/java/ifc/sheet/_XActivationBroadcaster.java
index b6bc8ead2ad7..c1cf3f5f369c 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XActivationBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XActivationBroadcaster.java
@@ -73,7 +73,7 @@ public class _XActivationBroadcaster extends MultiMethodTest {
}
public void before() {
- xSpreadsheetView = (XSpreadsheetView) UnoRuntime.queryInterface(
+ xSpreadsheetView = UnoRuntime.queryInterface(
XSpreadsheetView.class,
tEnv.getTestObject());
diff --git a/qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange.java b/qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange.java
index 73757b926492..fde204d3ce6a 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange.java
@@ -80,8 +80,7 @@ public class _XArrayFormulaRange extends MultiMethodTest {
log.println("checking that formula was set correctly...");
XCellRangeAddressable crAddr =
- (XCellRangeAddressable)
- UnoRuntime.queryInterface(XCellRangeAddressable.class, oObj);
+ UnoRuntime.queryInterface(XCellRangeAddressable.class, oObj);
CellRangeAddress addr = crAddr.getRangeAddress() ;
XSpreadsheet oSheet = (XSpreadsheet)tEnv.getObjRelation("SHEET");
if (oSheet == null) throw new StatusException(Status.failed
diff --git a/qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement.java b/qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement.java
index f097cd6f61c8..837b2ecea427 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XCellRangeMovement.java
@@ -71,8 +71,7 @@ public class _XCellRangeMovement extends MultiMethodTest {
}
XCellRangeAddressable oAddr =
- (XCellRangeAddressable)
- UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj);
+ UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj);
short iSheet = oAddr.getRangeAddress().Sheet;
CellAddress sDest;
CellRangeAddress sSrc;
@@ -109,8 +108,7 @@ public class _XCellRangeMovement extends MultiMethodTest {
XSpreadsheet oSheet = (XSpreadsheet)
UnoRuntime.queryInterface(XSpreadsheet.class, oObj);
- XCellRangeAddressable oAddr = (XCellRangeAddressable)
- UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj);
+ XCellRangeAddressable oAddr = UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj);
short iSheet = oAddr.getRangeAddress().Sheet;
try {
oSheet.getCellByPosition(0,20).setValue(100);
@@ -129,8 +127,7 @@ public class _XCellRangeMovement extends MultiMethodTest {
else{
log.println("Cells were already inserted. "+
"Delete old cells now");
- XColumnRowRange oColumnRowRange = (XColumnRowRange)
- UnoRuntime.queryInterface(XColumnRowRange.class, oSheet);
+ XColumnRowRange oColumnRowRange = UnoRuntime.queryInterface(XColumnRowRange.class, oSheet);
XTableRows oRows = (XTableRows) oColumnRowRange.getRows();
oRows.removeByIndex(21,1);
@@ -163,8 +160,7 @@ public class _XCellRangeMovement extends MultiMethodTest {
XSpreadsheet oSheet = (XSpreadsheet)
UnoRuntime.queryInterface(XSpreadsheet.class, oObj);
- XCellRangeAddressable oAddr = (XCellRangeAddressable)
- UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj);
+ XCellRangeAddressable oAddr = UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj);
short iSheet = oAddr.getRangeAddress().Sheet;
//prepare source range
@@ -205,8 +201,7 @@ public class _XCellRangeMovement extends MultiMethodTest {
XSpreadsheet oSheet = (XSpreadsheet)
UnoRuntime.queryInterface(XSpreadsheet.class, oObj);
- XCellRangeAddressable oAddr = (XCellRangeAddressable)
- UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj);
+ XCellRangeAddressable oAddr = UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj);
short iSheet = oAddr.getRangeAddress().Sheet;
try {
//prepare source range
diff --git a/qadevOOo/tests/java/ifc/sheet/_XCellRangeReferrer.java b/qadevOOo/tests/java/ifc/sheet/_XCellRangeReferrer.java
index 677bb34614b6..de87ca91e436 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XCellRangeReferrer.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XCellRangeReferrer.java
@@ -68,8 +68,7 @@ public class _XCellRangeReferrer extends MultiMethodTest {
return;
}
- XCellRangeAddressable xCRA = (XCellRangeAddressable)
- UnoRuntime.queryInterface(XCellRangeAddressable.class, cr);
+ XCellRangeAddressable xCRA = UnoRuntime.queryInterface(XCellRangeAddressable.class, cr);
CellRangeAddress objCRA = xCRA.getRangeAddress();
diff --git a/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java b/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java
index 78fe8c1434e4..0a9636a680c3 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XCellRangesQuery.java
@@ -84,7 +84,7 @@ public class _XCellRangesQuery extends MultiMethodTest {
mExpectedResults = (String[])tEnv.getObjRelation(
"XCellRangesQuery.EXPECTEDRESULTS");
- XColumnRowRange oColumnRowRange = (XColumnRowRange) UnoRuntime.queryInterface(
+ XColumnRowRange oColumnRowRange = UnoRuntime.queryInterface(
XColumnRowRange.class,
oSheet);
oRows = (XTableRows)oColumnRowRange.getRows();
diff --git a/qadevOOo/tests/java/ifc/sheet/_XDataPilotDescriptor.java b/qadevOOo/tests/java/ifc/sheet/_XDataPilotDescriptor.java
index ed071186d14d..92c50495e3d9 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XDataPilotDescriptor.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XDataPilotDescriptor.java
@@ -195,8 +195,7 @@ public class _XDataPilotDescriptor extends MultiMethodTest {
return;
}
- XNamed named = (XNamed)
- UnoRuntime.queryInterface(XNamed.class, field);
+ XNamed named = UnoRuntime.queryInterface(XNamed.class, field);
String name = named.getName();
log.print("Field : '" + name + "' ... ") ;
@@ -390,7 +389,7 @@ public class _XDataPilotDescriptor extends MultiMethodTest {
log.print("Fields returned ") ;
for (int i = 0; i < IA.getCount(); i++) {
Object field = IA.getByIndex(i);
- XNamed named = (XNamed)UnoRuntime.queryInterface
+ XNamed named = UnoRuntime.queryInterface
(XNamed.class, field);
name = named.getName();
log.print(" " + name) ;
diff --git a/qadevOOo/tests/java/ifc/sheet/_XDataPilotFieldGrouping.java b/qadevOOo/tests/java/ifc/sheet/_XDataPilotFieldGrouping.java
index 3ed6cfcc0931..c08960529c73 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XDataPilotFieldGrouping.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XDataPilotFieldGrouping.java
@@ -37,7 +37,7 @@ public class _XDataPilotFieldGrouping extends MultiMethodTest
public void _createNameGroup() {
boolean result = true;
try {
- XDataPilotField xDataPilotField = (XDataPilotField) UnoRuntime.queryInterface(XDataPilotField.class, oObj);
+ XDataPilotField xDataPilotField = UnoRuntime.queryInterface(XDataPilotField.class, oObj);
XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xDataPilotField.getItems ());
String[] elements = xNameAccess.getElementNames ();
oObj.createNameGroup(elements);
diff --git a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java b/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java
index acad4ca89fef..18d33a96334b 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XDataPilotTable2.java
@@ -59,8 +59,8 @@ public class _XDataPilotTable2 extends MultiMethodTest
private CellRangeAddress mRangeWhole = null;
private CellRangeAddress mRangeTable = null;
private CellRangeAddress mRangeResult = null;
- private ArrayList mDataFieldDims = null;
- private ArrayList mResultCells = null;
+ private ArrayList<Integer> mDataFieldDims = null;
+ private ArrayList<CellAddress> mResultCells = null;
/**
* exception to be thrown when obtaining a result data for a cell fails
@@ -71,7 +71,7 @@ public class _XDataPilotTable2 extends MultiMethodTest
protected void before()
{
Object o = tEnv.getObjRelation("DATAPILOTTABLE2");
- xDPTab2 = (XDataPilotTable2)UnoRuntime.queryInterface(
+ xDPTab2 = UnoRuntime.queryInterface(
XDataPilotTable2.class, o);
if (xDPTab2 == null)
@@ -98,10 +98,10 @@ public class _XDataPilotTable2 extends MultiMethodTest
int cellCount = mResultCells.size();
for (int i = 0; i < cellCount; ++i)
{
- CellAddress addr = (CellAddress)mResultCells.get(i);
+ CellAddress addr = mResultCells.get(i);
DataPilotTablePositionData posData = xDPTab2.getPositionData(addr);
DataPilotTableResultData resData = (DataPilotTableResultData)posData.PositionData;
- int dim = ((Integer)mDataFieldDims.get(resData.DataFieldIndex)).intValue();
+ int dim = mDataFieldDims.get(resData.DataFieldIndex).intValue();
DataResult res = resData.Result;
double val = res.Value;
@@ -188,12 +188,12 @@ public class _XDataPilotTable2 extends MultiMethodTest
boolean testResult = true;
int cellCount = mResultCells.size();
XSpreadsheets xSheets = xSheetDoc.getSheets();
- XIndexAccess xIA = (XIndexAccess)UnoRuntime.queryInterface(
+ XIndexAccess xIA = UnoRuntime.queryInterface(
XIndexAccess.class, xSheets);
int sheetCount = xIA.getCount();
for (int i = 0; i < cellCount && testResult; ++i)
{
- CellAddress addr = (CellAddress)mResultCells.get(i);
+ CellAddress addr = mResultCells.get(i);
Object[][] data = xDPTab2.getDrillDownData(addr);
@@ -238,7 +238,7 @@ public class _XDataPilotTable2 extends MultiMethodTest
// Remove the sheet just inserted.
- XNamed xNamed = (XNamed)UnoRuntime.queryInterface(XNamed.class, xSheet);
+ XNamed xNamed = UnoRuntime.queryInterface(XNamed.class, xSheet);
String name = xNamed.getName();
try
{
@@ -392,7 +392,7 @@ public class _XDataPilotTable2 extends MultiMethodTest
getOutputRanges();
- mResultCells = new ArrayList();
+ mResultCells = new ArrayList<CellAddress>();
for (int x = mRangeResult.StartColumn; x <= mRangeResult.EndColumn; ++x)
{
for (int y = mRangeResult.StartRow; y <= mRangeResult.EndRow; ++y)
@@ -414,8 +414,8 @@ public class _XDataPilotTable2 extends MultiMethodTest
private void buildDataFields()
{
- mDataFieldDims = new ArrayList();
- XDataPilotDescriptor xDesc = (XDataPilotDescriptor)UnoRuntime.queryInterface(
+ mDataFieldDims = new ArrayList<Integer>();
+ XDataPilotDescriptor xDesc = UnoRuntime.queryInterface(
XDataPilotDescriptor.class, xDPTab2);
XIndexAccess xFields = xDesc.getDataPilotFields();
@@ -489,7 +489,7 @@ public class _XDataPilotTable2 extends MultiMethodTest
return false;
}
- XCellRangeData xCRD = (XCellRangeData)UnoRuntime.queryInterface(
+ XCellRangeData xCRD = UnoRuntime.queryInterface(
XCellRangeData.class, xCR);
Object[][] sheetData = xCRD.getDataArray();
@@ -544,16 +544,16 @@ public class _XDataPilotTable2 extends MultiMethodTest
try
{
XCellRange xRng = xSheet.getCellRangeByPosition(nCol, nRow, nCol, nRow);
- XSheetCellRange xSCR = (XSheetCellRange)UnoRuntime.queryInterface(
+ XSheetCellRange xSCR = UnoRuntime.queryInterface(
XSheetCellRange.class, xRng);
XSheetCellCursor xCursor = xSheet.createCursorByRange(xSCR);
- XCellCursor xCellCursor = (XCellCursor)UnoRuntime.queryInterface(
+ XCellCursor xCellCursor = UnoRuntime.queryInterface(
XCellCursor.class, xCursor);
xCellCursor.gotoEnd();
XCell xCell = xCursor.getCellByPosition(0, 0);
- XCellAddressable xCellAddr = (XCellAddressable)UnoRuntime.queryInterface(
+ XCellAddressable xCellAddr = UnoRuntime.queryInterface(
XCellAddressable.class, xCell);
return xCellAddr.getCellAddress();
diff --git a/qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing.java b/qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing.java
index 927c774ba464..936351a30353 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing.java
@@ -55,10 +55,9 @@ public class _XDocumentAuditing extends MultiMethodTest {
// get two sheets
xSheet = new XSpreadsheet[2];
try {
- XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument)
- UnoRuntime.queryInterface(XSpreadsheetDocument.class, oObj);
+ XSpreadsheetDocument xSpreadsheetDocument = UnoRuntime.queryInterface(XSpreadsheetDocument.class, oObj);
XSpreadsheets oSheets = xSpreadsheetDocument.getSheets();
- XIndexAccess oIndexSheets = (XIndexAccess) UnoRuntime.queryInterface(
+ XIndexAccess oIndexSheets = UnoRuntime.queryInterface(
XIndexAccess.class, oSheets);
XSpreadsheet oSheet = (XSpreadsheet) UnoRuntime.queryInterface(
XSpreadsheet.class, oIndexSheets.getByIndex(0));
@@ -84,8 +83,7 @@ public class _XDocumentAuditing extends MultiMethodTest {
xDrawPage = (XDrawPage)tEnv.getObjRelation("XDocumentAuditing.DrawPage");
if (xDrawPage == null) { // get from object
try {
- XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
- UnoRuntime.queryInterface(XDrawPagesSupplier.class, oObj);
+ XDrawPagesSupplier oDPS = UnoRuntime.queryInterface(XDrawPagesSupplier.class, oObj);
Object o = oDPS.getDrawPages().getByIndex(1);
xDrawPage = (XDrawPage)UnoRuntime.queryInterface(XDrawPage.class, o);
}
@@ -106,17 +104,17 @@ public class _XDocumentAuditing extends MultiMethodTest {
props[0] = new PropertyValue();
props[0].Name = "AutoRefreshArrows";
props[0].Value = Boolean.FALSE;
- XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, oObj);
+ XModel xModel = UnoRuntime.queryInterface(XModel.class, oObj);
dispatch(xModel.getCurrentController().getFrame(), (XMultiServiceFactory)tParam.getMSF(), ".uno:AutoRefreshArrows", props);
// prepare the sheets
try {
xSheet[0].getCellByPosition(6, 6).setValue(9);
- XNamed xNamed = (XNamed)UnoRuntime.queryInterface(XNamed.class, xSheet[0]);
+ XNamed xNamed = UnoRuntime.queryInterface(XNamed.class, xSheet[0]);
sheetName = xNamed.getName();
xSheet[1].getCellByPosition(6, 6).setValue(16);
xSheet[1].getCellByPosition(6, 7).setFormula("= SQRT(G7)");
- XSheetAuditing xSheetAuditing = (XSheetAuditing)UnoRuntime.queryInterface(XSheetAuditing.class, xSheet[1]);
+ XSheetAuditing xSheetAuditing = UnoRuntime.queryInterface(XSheetAuditing.class, xSheet[1]);
CellAddress add = new CellAddress((short)1, 6, 7);
xSheetAuditing.showPrecedents(add);
boolean ok = hasRightAmountOfShapes(1);
@@ -134,7 +132,7 @@ public class _XDocumentAuditing extends MultiMethodTest {
props[0] = new PropertyValue();
props[0].Name = "AutoRefreshArrows";
props[0].Value = Boolean.TRUE;
- XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, oObj);
+ XModel xModel = UnoRuntime.queryInterface(XModel.class, oObj);
dispatch(xModel.getCurrentController().getFrame(), (XMultiServiceFactory)tParam.getMSF(), ".uno:AutoRefreshArrows", props);
}
@@ -191,7 +189,7 @@ public class _XDocumentAuditing extends MultiMethodTest {
for (int i=elementCount; i<newCount; i++) {
try {
Object o = xDrawPage.getByIndex(i);
- XShape xShape = (XShape)UnoRuntime.queryInterface(XShape.class, o);
+ XShape xShape = UnoRuntime.queryInterface(XShape.class, o);
pos = xShape.getPosition();
System.out.println("Shape Type: " + xShape.getShapeType());
}
@@ -205,7 +203,7 @@ public class _XDocumentAuditing extends MultiMethodTest {
}
private void dispatch(Object oProvider, XMultiServiceFactory xMSF, String url, PropertyValue[] prop) {
- XDispatchProvider xDispatchProvider = (XDispatchProvider)UnoRuntime.queryInterface(XDispatchProvider.class, oProvider);
+ XDispatchProvider xDispatchProvider = UnoRuntime.queryInterface(XDispatchProvider.class, oProvider);
Object dispatcher = null;
try {
dispatcher = xMSF.createInstance("com.sun.star.frame.DispatchHelper");
@@ -213,7 +211,7 @@ public class _XDocumentAuditing extends MultiMethodTest {
catch(com.sun.star.uno.Exception e) {
}
- XDispatchHelper xDispatchHelper = (XDispatchHelper)UnoRuntime.queryInterface(XDispatchHelper.class, dispatcher);
+ XDispatchHelper xDispatchHelper = UnoRuntime.queryInterface(XDispatchHelper.class, dispatcher);
xDispatchHelper.executeDispatch(xDispatchProvider, url, "", 0, prop);
}
}
diff --git a/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java b/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java
index dae892e4f8b0..c28505aa71d9 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java
@@ -52,7 +52,7 @@ public class _XEnhancedMouseClickBroadcaster extends MultiMethodTest {
private XModel docModel = null;
public void before() {
- docModel = (XModel) UnoRuntime.queryInterface(
+ docModel = UnoRuntime.queryInterface(
XModel.class,tEnv.getObjRelation("FirstModel"));
DesktopTools.bringWindowToFront(docModel);
}
@@ -90,7 +90,7 @@ public class _XEnhancedMouseClickBroadcaster extends MultiMethodTest {
XInterface oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PANEL);
- XAccessibleComponent window = (XAccessibleComponent) UnoRuntime.queryInterface(
+ XAccessibleComponent window = UnoRuntime.queryInterface(
XAccessibleComponent.class, oObj);
Point point = window.getLocationOnScreen();
diff --git a/qadevOOo/tests/java/ifc/sheet/_XGoalSeek.java b/qadevOOo/tests/java/ifc/sheet/_XGoalSeek.java
index 1e4f238fcc49..6b7ddd18b203 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XGoalSeek.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XGoalSeek.java
@@ -41,10 +41,9 @@ public class _XGoalSeek extends MultiMethodTest {
Exception ex = null;
// get two sheets
try {
- XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument)
- UnoRuntime.queryInterface(XSpreadsheetDocument.class, oObj);
+ XSpreadsheetDocument xSpreadsheetDocument = UnoRuntime.queryInterface(XSpreadsheetDocument.class, oObj);
XSpreadsheets oSheets = xSpreadsheetDocument.getSheets();
- XIndexAccess oIndexSheets = (XIndexAccess) UnoRuntime.queryInterface(
+ XIndexAccess oIndexSheets = UnoRuntime.queryInterface(
XIndexAccess.class, oSheets);
xSheet = (XSpreadsheet) UnoRuntime.queryInterface(
XSpreadsheet.class, oIndexSheets.getByIndex(1));
diff --git a/qadevOOo/tests/java/ifc/sheet/_XMultipleOperation.java b/qadevOOo/tests/java/ifc/sheet/_XMultipleOperation.java
index 21289661ede3..8aaede910f0b 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XMultipleOperation.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XMultipleOperation.java
@@ -54,7 +54,7 @@ public class _XMultipleOperation extends MultiMethodTest {
public void _setTableOperation() {
boolean res = true;
XCellRange cellRange = oSheet.getCellRangeByName("$A$17:$A$17");
- XCellRangeAddressable CRA = (XCellRangeAddressable) UnoRuntime.queryInterface(
+ XCellRangeAddressable CRA = UnoRuntime.queryInterface(
XCellRangeAddressable.class,
cellRange);
XCell cell = null;
@@ -69,9 +69,9 @@ public class _XMultipleOperation extends MultiMethodTest {
log.println("Exception while getting Cell " + e.getMessage());
}
- XCellAddressable CA = (XCellAddressable) UnoRuntime.queryInterface(
+ XCellAddressable CA = UnoRuntime.queryInterface(
XCellAddressable.class, cell);
- XCellAddressable CA2 = (XCellAddressable) UnoRuntime.queryInterface(
+ XCellAddressable CA2 = UnoRuntime.queryInterface(
XCellAddressable.class, cell2);
Point[] cellCoords = new Point[3];
double[] cellValues = new double[3];
diff --git a/qadevOOo/tests/java/ifc/sheet/_XNamedRanges.java b/qadevOOo/tests/java/ifc/sheet/_XNamedRanges.java
index 7d949abc304d..a1505b5138b2 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XNamedRanges.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XNamedRanges.java
@@ -132,12 +132,12 @@ public class _XNamedRanges extends MultiMethodTest {
for (int i = 1; i < 4; i++) {
cell = oSheet.getCellByPosition(0, i);
- textrange = (XTextRange)UnoRuntime.
+ textrange = UnoRuntime.
queryInterface(XTextRange.class, cell);
textrange.setString("Row" + i);
cell = oSheet.getCellByPosition(i, 0);
- textrange = (XTextRange)UnoRuntime.
+ textrange = UnoRuntime.
queryInterface(XTextRange.class, cell);
textrange.setString("Column" + i);
}
@@ -145,7 +145,7 @@ public class _XNamedRanges extends MultiMethodTest {
for (int i = 1; i < 4; i++)
for (int j = 1; j < 4; j++) {
cell = oSheet.getCellByPosition(i, j);
- textrange = (XTextRange)UnoRuntime.
+ textrange = UnoRuntime.
queryInterface(XTextRange.class, cell);
textrange.setString("Val" + ((j - 1) * 3 + i));
}
@@ -159,12 +159,11 @@ public class _XNamedRanges extends MultiMethodTest {
bResult &= oObj.hasByName("Column" + i);
Object range = oObj.getByName("Column" + i);
- XCellRangeReferrer CRR = (XCellRangeReferrer)UnoRuntime.
+ XCellRangeReferrer CRR = UnoRuntime.
queryInterface(XCellRangeReferrer.class,range);
XCellRange CR = CRR.getReferredCells();
- XCellRangeAddressable xCRA = (XCellRangeAddressable)
- UnoRuntime.queryInterface(XCellRangeAddressable.class, CR);
+ XCellRangeAddressable xCRA = UnoRuntime.queryInterface(XCellRangeAddressable.class, CR);
CellRangeAddress objCRA = xCRA.getRangeAddress();
@@ -180,12 +179,11 @@ public class _XNamedRanges extends MultiMethodTest {
bResult &= oObj.hasByName("Row" + i);
Object range = oObj.getByName("Row" + i);
- XCellRangeReferrer CRR = (XCellRangeReferrer)UnoRuntime.
+ XCellRangeReferrer CRR = UnoRuntime.
queryInterface(XCellRangeReferrer.class,range);
XCellRange CR = CRR.getReferredCells();
- XCellRangeAddressable xCRA = (XCellRangeAddressable)
- UnoRuntime.queryInterface(XCellRangeAddressable.class, CR);
+ XCellRangeAddressable xCRA = UnoRuntime.queryInterface(XCellRangeAddressable.class, CR);
CellRangeAddress objCRA = xCRA.getRangeAddress();
@@ -221,7 +219,7 @@ public class _XNamedRanges extends MultiMethodTest {
boolean bResult = true;
CellAddress CA = new CellAddress((short)0, 0, 0);
- XIndexAccess IA = (XIndexAccess)UnoRuntime.
+ XIndexAccess IA = UnoRuntime.
queryInterface(XIndexAccess.class, oObj);
int elementsCount = IA.getCount();
@@ -231,8 +229,7 @@ public class _XNamedRanges extends MultiMethodTest {
try {
for (int i = 0; i < elementsCount; i++) {
XCell cell = oSheet.getCellByPosition(0, i);
- XTextRange textrange = (XTextRange)
- UnoRuntime.queryInterface(XTextRange.class, cell);
+ XTextRange textrange = UnoRuntime.queryInterface(XTextRange.class, cell);
String str = textrange.getString();
bResult &= oObj.hasByName(str);
}
@@ -258,7 +255,7 @@ public class _XNamedRanges extends MultiMethodTest {
public void _removeByName() {
requiredMethod("addNewByName()");
boolean bResult = true;
- XIndexAccess IA = (XIndexAccess)UnoRuntime.
+ XIndexAccess IA = UnoRuntime.
queryInterface(XIndexAccess.class, oObj);
int elementsCount = IA.getCount();
diff --git a/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java b/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java
index 65e2e44eed34..ad7dc91445b1 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java
@@ -59,7 +59,7 @@ public class _XRangeSelection extends MultiMethodTest {
if (xModel == null)
throw new StatusException(Status.failed("Object relation FirstModel' not set."));
XWindow xWindow = xModel.getCurrentController().getFrame().getContainerWindow();
- XTopWindow xTopWindow = (XTopWindow)UnoRuntime.queryInterface(XTopWindow.class, xWindow);
+ XTopWindow xTopWindow = UnoRuntime.queryInterface(XTopWindow.class, xWindow);
xTopWindow.toFront();
util.utils.shortWait(500);
}
@@ -170,8 +170,7 @@ public class _XRangeSelection extends MultiMethodTest {
AccessibilityTools at = new AccessibilityTools();
XComponent xSheetDoc = (XComponent) tEnv.getObjRelation("DOCUMENT");
- XModel xModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xSheetDoc);
+ XModel xModel = UnoRuntime.queryInterface(XModel.class, xSheetDoc);
System.out.println("Name: " + xModel.getCurrentController().getFrame().getName());
XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)tParam.getMSF(), xModel);
@@ -179,7 +178,7 @@ public class _XRangeSelection extends MultiMethodTest {
at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE );
- XAccessibleComponent AccessibleSpreadsheet = (XAccessibleComponent) UnoRuntime.queryInterface(XAccessibleComponent.class,AccessibilityTools.SearchedContext);
+ XAccessibleComponent AccessibleSpreadsheet = UnoRuntime.queryInterface(XAccessibleComponent.class,AccessibilityTools.SearchedContext);
log.println("Got " + util.utils.getImplName(AccessibleSpreadsheet));
@@ -193,7 +192,7 @@ public class _XRangeSelection extends MultiMethodTest {
throw new StatusException("Couldn't get toolkit", e);
}
- XExtendedToolkit tk = (XExtendedToolkit) UnoRuntime.queryInterface(
+ XExtendedToolkit tk = UnoRuntime.queryInterface(
XExtendedToolkit.class, toolkit);
XTopWindow tw = null;
@@ -202,7 +201,7 @@ public class _XRangeSelection extends MultiMethodTest {
for (int i=0;i<k;i++) {
try {
XTopWindow tw_temp = tk.getTopWindow(i);
- XAccessible xacc = (XAccessible) UnoRuntime.queryInterface(XAccessible.class, tw_temp);
+ XAccessible xacc = UnoRuntime.queryInterface(XAccessible.class, tw_temp);
if (xacc != null) {
if (xacc.getAccessibleContext().getAccessibleName().indexOf("d2")>0) {
tw=tw_temp;
@@ -240,7 +239,7 @@ public class _XRangeSelection extends MultiMethodTest {
catch(com.sun.star.uno.Exception e) {
throw new StatusException("Could not create 'com.sun.star.awt.Toolkit'.", e);
}
- XExtendedToolkit xExtendedToolkit = (XExtendedToolkit)UnoRuntime.queryInterface(XExtendedToolkit.class, aToolkit);
+ XExtendedToolkit xExtendedToolkit = UnoRuntime.queryInterface(XExtendedToolkit.class, aToolkit);
XTopWindow tw = null;
XAccessibleComponent xAccessibleComponent = null;
@@ -248,13 +247,13 @@ public class _XRangeSelection extends MultiMethodTest {
for (int i=0;i<k;i++) {
try {
XTopWindow tw_temp = xExtendedToolkit.getTopWindow(i);
- XAccessible xacc = (XAccessible)UnoRuntime.queryInterface(XAccessible.class, tw_temp);
+ XAccessible xacc = UnoRuntime.queryInterface(XAccessible.class, tw_temp);
if (xacc != null) {
System.out.println("Name: " + xacc.getAccessibleContext().getAccessibleName());
if (xacc.getAccessibleContext().getAccessibleName().startsWith("the title")) {
tw = tw_temp;
XAccessibleContext xContext = xacc.getAccessibleContext();
- xAccessibleComponent = (XAccessibleComponent)UnoRuntime.queryInterface(XAccessibleComponent.class, xContext);
+ xAccessibleComponent = UnoRuntime.queryInterface(XAccessibleComponent.class, xContext);
if (xAccessibleComponent == null)
System.out.println("!!!! MIST !!!!");
else
@@ -273,7 +272,7 @@ public class _XRangeSelection extends MultiMethodTest {
return null;
}
- XWindow xWindow = (XWindow)UnoRuntime.queryInterface(XWindow.class, tw);
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, tw);
Rectangle posSize = xWindow.getPosSize();
// compare the center point with the dimensions of the current top window
diff --git a/qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced.java b/qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced.java
index 2c48dd4c7162..aa53035bf9b8 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced.java
@@ -32,7 +32,7 @@ public class _XScenarioEnhanced extends MultiMethodTest {
public XScenarioEnhanced oObj = null;
public void before() {
- oObj = (XScenarioEnhanced) UnoRuntime.queryInterface(
+ oObj = UnoRuntime.queryInterface(
XScenarioEnhanced.class,
tEnv.getObjRelation("ScenarioSheet"));
}
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotation.java b/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotation.java
index 8eff20ff8811..f82641c80f69 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotation.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotation.java
@@ -75,8 +75,7 @@ public class _XSheetAnnotation extends MultiMethodTest {
* Has <b>OK</b> status if the method returns <code>true</code>.
*/
public void _getIsVisible() {
- XSimpleText oText = (XSimpleText)
- UnoRuntime.queryInterface(XSimpleText.class, oObj);
+ XSimpleText oText = UnoRuntime.queryInterface(XSimpleText.class, oObj);
oText.setString("XSheetAnnotation");
oObj.setIsVisible(true);
boolean bVis = oObj.getIsVisible();
@@ -112,8 +111,7 @@ public class _XSheetAnnotation extends MultiMethodTest {
*/
public void _setIsVisible() {
boolean bResult = true;
- XSimpleText oText = (XSimpleText)
- UnoRuntime.queryInterface(XSimpleText.class, oObj);
+ XSimpleText oText = UnoRuntime.queryInterface(XSimpleText.class, oObj);
oText.setString("XSheetAnnotation");
oObj.setIsVisible(false);
boolean bVis = oObj.getIsVisible();
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationAnchor.java b/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationAnchor.java
index ca536330594f..b8b1b87a35c5 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationAnchor.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationAnchor.java
@@ -78,8 +78,7 @@ public class _XSheetAnnotationAnchor extends MultiMethodTest {
* Returns <b>true</b> if the method returns <code>true</code>.
*/
protected boolean check_getIsVisible() {
- XSimpleText oText = (XSimpleText)
- UnoRuntime.queryInterface(XSimpleText.class, anno);
+ XSimpleText oText = UnoRuntime.queryInterface(XSimpleText.class, anno);
oText.setString("XSheetAnnotation");
anno.setIsVisible(true);
boolean bVis = anno.getIsVisible();
@@ -104,8 +103,7 @@ public class _XSheetAnnotationAnchor extends MultiMethodTest {
*/
protected boolean check_setIsVisible() {
boolean bResult = true;
- XSimpleText oText = (XSimpleText)
- UnoRuntime.queryInterface(XSimpleText.class, anno);
+ XSimpleText oText = UnoRuntime.queryInterface(XSimpleText.class, anno);
oText.setString("XSheetAnnotation");
anno.setIsVisible(false);
boolean bVis = anno.getIsVisible();
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java b/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java
index dbff392834b9..f2f943a7069d 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XSheetAuditing.java
@@ -57,8 +57,7 @@ public class _XSheetAuditing extends MultiMethodTest {
// get the draw page for checking the shapes
xDrawPage = (XDrawPage)tEnv.getObjRelation("XSheetAuditing.DrawPage");
if (xDrawPage == null) { // get from object
- XDrawPageSupplier oDPS = (XDrawPageSupplier)
- UnoRuntime.queryInterface(XDrawPageSupplier.class, oObj);
+ XDrawPageSupplier oDPS = UnoRuntime.queryInterface(XDrawPageSupplier.class, oObj);
xDrawPage = (XDrawPage) oDPS.getDrawPage();
}
if (xDrawPage == null) {
@@ -120,7 +119,7 @@ public class _XSheetAuditing extends MultiMethodTest {
xPrecedentAddress.setValue(-9);
String cellAddress = new String(new byte[]{(byte)(precedentAddress.Column + 65)}) + (precedentAddress.Row+1);
xAddress.setFormula("=SQRT(" + cellAddress + ")");
- XText xText = (XText)UnoRuntime.queryInterface(XText.class, xAddress);
+ XText xText = UnoRuntime.queryInterface(XText.class, xAddress);
// correct error in cell:
String error = xText.getString();
boolean erg = error.equals("Err:502");
@@ -183,7 +182,7 @@ public class _XSheetAuditing extends MultiMethodTest {
for (int i=elementCount; i<newCount; i++) {
try {
Object o = xDrawPage.getByIndex(i);
- XShape xShape = (XShape)UnoRuntime.queryInterface(XShape.class, o);
+ XShape xShape = UnoRuntime.queryInterface(XShape.class, o);
System.out.println("Shape Type: " + xShape.getShapeType());
}
catch(com.sun.star.uno.Exception e) {
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor.java b/qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor.java
index 85e8d1b4a60a..538f1fc40bf7 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor.java
@@ -67,8 +67,7 @@ public class _XSheetCellCursor extends MultiMethodTest {
public void _collapseToCurrentArray() {
boolean bResult = false;
- XCellRangeAddressable crAddr = (XCellRangeAddressable)
- UnoRuntime.queryInterface(XCellRangeAddressable.class, oObj);
+ XCellRangeAddressable crAddr = UnoRuntime.queryInterface(XCellRangeAddressable.class, oObj);
CellRangeAddress addr = crAddr.getRangeAddress() ;
int leftCol = addr.StartColumn ;
int topRow = addr.StartRow ;
@@ -90,8 +89,7 @@ public class _XSheetCellCursor extends MultiMethodTest {
}
log.println("DB: Successfully new range created");
- XArrayFormulaRange arrFormulaRange = (XArrayFormulaRange)
- UnoRuntime.queryInterface (XArrayFormulaRange.class, new_range);
+ XArrayFormulaRange arrFormulaRange = UnoRuntime.queryInterface (XArrayFormulaRange.class, new_range);
// write a simple formula (this array assigns another array)
arrFormulaRange.setArrayFormula("A1:A" + height) ;
@@ -100,10 +98,10 @@ public class _XSheetCellCursor extends MultiMethodTest {
oObj.collapseToCurrentArray() ;
// check the size of result range
- int cols = ( (XColumnRowRange)UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getColumns().getCount();
- int rows = ( (XColumnRowRange)UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getRows().getCount();
+ int cols = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getColumns().getCount();
+ int rows = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getRows().getCount();
if (cols == 1 && rows == height) {
bResult = true;
@@ -124,8 +122,7 @@ public class _XSheetCellCursor extends MultiMethodTest {
bResult = false ;
log.println(
"Array formula hasn't been cleared with setArrayFormula(\"\")");
- XSheetOperation clearRange = (XSheetOperation)
- UnoRuntime.queryInterface (XSheetOperation.class, new_range);
+ XSheetOperation clearRange = UnoRuntime.queryInterface (XSheetOperation.class, new_range);
int allFlags =
CellFlags.ANNOTATION | CellFlags.DATETIME | CellFlags.EDITATTR;
allFlags = allFlags
@@ -153,15 +150,13 @@ public class _XSheetCellCursor extends MultiMethodTest {
int leftCol = -1, topRow = -1;
XSpreadsheet oSheet = oObj.getSpreadsheet();
- ((XSheetOperation) UnoRuntime.queryInterface(
- XSheetOperation.class, oSheet) ).clearContents(65535);
+ UnoRuntime.queryInterface(
+ XSheetOperation.class, oSheet).clearContents(65535);
oObj.collapseToCurrentRegion();
- int cols = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getColumns().getCount();
- int rows = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getRows().getCount();
+ int cols = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getColumns().getCount();
+ int rows = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getRows().getCount();
if (cols != width || rows != height) {
bResult = false ;
@@ -185,12 +180,10 @@ public class _XSheetCellCursor extends MultiMethodTest {
oObj.collapseToCurrentRegion() ;
// checking results
- cols = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj)).getColumns().getCount();
- rows = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj)).getRows().getCount();
+ cols = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getColumns().getCount();
+ rows = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getRows().getCount();
if (cols == width + 1 && rows == height + 1) {
bResult &= true;
@@ -237,8 +230,7 @@ public class _XSheetCellCursor extends MultiMethodTest {
bResult = false;
}
- XMergeable mergeRange = (XMergeable)
- UnoRuntime.queryInterface (XMergeable.class, newRange);
+ XMergeable mergeRange = UnoRuntime.queryInterface (XMergeable.class, newRange);
if (mergeRange == null) {
log.println("DB: newRange doesn't implement XMergeable interface");
} else {
@@ -256,12 +248,10 @@ public class _XSheetCellCursor extends MultiMethodTest {
log.println("DB: Successfully unmerged.") ;
// checking results
- int cols = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getColumns().getCount();
- int rows = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getRows().getCount();
+ int cols = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getColumns().getCount();
+ int rows = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getRows().getCount();
log.println("DB: Column and row numbers successfully get") ;
if (cols == width + 1 && rows == height + 3) {
@@ -294,12 +284,10 @@ public class _XSheetCellCursor extends MultiMethodTest {
oObj.collapseToSize (width + 3, height + 3);
// checking results
- int cols = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getColumns().getCount();
- int rows = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getRows().getCount();
+ int cols = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getColumns().getCount();
+ int rows = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getRows().getCount();
if (cols == width + 3 && rows == height + 3) {
bResult = true ;
@@ -331,12 +319,10 @@ public class _XSheetCellCursor extends MultiMethodTest {
oObj.expandToEntireColumns () ;
// checking results
- int cols = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getColumns().getCount();
- int rows = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getRows().getCount();
+ int cols = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getColumns().getCount();
+ int rows = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getRows().getCount();
if (cols == width && rows >= 32000) {
bResult = true ;
@@ -368,12 +354,10 @@ public class _XSheetCellCursor extends MultiMethodTest {
oObj.expandToEntireRows () ;
// checking results
- int cols = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getColumns().getCount();
- int rows = ((XColumnRowRange)
- UnoRuntime.queryInterface(
- XColumnRowRange.class, oObj) ).getRows().getCount();
+ int cols = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getColumns().getCount();
+ int rows = UnoRuntime.queryInterface(
+ XColumnRowRange.class, oObj).getRows().getCount();
if (cols >= 256 && rows == height) {
bResult = true;
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetFilterable.java b/qadevOOo/tests/java/ifc/sheet/_XSheetFilterable.java
index cb2ca228631a..892fadee5961 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XSheetFilterable.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XSheetFilterable.java
@@ -82,7 +82,7 @@ public class _XSheetFilterable extends MultiMethodTest {
oSheet.getCellByPosition(1, 2).setFormula("B");
oObj.filter(desc);
- XColumnRowRange oColumnRowRange = (XColumnRowRange) UnoRuntime.queryInterface(
+ XColumnRowRange oColumnRowRange = UnoRuntime.queryInterface(
XColumnRowRange.class,
oSheet);
XTableRows oRows = (XTableRows) oColumnRowRange.getRows();
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx.java b/qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx.java
index 4a96b79fd1be..7204ca3ab06a 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XSheetFilterableEx.java
@@ -46,7 +46,7 @@ public class _XSheetFilterableEx extends MultiMethodTest {
public void _createFilterDescriptorByObject() {
boolean res = true;
Object parent = tEnv.getTestObject();
- XSheetFilterable aFilterable = (XSheetFilterable) UnoRuntime.queryInterface(
+ XSheetFilterable aFilterable = UnoRuntime.queryInterface(
XSheetFilterable.class, parent);
XSheetFilterDescriptor desc = oObj.createFilterDescriptorByObject(
aFilterable);
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSheetOutline.java b/qadevOOo/tests/java/ifc/sheet/_XSheetOutline.java
index 6764f0543767..2b73249a12ef 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XSheetOutline.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XSheetOutline.java
@@ -108,7 +108,7 @@ public class _XSheetOutline extends MultiMethodTest {
private boolean isCellShown(CellRangeAddress range) {
boolean isNotShown = true;
- XCellRangesQuery xCellRangesQuery = (XCellRangesQuery)UnoRuntime.queryInterface(XCellRangesQuery.class, oObj);
+ XCellRangesQuery xCellRangesQuery = UnoRuntime.queryInterface(XCellRangesQuery.class, oObj);
if (xCellRangesQuery != null) {
XSheetCellRanges xRanges = xCellRangesQuery.queryVisibleCells();
CellRangeAddress[] visibleRanges = xRanges.getRangeAddresses();
diff --git a/qadevOOo/tests/java/ifc/sheet/_XSpreadsheet.java b/qadevOOo/tests/java/ifc/sheet/_XSpreadsheet.java
index 03372eb40187..1ee921879062 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XSpreadsheet.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XSpreadsheet.java
@@ -69,8 +69,7 @@ public class _XSpreadsheet extends MultiMethodTest {
tRes.tested("createCursorByRange()", false);
}
- XSheetCellRange oSheetRange = (XSheetCellRange)
- UnoRuntime.queryInterface(XSheetCellRange.class, oRange) ;
+ XSheetCellRange oSheetRange = UnoRuntime.queryInterface(XSheetCellRange.class, oRange) ;
log.println("getting Cursor");
XSheetCellCursor oCursor = oObj.createCursorByRange(oSheetRange);
tRes.tested("createCursorByRange()", oCursor != null);
diff --git a/qadevOOo/tests/java/ifc/sheet/_XUsedAreaCursor.java b/qadevOOo/tests/java/ifc/sheet/_XUsedAreaCursor.java
index 311a06d0989e..7c8922b97f1d 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XUsedAreaCursor.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XUsedAreaCursor.java
@@ -58,8 +58,7 @@ public class _XUsedAreaCursor extends MultiMethodTest {
public void _gotoEndOfUsedArea() {
boolean result = true ;
- XCellRangeAddressable oAddr = (XCellRangeAddressable)
- UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj) ;
+ XCellRangeAddressable oAddr = UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj) ;
// first with true argument
oObj.gotoStartOfUsedArea(false);
@@ -92,8 +91,7 @@ public class _XUsedAreaCursor extends MultiMethodTest {
* start of the used area in second case. <p>
*/
public void _gotoStartOfUsedArea() {
- XCellRangeAddressable oAddr = (XCellRangeAddressable)
- UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj) ;
+ XCellRangeAddressable oAddr = UnoRuntime.queryInterface (XCellRangeAddressable.class, oObj) ;
boolean result = true ;