diff options
Diffstat (limited to 'qadevOOo/tests/java/ifc/ui')
21 files changed, 194 insertions, 194 deletions
diff --git a/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java b/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java index 3e5361e9f2e0..b86bd1cd9e1a 100644 --- a/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.java +++ b/qadevOOo/tests/java/ifc/ui/_XContextMenuInterception.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 @@ -54,37 +54,37 @@ import util.DesktopTools; import util.utils; public class _XContextMenuInterception extends MultiMethodTest { - + private XModel docModel = null; private XContextMenuInterceptor xCI = null; public XContextMenuInterception oObj = null; private XWindow xWindow = null; private XMultiServiceFactory xMSF = null; private Point point = null; - + public void before() { docModel = (XModel) UnoRuntime.queryInterface( XModel.class,tEnv.getObjRelation("FirstModel")); - + xCI = (XContextMenuInterceptor) UnoRuntime.queryInterface( XContextMenuInterceptor.class, new ContextMenuInterceptor()); - + xMSF = (XMultiServiceFactory)tParam.getMSF(); - + //ensure that the first model is focused log.println("ensure that the first model is focused"); DesktopTools.bringWindowToFront(docModel); - + utils.shortWait(3000); } - + public void after() { if (xCI != null) { oObj.releaseContextMenuInterceptor(xCI); } } - + public void _registerContextMenuInterceptor() { oObj.registerContextMenuInterceptor(xCI); openContextMenu(docModel); @@ -92,7 +92,7 @@ public class _XContextMenuInterception extends MultiMethodTest { releasePopUp(); tRes.tested("registerContextMenuInterceptor()",res); } - + public void _releaseContextMenuInterceptor() { requiredMethod("registerContextMenuInterceptor()"); oObj.releaseContextMenuInterceptor(xCI); @@ -101,11 +101,11 @@ public class _XContextMenuInterception extends MultiMethodTest { releasePopUp(); tRes.tested("releaseContextMenuInterceptor()",!res); } - + private boolean checkHelpEntry(){ XInterface toolkit = null; boolean res = true; - + log.println("get accesibility..."); try{ toolkit = (XInterface) xMSF.createInstance("com.sun.star.awt.Toolkit"); @@ -114,69 +114,69 @@ public class _XContextMenuInterception extends MultiMethodTest { } XExtendedToolkit tk = (XExtendedToolkit) UnoRuntime.queryInterface( XExtendedToolkit.class, toolkit); - + XAccessible xRoot = null; - + AccessibilityTools at = new AccessibilityTools(); - + try { xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, tk.getTopWindow(0)); - + xRoot = at.getAccessibleObject(xWindow); at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE)); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { log.println("Couldn't get Window"); } - + XAccessibleContext oPopMenu = at.getAccessibleObjectForRole(xRoot, AccessibleRole.POPUP_MENU,true); - + log.println("ImplementationName: " + util.utils.getImplName(oPopMenu)); - + XAccessible xHelp = null; try{ log.println("Try to get second entry of context menu..."); xHelp = oPopMenu.getAccessibleChild(1); - + } catch (IndexOutOfBoundsException e){ throw new StatusException("Not possible to get second entry of context menu",e); } - + if (xHelp == null) throw new StatusException(new Status("second entry of context menu is NULL", false)); - + XAccessibleContext xHelpCont = xHelp.getAccessibleContext(); - + if ( xHelpCont == null ) throw new StatusException(new Status("No able to retrieve accessible context from first entry of context menu",false)); - + String aAccessibleName = xHelpCont.getAccessibleName(); if ( !aAccessibleName.equals( "Help" )) { log.println("Accessible name found = "+aAccessibleName ); log.println("Second entry of context menu is not from context menu interceptor"); res=false; } - + return res; - + } - + private void openContextMenu(XModel xModel){ - + log.println("try to open contex menu..."); AccessibilityTools at = new AccessibilityTools(); - + xWindow = at.getCurrentWindow(xMSF, xModel); - + XAccessible xRoot = at.getAccessibleObject(xWindow); - + XInterface oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PANEL); - + XAccessibleComponent window = (XAccessibleComponent) UnoRuntime.queryInterface( XAccessibleComponent.class, oObj); - + point = window.getLocationOnScreen(); Rectangle rect = window.getBounds(); - + log.println("klick mouse button..."); try { Robot rob = new Robot(); @@ -191,11 +191,11 @@ public class _XContextMenuInterception extends MultiMethodTest { } catch (java.awt.AWTException e) { log.println("couldn't press mouse button"); } - + utils.shortWait(1000); - + } - + private void releasePopUp() { log.println("release the popup menu"); try { diff --git a/qadevOOo/tests/java/ifc/ui/_XModuleUIConfigurationManager.java b/qadevOOo/tests/java/ifc/ui/_XModuleUIConfigurationManager.java index 024f72d07259..9d5dd4859e94 100755 --- a/qadevOOo/tests/java/ifc/ui/_XModuleUIConfigurationManager.java +++ b/qadevOOo/tests/java/ifc/ui/_XModuleUIConfigurationManager.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 @@ -32,14 +32,14 @@ import com.sun.star.ui.XModuleUIConfigurationManager; import lib.MultiMethodTest; public class _XModuleUIConfigurationManager extends MultiMethodTest { - + public XModuleUIConfigurationManager oObj = null; private String resourceUrl = null; - + public void before() { resourceUrl = (String)tEnv.getObjRelation("XModuleUIConfigurationManager.ResourceURL"); } - + public void _isDefaultSettings() { boolean result; try { @@ -57,10 +57,10 @@ public class _XModuleUIConfigurationManager extends MultiMethodTest { log.println("'" + notPossibleUrl + "' is an illegal resource."); result = false; } - + tRes.tested("isDefaultSettings()", result); } - + public void _getDefaultSettings() { boolean result; try { @@ -77,5 +77,5 @@ public class _XModuleUIConfigurationManager extends MultiMethodTest { } tRes.tested("getDefaultSettings()", result); } - + } diff --git a/qadevOOo/tests/java/ifc/ui/_XModuleUIConfigurationManagerSupplier.java b/qadevOOo/tests/java/ifc/ui/_XModuleUIConfigurationManagerSupplier.java index f2c87692d7bc..7f4015e7dc2f 100755 --- a/qadevOOo/tests/java/ifc/ui/_XModuleUIConfigurationManagerSupplier.java +++ b/qadevOOo/tests/java/ifc/ui/_XModuleUIConfigurationManagerSupplier.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 @@ -33,23 +33,23 @@ import com.sun.star.ui.XModuleUIConfigurationManagerSupplier; import lib.MultiMethodTest; public class _XModuleUIConfigurationManagerSupplier extends MultiMethodTest { - + public XModuleUIConfigurationManagerSupplier oObj; - + public void _getUIConfigurationManager() { String configManagerName = null; String implementationName = null; try { configManagerName = (String)tEnv.getObjRelation("XModuleUIConfigurationManagerSupplier.ConfigurationManager"); implementationName = (String)tEnv.getObjRelation("XModuleUIConfigurationManagerSupplier.ConfigManagerImplementationName"); - + // get a config manager for the StartModule Object o = oObj.getUIConfigurationManager(configManagerName); XServiceInfo xServiceInfo = (XServiceInfo)UnoRuntime.queryInterface(XServiceInfo.class, o); String impName = xServiceInfo.getImplementationName(); boolean result = impName.equals(implementationName); if (!result) { - log.println("Returned implementation was '" + impName + + log.println("Returned implementation was '" + impName + "' but should have been '" + implementationName + "'"); } tRes.tested("getUIConfigurationManager()", result); diff --git a/qadevOOo/tests/java/ifc/ui/_XUIConfiguration.java b/qadevOOo/tests/java/ifc/ui/_XUIConfiguration.java index 9b0fea0096c5..cc3b7f207d4c 100755 --- a/qadevOOo/tests/java/ifc/ui/_XUIConfiguration.java +++ b/qadevOOo/tests/java/ifc/ui/_XUIConfiguration.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 @@ -47,20 +47,20 @@ public class _XUIConfiguration extends MultiMethodTest { public XUIConfiguration oObj; XUIConfigurationListenerImpl xListener = null; - + /** * Interface for the Listener of the object relation * <CODE>XUIConfiguration.XUIConfigurationListenerImpl</CODE> * @see com.sun.star.ui.XUIConfigurationListener */ - public static interface XUIConfigurationListenerImpl + public static interface XUIConfigurationListenerImpl extends XUIConfigurationListener { - public void reset(); - public void fireEvent(); + public void reset(); + public void fireEvent(); public boolean actionWasTriggered(); } - - + + /** * try to get a listener out of the object relation * <CODE>XUIConfiguration.XUIConfigurationListenerImpl</CODE> @@ -70,7 +70,7 @@ public class _XUIConfiguration extends MultiMethodTest { "XUIConfiguration.XUIConfigurationListenerImpl"); XUIConfigurationListener l; } - + /** * adds a listener an fire an event * Has <B>OK</B> status if listener was called @@ -80,7 +80,7 @@ public class _XUIConfiguration extends MultiMethodTest { xListener.fireEvent(); tRes.tested("addConfigurationListener()", xListener.actionWasTriggered()); } - + /** * removes the listener and calls an event. * Has <B>OK</B> status if listener is not called. @@ -92,7 +92,7 @@ public class _XUIConfiguration extends MultiMethodTest { xListener.fireEvent(); tRes.tested("removeConfigurationListener()", !xListener.actionWasTriggered()); } - + /** * Dispose because the UIConfigurationManager has to be recreated */ diff --git a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationListener.java b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationListener.java index cd24140d988e..efc46f8d6063 100755 --- a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationListener.java +++ b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationListener.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 @@ -32,7 +32,7 @@ import com.sun.star.ui.XUIConfigurationListener; import lib.MultiMethodTest; public class _XUIConfigurationListener extends MultiMethodTest { - + public XUIConfigurationListener oObj = null; public void _elementInserted() { diff --git a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java index 53ddc59e6ce9..f14e70403f2d 100755 --- a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java +++ b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.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 @@ -42,7 +42,7 @@ import java.io.PrintWriter; import lib.MultiMethodTest; public class _XUIConfigurationManager extends MultiMethodTest { - + public XUIConfigurationManager oObj; private String msResourceUrl = "private:resource/menubar/menubar"; private String msMyResourceUrl = "private:resource/menubar/mymenubar"; @@ -50,8 +50,8 @@ public class _XUIConfigurationManager extends MultiMethodTest { private XIndexAccess mxMenuBarSettings = null; private XMultiServiceFactory mxMSF = null; private String sShortCutManagerServiceName = null; - - + + /** * Some stuff before the tests: * extract the multi service factory. @@ -61,7 +61,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { sShortCutManagerServiceName = (String)tEnv.getObjRelation("XConfigurationManager.ShortCutManager"); } - + /** * reset all changes: do at the end. */ @@ -70,7 +70,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { oObj.reset(); tRes.tested("reset()", true); } - + public void _getUIElementsInfo() { boolean result = true; try { @@ -85,13 +85,13 @@ public class _XUIConfigurationManager extends MultiMethodTest { } tRes.tested("getUIElementsInfo()", result); } - + public void _createSettings() { mxSettings = oObj.createSettings(); util.dbg.printInterfaces(mxSettings); tRes.tested("createSettings()", mxSettings != null); } - + public void _hasSettings() { boolean result = false; try { @@ -103,7 +103,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { } tRes.tested("hasSettings()", result); } - + public void _getSettings() { requiredMethod("hasSettings()"); boolean result = true; @@ -137,7 +137,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { } tRes.tested("getSettings()", result); } - + public void _replaceSettings() { requiredMethod("getSettings()"); boolean result = true; @@ -149,7 +149,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { createMenuBarItem("Click for Macro", (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, prop[3].Value), log); - + XIndexContainer x = (XIndexContainer)UnoRuntime.queryInterface(XIndexContainer.class, mxMenuBarSettings); try { x.insertByIndex(x.getCount(), prop); @@ -185,7 +185,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { _getSettings(); tRes.tested("replaceSettings()", result); } - + public void _removeSettings() { requiredMethod("insertSettings()"); boolean result = true; @@ -206,7 +206,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { } tRes.tested("removeSettings()", result); } - + public void _insertSettings() { requiredMethod("createSettings()"); requiredMethod("replaceSettings()"); @@ -220,7 +220,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { createMenuBarItem("A new sub entry", (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, prop[3].Value), log); - + XIndexContainer x = (XIndexContainer)UnoRuntime.queryInterface(XIndexContainer.class,mxSettings); try { int count = x.getCount(); @@ -256,10 +256,10 @@ public class _XUIConfigurationManager extends MultiMethodTest { } tRes.tested("insertSettings()", result); } - + /** * Only a short test. - * See complex.imageManager.CheckImageManager for a more extensive test of + * See complex.imageManager.CheckImageManager for a more extensive test of * this implementation. */ public void _getImageManager() { @@ -268,8 +268,8 @@ public class _XUIConfigurationManager extends MultiMethodTest { XImageManager xImageManager = (XImageManager)UnoRuntime.queryInterface(XImageManager.class, o); tRes.tested("getImageManager()", xImageManager != null); } - - + + /** * get a shortcut manager */ @@ -286,12 +286,12 @@ public class _XUIConfigurationManager extends MultiMethodTest { } tRes.tested("getShortCutManager()", bSupportedServiceFound); } - + public void _getEventsManager() { Object o = oObj.getEventsManager(); tRes.tested("getEventsManager()", o == null); } - + /** * Create a menu bar entry for adding to the menu bar of the Office. * @param sLabelName The name of the new entry. @@ -311,7 +311,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { prop[2].Value = new Short((short)0); prop[3] = new PropertyValue(); prop[3].Name = "ItemDescriptorContainer"; - + XSingleComponentFactory xFactory = (XSingleComponentFactory)UnoRuntime.queryInterface( XSingleComponentFactory.class, xMenuBarSettings); try { @@ -327,11 +327,11 @@ public class _XUIConfigurationManager extends MultiMethodTest { } return prop; } - + /** * Create a sub entry to the menu bar. * @param sLabelName The name of the entry in the UI. - * @param xDescriptionContainer The parent entry in the menu bar where + * @param xDescriptionContainer The parent entry in the menu bar where * this entry is added. */ public static void createMenuBarItem(String sLabelName, XIndexContainer xDescriptionContainer, PrintWriter log) { diff --git a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationPersistence.java b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationPersistence.java index 96067661bb26..5d0103524834 100755 --- a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationPersistence.java +++ b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationPersistence.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 @@ -32,14 +32,14 @@ import com.sun.star.ui.XUIConfigurationPersistence; import lib.MultiMethodTest; public class _XUIConfigurationPersistence extends MultiMethodTest { - + public XUIConfigurationPersistence oObj; private XStorage xStore = null; - + public void before() { xStore = (XStorage)tEnv.getObjRelation("XUIConfigurationStorage.Storage"); } - + public void _reload() { try { oObj.reload(); @@ -49,7 +49,7 @@ public class _XUIConfigurationPersistence extends MultiMethodTest { } tRes.tested("reload()", true); } - + public void _store() { try { oObj.store(); @@ -59,7 +59,7 @@ public class _XUIConfigurationPersistence extends MultiMethodTest { } tRes.tested("store()", true); } - + public void _storeToStorage() { boolean result = true; try { @@ -71,13 +71,13 @@ public class _XUIConfigurationPersistence extends MultiMethodTest { } tRes.tested("storeToStorage()", result); } - + public void _isModified() { tRes.tested("isModified()", !oObj.isModified()); } - + public void _isReadOnly() { tRes.tested("isReadOnly()", !oObj.isReadOnly()); } - + } diff --git a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationStorage.java b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationStorage.java index 8acdde914422..7a29c023f1c4 100755 --- a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationStorage.java +++ b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationStorage.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 @@ -42,17 +42,17 @@ import lib.MultiMethodTest; */ public class _XUIConfigurationStorage extends MultiMethodTest { - + public XUIConfigurationStorage oObj; private XStorage xStore = null; - + public void before() { xStore = (XStorage)tEnv.getObjRelation("XUIConfigurationStorage.Storage"); } /** * Set the object relation <code>XUIConfigurationStorage.Storage</code> - * as storage. + * as storage. * Has <b>OK</b> status if no exception is thrown. */ public void _setStorage() { @@ -62,7 +62,7 @@ public class _XUIConfigurationStorage extends MultiMethodTest { log.println("For initializing this object, the setStorage() method was already called at the object."); tRes.tested("setStorage()", true); } - + /** * Queries object for a storage. * Has <b>OK</b> status if <code>hasStorage</code> returns <code>OK</code> @@ -72,5 +72,5 @@ public class _XUIConfigurationStorage extends MultiMethodTest { boolean has = oObj.hasStorage(); tRes.tested("hasStorage()", has); } - + }
\ No newline at end of file diff --git a/qadevOOo/tests/java/ifc/ui/_XUIElementFactory.java b/qadevOOo/tests/java/ifc/ui/_XUIElementFactory.java index 5e590054e1f4..796f08a0a204 100755 --- a/qadevOOo/tests/java/ifc/ui/_XUIElementFactory.java +++ b/qadevOOo/tests/java/ifc/ui/_XUIElementFactory.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 @@ -35,7 +35,7 @@ import lib.MultiMethodTest; public class _XUIElementFactory extends MultiMethodTest { public XUIElementFactory oObj; - + public void _createUIElement() { boolean result = true; PropertyValue[] prop = new PropertyValue[0]; diff --git a/qadevOOo/tests/java/ifc/ui/_XUIElementFactoryRegistration.java b/qadevOOo/tests/java/ifc/ui/_XUIElementFactoryRegistration.java index 089b42aef0c1..48a8b8629b36 100755 --- a/qadevOOo/tests/java/ifc/ui/_XUIElementFactoryRegistration.java +++ b/qadevOOo/tests/java/ifc/ui/_XUIElementFactoryRegistration.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 @@ -47,7 +47,7 @@ public class _XUIElementFactoryRegistration extends MultiMethodTest { } tRes.tested("registerFactory()", result); } - + public void _getRegisteredFactories() { requiredMethod("registerFactory()"); PropertyValue[][]props = oObj.getRegisteredFactories(); @@ -55,18 +55,18 @@ public class _XUIElementFactoryRegistration extends MultiMethodTest { log.println("Null was returned as PropertyValue[][]"); props = new PropertyValue[0][0]; } - for(int i=0; i<props.length; i++) + for(int i=0; i<props.length; i++) for(int j=0; j<props[i].length; j++) log.println("Factory: " + props[i][j].Name + " - " + props[i][j].Value); tRes.tested("getRegisteredFactories()", props.length != 0); } - + public void _getFactory() { requiredMethod("registerFactory()"); XUIElementFactory xFactory = oObj.getFactory("private:resource/menubar/menubar", ""); tRes.tested("getFactory()", xFactory != null); } - + public void _deregisterFactory() { executeMethod("getRegisteredFactory()"); executeMethod("getFactory()"); diff --git a/qadevOOo/tests/java/ifc/ui/dialogs/_FilePicker.java b/qadevOOo/tests/java/ifc/ui/dialogs/_FilePicker.java index a3f681277d41..23f2f463b2b6 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_FilePicker.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_FilePicker.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/ui/dialogs/_XControlAccess.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XControlAccess.java index a1a9197cd4a6..716d35d43715 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XControlAccess.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XControlAccess.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 _XControlAccess extends MultiMethodTest { } } } - + log.println(error); tRes.tested("setControlProperty()", result) ; diff --git a/qadevOOo/tests/java/ifc/ui/dialogs/_XControlInformation.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XControlInformation.java index ad7c8d782d7d..22bce193c5bf 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XControlInformation.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XControlInformation.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/ui/dialogs/_XExecutableDialog.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java index 95e2c27d9895..2d67bedc2d55 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.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 @@ -49,10 +49,10 @@ import com.sun.star.util.XCancellable; * @see com.sun.star.ui.dialogs.XExecutableDialog */ public class _XExecutableDialog extends MultiMethodTest { - + public XExecutableDialog oObj = null; private ExecThread eThread = null; - + /** * Test calls the method. <p> * Has <b> OK </b> status if the method successfully returns @@ -62,7 +62,7 @@ public class _XExecutableDialog extends MultiMethodTest { oObj.setTitle("The Title"); tRes.tested("setTitle()",true); } - + /** * This method is excluded from automated test since * we can't close the dialog. <p> @@ -94,25 +94,25 @@ public class _XExecutableDialog extends MultiMethodTest { log.println("XCancellable isn't supported and the "+ "environment is killed hard"); } - - + + } tRes.tested("execute()",result); } - + /** * Calls <code>execute()</code> method in a separate thread. * Necessary to check if this method works */ protected class ExecThread extends Thread { - + public short execRes = (short) 17 ; private XExecutableDialog Diag = null ; - + public ExecThread(XExecutableDialog Diag) { this.Diag = Diag ; } - + public void run() { try { execRes = Diag.execute(); @@ -122,7 +122,7 @@ public class _XExecutableDialog extends MultiMethodTest { } } } - + /** * Sleeps for 5 sec. to allow StarOffice to react on <code> * reset</code> call. @@ -134,14 +134,14 @@ public class _XExecutableDialog extends MultiMethodTest { log.println("While waiting :" + e) ; } } - + public void after() { if (eThread.isAlive()) { log.println("Thread didn't die ... cleaning up"); disposeEnvironment(); } } - + private void closeDialog() { XCancellable canc = (XCancellable) UnoRuntime.queryInterface( XCancellable.class, tEnv.getTestObject()); @@ -151,19 +151,19 @@ public class _XExecutableDialog extends MultiMethodTest { } else { this.disposeEnvironment(); } - + long st = System.currentTimeMillis(); boolean toLong = false; - + log.println("waiting for dialog to close"); - + while (eThread.isAlive() && !toLong) { //wait for dialog to close toLong = (System.currentTimeMillis()-st > 10000); } - + log.println("done"); - + try { if (eThread.isAlive()) { log.println("Interrupting Thread"); @@ -173,23 +173,23 @@ public class _XExecutableDialog extends MultiMethodTest { } catch (Exception e) { // who cares ;-) } - + st = System.currentTimeMillis(); toLong = false; - + log.println("waiting for interruption to work"); - + while (eThread.isAlive() && !toLong) { //wait for dialog to close toLong = (System.currentTimeMillis()-st > 10000); } - + log.println("DialogThread alive: "+eThread.isAlive()); - + log.println("done"); - + } - + } diff --git a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePicker.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePicker.java index 45ceec2db964..732861a23590 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePicker.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePicker.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/ui/dialogs/_XFilePickerControlAccess.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerControlAccess.java index 07c5c3b93f6d..e09fd399f588 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerControlAccess.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerControlAccess.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/ui/dialogs/_XFilePickerNotifier.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java index f39ec63ee80d..7018260ca382 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.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 @@ -55,48 +55,48 @@ import com.sun.star.util.XCancellable; * @see com.sun.star.ui.XFilePickerNotifier */ public class _XFilePickerNotifier extends MultiMethodTest { - + public XFilePickerNotifier oObj = null; private XFilePicker fps = null ; private String dir1 = null, dir2 = null ; ExecThread eThread = null; - - + + /** * Listener implementation which sets a flag if some of its * methods was called. */ protected class TestListener implements XFilePickerListener { public boolean called = false ; - + public void dialogSizeChanged() { called = true; } - + public void fileSelectionChanged(FilePickerEvent e) { called = true; } - + public void directoryChanged(FilePickerEvent e) { log.println("***** Directory Changed *****"); called = true; } - + public String helpRequested(FilePickerEvent e) { called = true; return "help"; } - + public void controlStateChanged(FilePickerEvent e) { called = true; } - + public void disposing(EventObject e) {} } - + TestListener listener = new TestListener() ; - + /** * Tries to query object for <code>XFilePicker</code> interface, and * initializes two different URLs for changing file picker directory. <p> @@ -106,21 +106,21 @@ public class _XFilePickerNotifier extends MultiMethodTest { public void before() { fps = (XFilePicker) UnoRuntime.queryInterface (XFilePicker.class, oObj) ; - + if (fps == null) { log.println("The object doesnt implement XFilePicker") ; throw new StatusException(Status.failed ("The object doesnt implement XFilePicker")); } - + XExecutableDialog exD = (XExecutableDialog) UnoRuntime.queryInterface( XExecutableDialog.class, tEnv.getTestObject()); - + dir1 = util.utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF()); dir2 = util.utils.getFullTestURL(""); eThread = new ExecThread(exD); } - + /** * Adds a listener, then tries to change display directory and * checks if the listener was called. <p> @@ -128,7 +128,7 @@ public class _XFilePickerNotifier extends MultiMethodTest { */ public void _addFilePickerListener() { oObj.addFilePickerListener(listener) ; - + try { log.println("***** Setting DisplayDirectory to " + dir1); fps.setDisplayDirectory(dir1) ; @@ -137,23 +137,23 @@ public class _XFilePickerNotifier extends MultiMethodTest { log.println("***** Setting DisplayDirectory to " + dir2); fps.setDisplayDirectory(dir2) ; log.println("***** Getting: " + fps.getDisplayDirectory()); - + } catch(com.sun.star.lang.IllegalArgumentException e) { log.println("!!! Exception changing dir !!!") ; e.printStackTrace(log) ; } - + shortWait(); - + if (!listener.called) { log.println("Listener wasn't called :-("); } - + closeDialog(); - + tRes.tested("addFilePickerListener()", listener.called) ; } - + /** * Removes the listener and changes display directory. <p> * Has <b>OK</b> status if the listener wasn't called. <p> @@ -164,11 +164,11 @@ public class _XFilePickerNotifier extends MultiMethodTest { */ public void _removeFilePickerListener() { requiredMethod("addFilePickerListener()") ; - + oObj.removeFilePickerListener(listener) ; - + listener.called = false ; - + try { fps.setDisplayDirectory(dir1) ; openDialog(); @@ -177,27 +177,27 @@ public class _XFilePickerNotifier extends MultiMethodTest { log.println("!!! Exception changing dir !!!") ; e.printStackTrace(log) ; } - + shortWait(); - + closeDialog(); - + tRes.tested("removeFilePickerListener()", !listener.called) ; } - + /** * Calls <code>execute()</code> method in a separate thread. * Necessary to check if this method works */ protected class ExecThread extends Thread { - + public short execRes = (short) 17 ; private XExecutableDialog Diag = null ; - + public ExecThread(XExecutableDialog Diag) { this.Diag = Diag ; } - + public void run() { try { execRes = Diag.execute(); @@ -207,7 +207,7 @@ public class _XFilePickerNotifier extends MultiMethodTest { } } } - + /** * Sleeps for 0.5 sec. to allow StarOffice to react on <code> * reset</code> call. @@ -219,7 +219,7 @@ public class _XFilePickerNotifier extends MultiMethodTest { log.println("While waiting :" + e) ; } } - + private void closeDialog() { XCancellable canc = (XCancellable) UnoRuntime.queryInterface( XCancellable.class, tEnv.getTestObject()); @@ -229,19 +229,19 @@ public class _XFilePickerNotifier extends MultiMethodTest { } else { this.disposeEnvironment(); } - + long st = System.currentTimeMillis(); boolean toLong = false; - + log.println("waiting for dialog to close"); - + while (eThread.isAlive() && !toLong) { //wait for dialog to close toLong = (System.currentTimeMillis()-st > 10000); } - + log.println("done"); - + try { if (eThread.isAlive()) { log.println("Interrupting Thread"); @@ -251,38 +251,38 @@ public class _XFilePickerNotifier extends MultiMethodTest { } catch (Exception e) { // who cares ;-) } - + st = System.currentTimeMillis(); toLong = false; - + log.println("waiting for interruption to work"); - + while (eThread.isAlive() && !toLong) { //wait for dialog to close toLong = (System.currentTimeMillis()-st > 10000); } - + log.println("DialogThread alive: "+eThread.isAlive()); - - log.println("done"); - + + log.println("done"); + } - - private void openDialog() { + + private void openDialog() { log.println("Starting Dialog"); if (eThread.isAlive()) { log.println("second interrupt"); eThread.interrupt(); eThread.yield(); } - + XExecutableDialog exD = (XExecutableDialog) UnoRuntime.queryInterface( XExecutableDialog.class, tEnv.getTestObject()); - + dir1 = util.utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF()); dir2 = util.utils.getFullTestURL(""); - eThread = new ExecThread(exD); - + eThread = new ExecThread(exD); + eThread.start(); } } diff --git a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePreview.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePreview.java index 1a6565e38d96..b5701a504322 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePreview.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePreview.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/ui/dialogs/_XFilterGroupManager.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilterGroupManager.java index 3ef3df73aa64..fc199b4089f7 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilterGroupManager.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilterGroupManager.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/ui/dialogs/_XFilterManager.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilterManager.java index cc960d2b191b..38541aaed35d 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilterManager.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilterManager.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/ui/dialogs/_XFolderPicker.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XFolderPicker.java index 4b761e6dea65..502d6f2f750d 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XFolderPicker.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XFolderPicker.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 |