diff options
Diffstat (limited to 'qadevOOo/tests/java/ifc/container')
17 files changed, 93 insertions, 93 deletions
diff --git a/qadevOOo/tests/java/ifc/container/_XChild.java b/qadevOOo/tests/java/ifc/container/_XChild.java index 2c142573ef01..cda4a19fff42 100644 --- a/qadevOOo/tests/java/ifc/container/_XChild.java +++ b/qadevOOo/tests/java/ifc/container/_XChild.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 @@ -74,9 +74,9 @@ public class _XChild extends MultiMethodTest { */ public void _setParent() { requiredMethod("getParent()") ; - + String parentComment = (String) tEnv.getObjRelation("cannotSwitchParent"); - + if (parentComment != null) { log.println(parentComment); tRes.tested("setParent()",Status.skipped(true)); diff --git a/qadevOOo/tests/java/ifc/container/_XContainer.java b/qadevOOo/tests/java/ifc/container/_XContainer.java index e3122bc28f66..f4e016100e73 100644 --- a/qadevOOo/tests/java/ifc/container/_XContainer.java +++ b/qadevOOo/tests/java/ifc/container/_XContainer.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 @@ -108,12 +108,12 @@ public class _XContainer extends MultiMethodTest { if (NC == null) { container = tEnv.getObjRelation("XContainer.Container") ; } - + if (container != null) { if (container instanceof com.sun.star.awt.XControlContainer) { CC = (XControlContainer) container; } else if (container instanceof com.sun.star.uno.XNamingService) { - NV = (XNamingService) container; + NV = (XNamingService) container; } else if (container instanceof com.sun.star.container.XNameReplace) { NR = (XNameReplace) container; inst2 = tEnv.getObjRelation("XContainer.NewValue"); @@ -122,7 +122,7 @@ public class _XContainer extends MultiMethodTest { NC = (XNameContainer) container; } } - + if (NC == null && CC == null && NV == null && NR == null) throw new StatusException( Status.failed("Neither object implements XNameContainer" + @@ -178,14 +178,14 @@ public class _XContainer extends MultiMethodTest { if (NR == null) bResult &= bElementInserted; if (!bResult) { - log.println("inserted was " + (bElementInserted ? "" : "NOT") + log.println("inserted was " + (bElementInserted ? "" : "NOT") + " called."); - + if (NC != null) { - log.println("replaced was " + (bElementReplaced ? "" : "NOT") + log.println("replaced was " + (bElementReplaced ? "" : "NOT") + " called."); } - log.println("removed was " + (bElementRemoved ? "" : "NOT") + log.println("removed was " + (bElementRemoved ? "" : "NOT") + " called."); } @@ -260,14 +260,14 @@ public class _XContainer extends MultiMethodTest { return bResult; } - + /** * In case no XNameContainer is available, but a XControlContainer - * instead. + * instead. * the XControl instance is inserted * Method returns true if the count of Controls is changed afterwards */ - protected boolean performChanges2() { + protected boolean performChanges2() { int precount = CC.getControls().length; CC.addControl("NewControl",(XControl) inst); shortWait(); @@ -276,25 +276,25 @@ public class _XContainer extends MultiMethodTest { shortWait(); return count>precount; } - + /** * In case no XNameContainer is available, but a XNamingService - * instead. + * instead. * the instance is registered and revoked again * Method return true if getRegisteredObject() works after * registering and doesn't after revoke */ - protected boolean performChanges3() { + protected boolean performChanges3() { boolean res = true; Object reg = null; - + try { reg = NV.getRegisteredObject("MyFactory"); - NV.revokeObject("MyFactory"); + NV.revokeObject("MyFactory"); } catch (Exception e) { - + } - + try { NV.registerObject("MyFactory", inst); reg = NV.getRegisteredObject("MyFactory"); @@ -304,7 +304,7 @@ public class _XContainer extends MultiMethodTest { log.println("registerObject failed"); res &= false; } - + try { NV.revokeObject("MyFactory"); reg = NV.getRegisteredObject("MyFactory"); @@ -313,20 +313,20 @@ public class _XContainer extends MultiMethodTest { } catch (Exception e) { res &= true; } - + return res; - } - + } + /** * In case no XNameContainer is available, but a XNamingReplace - * instead. + * instead. */ - protected boolean performChanges4() { + protected boolean performChanges4() { boolean res = true; Object newValue = inst2; Object originalValue = null; String name = null; - + try { name = (String)inst; } @@ -335,7 +335,7 @@ public class _XContainer extends MultiMethodTest { e.printStackTrace(log); return false; } - + try { originalValue = NR.getByName(name); NR.replaceByName(name, newValue); @@ -352,7 +352,7 @@ public class _XContainer extends MultiMethodTest { } return res; - } + } /** * Sleeps for 0.5 sec. to allow StarOffice to react on <code> @@ -364,7 +364,7 @@ public class _XContainer extends MultiMethodTest { } catch (InterruptedException e) { log.println("While waiting :" + e) ; } - } + } } diff --git a/qadevOOo/tests/java/ifc/container/_XContainerQuery.java b/qadevOOo/tests/java/ifc/container/_XContainerQuery.java index eb6fe34c5ff3..03e079156628 100644 --- a/qadevOOo/tests/java/ifc/container/_XContainerQuery.java +++ b/qadevOOo/tests/java/ifc/container/_XContainerQuery.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 @@ -45,13 +45,13 @@ import com.sun.star.container.XEnumeration; * </ul> * This test needs the following object relations : * <ul> -* <li> <code>'XContainerQuery.createSubSetEnumerationByProperties'</code> : -* <code>NameValue[]</code> which is a valid argument for +* <li> <code>'XContainerQuery.createSubSetEnumerationByProperties'</code> : +* <code>NameValue[]</code> which is a valid argument for * <code>createSubSetEnumerationByProperties()</code>.</li> * <li> <code>'XContainerQuery.createSubSetEnumerationByQuery'</code> : <b>(optional)</b> -* Normaly <code>createSubSetEnumerationByProperties()</code> covers all -* possible queries. But for special cases, i.e. sorted output, the function -* <code>createSubSetEnumerationByQuery()</code> was made. The special cases was not +* Normaly <code>createSubSetEnumerationByProperties()</code> covers all +* possible queries. But for special cases, i.e. sorted output, the function +* <code>createSubSetEnumerationByQuery()</code> was made. The special cases was not * implemented by default in the implemetation object. So this function could be * marked as <code>optional</code></li> * <ul> <p> @@ -62,7 +62,7 @@ import com.sun.star.container.XEnumeration; public class _XContainerQuery extends MultiMethodTest { public XContainerQuery oObj = null; - private NamedValue[] m_querySequenze = null; + private NamedValue[] m_querySequenze = null; private String[] m_queryStrings = null; @@ -71,26 +71,26 @@ public class _XContainerQuery extends MultiMethodTest { * @throws StatusException If one of relations not found. */ public void before() throws StatusException { - + m_querySequenze = (NamedValue[]) tEnv.getObjRelation( "XContainerQuery.createSubSetEnumerationByProperties"); if (m_querySequenze == null) { throw new StatusException( - Status.failed("Could not get object relation " + + Status.failed("Could not get object relation " + "'XContainerQuery.createSubSetEnumerationByProperties'")) ; } - + m_queryStrings = (String[]) tEnv.getObjRelation( "XContainerQuery.createSubSetEnumerationByQuery"); if (m_queryStrings == null) { - log.println("Could not get object relation " + + log.println("Could not get object relation " + "'XContainerQuery.createSubSetEnumerationByQuery'"); } } /** - * If object relation is available, the function was called with relation + * If object relation is available, the function was called with relation * as parameter. The returned <code>XEnumeration</code> must not be null and * elements of it must be valid. * If object relation is not available, the result is always <code>true</coed> @@ -129,23 +129,23 @@ public class _XContainerQuery extends MultiMethodTest { } /** - * The function was called with object relation + * The function was called with object relation * as parameter. The returned <code>XEnumeration</code> must not be null and * elements of it must be valid. - * + * */ public void _createSubSetEnumerationByProperties() { boolean bResult = true; XEnumeration subSet = oObj.createSubSetEnumerationByProperties( m_querySequenze ); - + bResult = subSet.hasMoreElements(); - + while (subSet.hasMoreElements()) { try{ Object element = subSet.nextElement(); - + } catch (com.sun.star.container.NoSuchElementException e){ log.println("Exception occured "); e.printStackTrace(log); diff --git a/qadevOOo/tests/java/ifc/container/_XContentEnumerationAccess.java b/qadevOOo/tests/java/ifc/container/_XContentEnumerationAccess.java index 5339febb521a..550fc20e7a03 100644 --- a/qadevOOo/tests/java/ifc/container/_XContentEnumerationAccess.java +++ b/qadevOOo/tests/java/ifc/container/_XContentEnumerationAccess.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 diff --git a/qadevOOo/tests/java/ifc/container/_XElementAccess.java b/qadevOOo/tests/java/ifc/container/_XElementAccess.java index e732db774c05..83c121f10927 100644 --- a/qadevOOo/tests/java/ifc/container/_XElementAccess.java +++ b/qadevOOo/tests/java/ifc/container/_XElementAccess.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 diff --git a/qadevOOo/tests/java/ifc/container/_XEnumeration.java b/qadevOOo/tests/java/ifc/container/_XEnumeration.java index eaf5a2d5991d..6b2595656f8a 100644 --- a/qadevOOo/tests/java/ifc/container/_XEnumeration.java +++ b/qadevOOo/tests/java/ifc/container/_XEnumeration.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 @@ -125,7 +125,7 @@ public class _XEnumeration extends MultiMethodTest { result = false; } catch (NoSuchElementException e) { log.println("nextElement: correct exception"); - } + } tRes.tested("nextElement()", result); diff --git a/qadevOOo/tests/java/ifc/container/_XEnumerationAccess.java b/qadevOOo/tests/java/ifc/container/_XEnumerationAccess.java index 87de9304e309..d929233bcd91 100644 --- a/qadevOOo/tests/java/ifc/container/_XEnumerationAccess.java +++ b/qadevOOo/tests/java/ifc/container/_XEnumerationAccess.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 diff --git a/qadevOOo/tests/java/ifc/container/_XHierarchicalName.java b/qadevOOo/tests/java/ifc/container/_XHierarchicalName.java index c2723ccce0af..d690f1df8ebe 100644 --- a/qadevOOo/tests/java/ifc/container/_XHierarchicalName.java +++ b/qadevOOo/tests/java/ifc/container/_XHierarchicalName.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 @@ -46,7 +46,7 @@ public class _XHierarchicalName extends MultiMethodTest { res = hn.startsWith(expName); if (!res) { - log.println("Getting : " + hn + + log.println("Getting : " + hn + " but expected it to start with " + expName); } } catch (com.sun.star.lang.IllegalArgumentException e) { diff --git a/qadevOOo/tests/java/ifc/container/_XHierarchicalNameAccess.java b/qadevOOo/tests/java/ifc/container/_XHierarchicalNameAccess.java index 2270d68502ba..2fb8e6d19011 100644 --- a/qadevOOo/tests/java/ifc/container/_XHierarchicalNameAccess.java +++ b/qadevOOo/tests/java/ifc/container/_XHierarchicalNameAccess.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 diff --git a/qadevOOo/tests/java/ifc/container/_XIndexAccess.java b/qadevOOo/tests/java/ifc/container/_XIndexAccess.java index c87a62baaf23..e9bcad12b2b2 100644 --- a/qadevOOo/tests/java/ifc/container/_XIndexAccess.java +++ b/qadevOOo/tests/java/ifc/container/_XIndexAccess.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 @@ -125,16 +125,16 @@ public class _XIndexAccess extends MultiMethodTest { tRes.tested("getByIndex()", result); } // end getByIndex - + private boolean checkGetByIndex(int index){ Object o = null; boolean result = true; try { log.println("getByIndex(" + index + ")"); o = oObj.getByIndex(index); - + if ( tEnv.getObjRelation("XIndexAccess.getByIndex.mustBeNull") != null){ - result = (o == null); + result = (o == null); if (result) log.println("OK"); else log.println("FAILED -> not null"); } else { result = (o != null); @@ -148,7 +148,7 @@ public class _XIndexAccess extends MultiMethodTest { log.println("Exception! " + e); result = false; } - + return result; } diff --git a/qadevOOo/tests/java/ifc/container/_XIndexContainer.java b/qadevOOo/tests/java/ifc/container/_XIndexContainer.java index fcd9e80f7589..60fddf132635 100644 --- a/qadevOOo/tests/java/ifc/container/_XIndexContainer.java +++ b/qadevOOo/tests/java/ifc/container/_XIndexContainer.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 diff --git a/qadevOOo/tests/java/ifc/container/_XIndexReplace.java b/qadevOOo/tests/java/ifc/container/_XIndexReplace.java index b25dce3456ab..518c2f25a256 100644 --- a/qadevOOo/tests/java/ifc/container/_XIndexReplace.java +++ b/qadevOOo/tests/java/ifc/container/_XIndexReplace.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 diff --git a/qadevOOo/tests/java/ifc/container/_XNameAccess.java b/qadevOOo/tests/java/ifc/container/_XNameAccess.java index be3909179f3d..e141d5da5fe8 100644 --- a/qadevOOo/tests/java/ifc/container/_XNameAccess.java +++ b/qadevOOo/tests/java/ifc/container/_XNameAccess.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 diff --git a/qadevOOo/tests/java/ifc/container/_XNameContainer.java b/qadevOOo/tests/java/ifc/container/_XNameContainer.java index 045a43f135e7..2e54cca7e0f5 100644 --- a/qadevOOo/tests/java/ifc/container/_XNameContainer.java +++ b/qadevOOo/tests/java/ifc/container/_XNameContainer.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 @@ -204,7 +204,7 @@ public class _XNameContainer extends MultiMethodTest { oObj.removeByName(Name); } catch (com.sun.star.container.NoSuchElementException e1) { } catch (com.sun.star.lang.WrappedTargetException e1) { - } + } } boolean result = true; 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; } } diff --git a/qadevOOo/tests/java/ifc/container/_XNamed.java b/qadevOOo/tests/java/ifc/container/_XNamed.java index 81d9130e17ca..ed569c102922 100644 --- a/qadevOOo/tests/java/ifc/container/_XNamed.java +++ b/qadevOOo/tests/java/ifc/container/_XNamed.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 @@ -153,7 +153,7 @@ public class _XNamed extends MultiMethodTest { result &= loc_result; oObj.setName(oldName); } else { - log.println("The names for the object '" + testobjname + + log.println("The names for the object '" + testobjname + "' are fixed."); log.println("It is not possible to rename."); log.println("So 'setName()' is always OK"); diff --git a/qadevOOo/tests/java/ifc/container/_XSet.java b/qadevOOo/tests/java/ifc/container/_XSet.java index 191b107ebc08..bb18e18d9b0b 100644 --- a/qadevOOo/tests/java/ifc/container/_XSet.java +++ b/qadevOOo/tests/java/ifc/container/_XSet.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 |