From b5ff94fde0cc506d9c3c17c2762101a0c7a657e4 Mon Sep 17 00:00:00 2001 From: Lars Langhans Date: Mon, 23 Aug 2010 10:38:44 +0200 Subject: sb123:#i111449# remove all subdirs in complex tests --- ucb/qa/complex/tdoc/CheckContentProvider.java | 10 - .../tdoc/CheckTransientDocumentsContent.java | 1 + .../CheckTransientDocumentsContentProvider.java | 3 +- .../CheckTransientDocumentsDocumentContent.java | 1 + ucb/qa/complex/tdoc/_XChild.java | 104 ++++++++ .../complex/tdoc/_XCommandInfoChangeNotifier.java | 64 +++++ ucb/qa/complex/tdoc/_XCommandProcessor.java | 286 +++++++++++++++++++++ ucb/qa/complex/tdoc/_XComponent.java | 171 ++++++++++++ ucb/qa/complex/tdoc/_XContent.java | 86 +++++++ .../complex/tdoc/_XPropertiesChangeNotifier.java | 67 +++++ ucb/qa/complex/tdoc/_XPropertyContainer.java | 102 ++++++++ .../tdoc/_XPropertySetInfoChangeNotifier.java | 67 +++++ ucb/qa/complex/tdoc/_XServiceInfo.java | 99 +++++++ ucb/qa/complex/tdoc/_XTypeProvider.java | 95 +++++++ ucb/qa/complex/tdoc/interfaces/_XChild.java | 104 -------- .../interfaces/_XCommandInfoChangeNotifier.java | 64 ----- .../tdoc/interfaces/_XCommandProcessor.java | 286 --------------------- ucb/qa/complex/tdoc/interfaces/_XComponent.java | 171 ------------ ucb/qa/complex/tdoc/interfaces/_XContent.java | 86 ------- .../interfaces/_XPropertiesChangeNotifier.java | 67 ----- .../tdoc/interfaces/_XPropertyContainer.java | 102 -------- .../_XPropertySetInfoChangeNotifier.java | 67 ----- ucb/qa/complex/tdoc/interfaces/_XServiceInfo.java | 99 ------- ucb/qa/complex/tdoc/interfaces/_XTypeProvider.java | 95 ------- ucb/qa/complex/tdoc/makefile.mk | 16 +- 25 files changed, 1156 insertions(+), 1157 deletions(-) create mode 100755 ucb/qa/complex/tdoc/_XChild.java create mode 100755 ucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java create mode 100755 ucb/qa/complex/tdoc/_XCommandProcessor.java create mode 100755 ucb/qa/complex/tdoc/_XComponent.java create mode 100755 ucb/qa/complex/tdoc/_XContent.java create mode 100755 ucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java create mode 100755 ucb/qa/complex/tdoc/_XPropertyContainer.java create mode 100755 ucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java create mode 100755 ucb/qa/complex/tdoc/_XServiceInfo.java create mode 100755 ucb/qa/complex/tdoc/_XTypeProvider.java delete mode 100755 ucb/qa/complex/tdoc/interfaces/_XChild.java delete mode 100755 ucb/qa/complex/tdoc/interfaces/_XCommandInfoChangeNotifier.java delete mode 100755 ucb/qa/complex/tdoc/interfaces/_XCommandProcessor.java delete mode 100755 ucb/qa/complex/tdoc/interfaces/_XComponent.java delete mode 100755 ucb/qa/complex/tdoc/interfaces/_XContent.java delete mode 100755 ucb/qa/complex/tdoc/interfaces/_XPropertiesChangeNotifier.java delete mode 100755 ucb/qa/complex/tdoc/interfaces/_XPropertyContainer.java delete mode 100755 ucb/qa/complex/tdoc/interfaces/_XPropertySetInfoChangeNotifier.java delete mode 100755 ucb/qa/complex/tdoc/interfaces/_XServiceInfo.java delete mode 100755 ucb/qa/complex/tdoc/interfaces/_XTypeProvider.java (limited to 'ucb/qa/complex') diff --git a/ucb/qa/complex/tdoc/CheckContentProvider.java b/ucb/qa/complex/tdoc/CheckContentProvider.java index d3dfd120611e..a039c0c14e87 100755 --- a/ucb/qa/complex/tdoc/CheckContentProvider.java +++ b/ucb/qa/complex/tdoc/CheckContentProvider.java @@ -42,16 +42,6 @@ import com.sun.star.ucb.XContentIdentifier; import com.sun.star.ucb.XContentIdentifierFactory; import com.sun.star.ucb.XContentProvider; import com.sun.star.uno.UnoRuntime; -import complex.tdoc.interfaces._XChild; -import complex.tdoc.interfaces._XCommandInfoChangeNotifier; -import complex.tdoc.interfaces._XComponent; -import complex.tdoc.interfaces._XServiceInfo; -import complex.tdoc.interfaces._XTypeProvider; -import complex.tdoc.interfaces._XCommandProcessor; -import complex.tdoc.interfaces._XContent; -import complex.tdoc.interfaces._XPropertiesChangeNotifier; -import complex.tdoc.interfaces._XPropertyContainer; -import complex.tdoc.interfaces._XPropertySetInfoChangeNotifier; import util.WriterTools; import org.junit.After; diff --git a/ucb/qa/complex/tdoc/CheckTransientDocumentsContent.java b/ucb/qa/complex/tdoc/CheckTransientDocumentsContent.java index 3320ef890841..ed121e92f9f1 100755 --- a/ucb/qa/complex/tdoc/CheckTransientDocumentsContent.java +++ b/ucb/qa/complex/tdoc/CheckTransientDocumentsContent.java @@ -51,6 +51,7 @@ import static org.junit.Assert.*; * */ public class CheckTransientDocumentsContent { + // TODO: document doesn't exists private final String testDocuments[] = new String[]{"sForm.sxw"};//, "chinese.sxw", "Iterator.sxw"}; private final int countDocs = testDocuments.length; private XMultiServiceFactory xMSF = null; diff --git a/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java b/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java index 9d3ea87b1d4a..d5aebc7fc3cd 100755 --- a/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java +++ b/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java @@ -56,7 +56,8 @@ import static org.junit.Assert.*; * */ public class CheckTransientDocumentsContentProvider { - private final String testDocuments[] = new String[]{"sForm.sxw", "chinese.sxw", "Iterator.sxw"}; + // TODO: document doesn't exists + private final String testDocuments[] = new String[]{/*"sForm.sxw",*/ "chinese.sxw", "Iterator.sxw"}; private final int countDocs = testDocuments.length; private XMultiServiceFactory xMSF = null; private XTextDocument[] xTextDoc = null; diff --git a/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java b/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java index ad0001161c49..30411458daee 100755 --- a/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java +++ b/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java @@ -59,6 +59,7 @@ import static org.junit.Assert.*; * */ public class CheckTransientDocumentsDocumentContent { + // TODO: document doesn't exists private final String testDocuments = "sForm.sxw"; private final String folderName = "TestFolder"; private XMultiServiceFactory xMSF = null; diff --git a/ucb/qa/complex/tdoc/_XChild.java b/ucb/qa/complex/tdoc/_XChild.java new file mode 100755 index 000000000000..4ed71e62008a --- /dev/null +++ b/ucb/qa/complex/tdoc/_XChild.java @@ -0,0 +1,104 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.tdoc; + +import lib.MultiMethodTest; +import lib.Status; + +import com.sun.star.container.XChild; +import com.sun.star.container.XNamed; +import com.sun.star.uno.UnoRuntime; +import share.LogWriter; + +/* +* Testing com.sun.star.container.XChild +* interface methods : +* +* @see com.sun.star.container.XChild +*/ +public class _XChild { + + public XChild oObj = null; + public Object gotten = null; + public LogWriter log = null; + + + /** + * Test calls the method and checks return value and that + * no exceptions were thrown. Parent returned is stored.

+ * Has OK status if the method returns not null value + * and no exceptions were thrown.

+ */ + public boolean _getParent(boolean hasParent) { + gotten = oObj.getParent(); + if (!hasParent) + return gotten == null; + XNamed the_name = (XNamed) UnoRuntime.queryInterface(XNamed.class,gotten); + if (the_name != null) + log.println("Parent:"+the_name.getName()); + return gotten != null; + } + + /** + * Sets existing parent and checks that + * no exceptions were thrown.

+ * Has OK status if no exceptions were thrown.

+ * The following method tests are to be completed successfully before : + *

+ */ + public boolean _setParent(boolean supported) { +// requiredMethod("getParent()") ; + + String parentComment = null;//String) tEnv.getObjRelation("cannotSwitchParent"); + + if (parentComment != null) { + log.println(parentComment); + return true; + } + + try { + oObj.setParent(gotten); + } + catch (com.sun.star.lang.NoSupportException ex) { + log.println("Exception occured during setParent() - " + (supported?"FAILED":"OK")); + if (supported) { + ex.printStackTrace((java.io.PrintWriter)log); + return false; + } + } + return true; + } + +} // finish class _XChild + + diff --git a/ucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java b/ucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java new file mode 100755 index 000000000000..ab32873e9ffb --- /dev/null +++ b/ucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java @@ -0,0 +1,64 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package complex.tdoc; + +import com.sun.star.ucb.XCommandInfoChangeListener; +import com.sun.star.ucb.XCommandInfoChangeNotifier; +import share.LogWriter; + +/** + * + */ +public class _XCommandInfoChangeNotifier { + public XCommandInfoChangeNotifier oObj = null; + public LogWriter log = null; + private CommandInfoChangeListener listener = new CommandInfoChangeListener(); + + public boolean _addCommandInfoChangeListener() { + oObj.addCommandInfoChangeListener(listener); + return true; + } + + public boolean _removeCommandInfoChangeListener() { + oObj.removeCommandInfoChangeListener(listener); + return true; + } + + private class CommandInfoChangeListener implements XCommandInfoChangeListener { + boolean disposing = false; + boolean infoChanged = false; + + public void commandInfoChange(com.sun.star.ucb.CommandInfoChangeEvent commandInfoChangeEvent) { + infoChanged = true; + } + + public void disposing(com.sun.star.lang.EventObject eventObject) { + disposing = true; + } + + } +} diff --git a/ucb/qa/complex/tdoc/_XCommandProcessor.java b/ucb/qa/complex/tdoc/_XCommandProcessor.java new file mode 100755 index 000000000000..92411d05456f --- /dev/null +++ b/ucb/qa/complex/tdoc/_XCommandProcessor.java @@ -0,0 +1,286 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.tdoc; + +import com.sun.star.beans.Property; +import com.sun.star.beans.XPropertySetInfo; +import lib.MultiMethodTest; +import lib.StatusException; + +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.ucb.Command; +import com.sun.star.ucb.CommandAbortedException; +import com.sun.star.ucb.CommandInfo; +import com.sun.star.ucb.GlobalTransferCommandArgument; +import com.sun.star.ucb.NameClash; +import com.sun.star.ucb.TransferCommandOperation; +import com.sun.star.ucb.UnsupportedCommandException; +import com.sun.star.ucb.XCommandInfo; +import com.sun.star.ucb.XCommandProcessor; +import com.sun.star.uno.Exception; +import com.sun.star.uno.UnoRuntime; +import share.LogWriter; + +/** +* Tests XCommandProcessor. The TestCase can pass (but doesn't have +* to) "XCommandProcessor.AbortCommand" relation, to specify command to abort in +* abort() test. +* +* Testing com.sun.star.ucb.XCommandProcessor +* interface methods : +*
    +*
  • createCommandIdentifier()
  • +*
  • execute()
  • +*
  • abort()
  • +*

+* This test needs the following object relations : +*

    +*
  • 'XCommandProcessor.AbortCommand' optional +* (of type com.sun.star.ucb.Command): +* specify command to abort in abort() test. +* If the relation is not specified the 'GlobalTransfer' +* command is used.
  • +*

      +* The following predefined files needed to complete the test: +*

        +*
      • poliball.gif : this file is required in case +* if the relation 'XCommandProcessor.AbortCommand' +* is not specified. This file is used by 'GlobalTransfer' +* command as a source file for copying.
      • +*

          +* Test is NOT multithread compilant.

          +* @see com.sun.star.ucb.XCommandProcessor +*/ +public class _XCommandProcessor { + + /** + * Conatins the tested object. + */ + public XCommandProcessor oObj; + public LogWriter log = null; + private XMultiServiceFactory xMSF = null; + + /** + * Contains the command id returned by createCommandIdentifier() + * . It is used in abort() test. + */ + int cmdId; + + public void before(XMultiServiceFactory _xMSF) { + xMSF = _xMSF; + } + + /** + * Tests createCommandIdentifier(). Calls it for two times + * and checks returned values.

          + * Has OK status if values are unique correct idenifiers: not 0. + */ + public boolean _createCommandIdentifier() { + log.println("creating a command line identifier"); + + int testCmdId = oObj.createCommandIdentifier(); + cmdId = oObj.createCommandIdentifier(); + + if (cmdId == 0 || testCmdId == 0) { + log.println("createCommandLineIdentifier() returned 0 - FAILED"); + } + + if (cmdId == testCmdId) { + log.println("the command identifier is not unique"); + } + + return testCmdId != 0 && cmdId != 0 && cmdId != testCmdId; + } + + /** + * First executes 'geCommandInfo' command and examines returned + * command info information. Second tries to execute inproper + * command.

          + * Has OK status if in the first case returned information + * contains info about 'getCommandInfo' command and in the second + * case an exception is thrown.

          + */ + public boolean _execute() { + String[]commands = new String[] {"getCommandInfo", "getPropertySetInfo"}; + boolean returnVal = true; + for (int j=0; jabort method + * is called permanently. Then a "long" command (for example, + * "transfer") is started. I case if relation is not + * specified 'GlobalTransfer' command starts to + * copy a file to temporary directory (if the relation is present + * then the its command starts to work).

          + * Has OK status if the command execution is aborted, i.e. + * CommandAbortedException is thrown.

          + * The following method tests are to be completed successfully before : + *

            + *
          • createCommandIdentifier() : to have a unique + * identifier which is used to abourt started command.
          • + *
          + */ + public boolean _abort() { + //executeMethod("createCommandIdentifier()"); + +// Command command = null;//(Command)tEnv.getObjRelation( + //"XCommandProcessor.AbortCommand"); + Command command = new Command("getCommandInfo", -1, null); + + if (command == null) { + String commandName = "globalTransfer"; + + String srcURL = util.utils.getFullTestURL("solibrary.jar") ; + String tmpURL = util.utils.getOfficeTemp(xMSF) ; + log.println("Copying '" + srcURL + "' to '" + tmpURL) ; + + GlobalTransferCommandArgument arg = new + GlobalTransferCommandArgument( + TransferCommandOperation.COPY, srcURL, + tmpURL, "", NameClash.OVERWRITE); + + command = new Command(commandName, -1, arg); + } + + Thread aborter = new Thread() { + public void run() { + for (int i = 0; i < 10; i++) { + log.println("try to abort command"); + oObj.abort(cmdId); + try { + Thread.sleep(10); + } catch (InterruptedException e) { + } + } + } + }; + + aborter.start(); + + try { + Thread.sleep(15); + } catch (InterruptedException e) { + } + + log.println("executing command"); + try { + oObj.execute(command, cmdId, null); + log.println("Command execution completed"); + log.println("CommandAbortedException is not thrown"); + log.println("This is OK since there is no command implemented "+ + "that can be aborted"); + } catch (CommandAbortedException e) { + return true; + } catch (Exception e) { + log.println("Unexpected exception " + e.getMessage()); + e.printStackTrace((java.io.PrintWriter)log); + return false; + } + + try { + aborter.join(5000); + aborter.interrupt(); + } catch(java.lang.InterruptedException e) { + } + return true; + } +} diff --git a/ucb/qa/complex/tdoc/_XComponent.java b/ucb/qa/complex/tdoc/_XComponent.java new file mode 100755 index 000000000000..16d5c9bebeea --- /dev/null +++ b/ucb/qa/complex/tdoc/_XComponent.java @@ -0,0 +1,171 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.tdoc; + +import com.sun.star.container.XNameContainer; +import lib.MultiMethodTest; + +import com.sun.star.frame.XDesktop; +import com.sun.star.lang.EventObject; +import com.sun.star.lang.XComponent; +import com.sun.star.lang.XEventListener; +import share.LogWriter; + +/** +* Testing com.sun.star.lang.XComponent +* interface methods : +*
            +*
          • dispose()
          • +*
          • addEventListener()
          • +*
          • removeEventListener()
          • +*
          +* After this interface test object must be recreated.

          +* Multithreaded test ability not implemented yet. +* @see com.sun.star.lang.XComponent +*/ +public class _XComponent { + + public static XComponent oObj = null; + private XNameContainer xContainer = null; + private XComponent altDispose = null; + public LogWriter log = null; + + boolean listenerDisposed[] = new boolean[2]; + String[] Loutput = new String[2]; + + /** + * Listener which added but not removed, and its method must be called + * on dispose call. + */ + public class MyEventListener implements XEventListener { + public void disposing ( EventObject oEvent ) { + Loutput[0] = Thread.currentThread() + " is DISPOSING EV1" + this; + listenerDisposed[0] = true; + } + }; + + /** + * Listener which added and then removed, and its method must not + * be called on dispose call. + */ + public class MyEventListener2 implements XEventListener { + public void disposing ( EventObject oEvent ) { + Loutput[0] = Thread.currentThread() + " is DISPOSING EV2" + this; + listenerDisposed[1] = true; + } + }; + + XEventListener listener1 = new MyEventListener(); + XEventListener listener2 = new MyEventListener2(); + + /** + * For the cfgmgr2.OSetElement tests: dispose the owner element. + */ + protected void before() { + // do not dispose this component, but parent instead +// altDispose = (XComponent)tEnv.getObjRelation("XComponent.DisposeThis"); + + } + + /** + * Adds two listeners.

          + * Has OK status if then the first listener will receive an event + * on dispose method call. + */ + public boolean _addEventListener() { + + listenerDisposed[0] = false; + listenerDisposed[1] = false; + + oObj.addEventListener( listener1 ); + oObj.addEventListener( listener2 ); + + return true; + } // finished _addEventListener() + + /** + * Removes the second of two added listeners.

          + * Method tests to be completed successfully : + *

            + *
          • addEventListener : method must add two listeners.
          • + *

          + * Has OK status if no events will be sent to the second listener on + * dispose method call. + */ + public boolean _removeEventListener() { +// executeMethod("addEventListener()"); + if (disposed) return true; + // the second listener should not be called + oObj.removeEventListener( listener2 ); + log.println(Thread.currentThread() + " is removing EL " + listener2); + return true; + } // finished _removeEventListener() + + static boolean disposed = false; + + /** + * Disposes the object and then check appropriate listeners were + * called or not.

          + * Method tests to be completed successfully : + *

            + *
          • removeEventListener : method must remove one of two + * listeners.
          • + *

          + * Has OK status if liseter removed wasn't called and other listener + * was. + */ + public boolean _dispose() { + disposed = false; +// executeMethod("removeEventListener()"); + + log.println( "begin dispose" + Thread.currentThread()); + oObj.dispose(); + + try { + Thread.sleep(500) ; + } catch (InterruptedException e) {} + if (Loutput[0]!=null) log.println(Loutput[0]); + if (Loutput[1]!=null) log.println(Loutput[1]); + log.println( "end dispose" + Thread.currentThread()); + disposed = true; + + // check that dispose() works OK. + return listenerDisposed[0] && !listenerDisposed[1]; + + } // finished _dispose() + + /** + * Forces object recreation. + */ + protected void after() { +// disposeEnvironment(); + } + +} // finished class _XComponent + + diff --git a/ucb/qa/complex/tdoc/_XContent.java b/ucb/qa/complex/tdoc/_XContent.java new file mode 100755 index 000000000000..820d2cef0fc7 --- /dev/null +++ b/ucb/qa/complex/tdoc/_XContent.java @@ -0,0 +1,86 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package complex.tdoc; + +import com.sun.star.ucb.XContent; +import com.sun.star.ucb.XContentEventListener; +import com.sun.star.ucb.XContentIdentifier; +import share.LogWriter; + +/** + * + * @author sg128468 + */ +public class _XContent { + public XContent oObj = null; + public LogWriter log = null; + private ContentListener listener = null; + + public boolean _addContentEventListener() { + listener = new ContentListener(); + oObj.addContentEventListener(listener); + return true; + } + public boolean _getContentType() { + String type = oObj.getContentType(); + log.println("Type: " + type); + return type != null && type.indexOf("vnd.sun.star.tdoc") != -1; + } + public boolean _getIdentifier() { + XContentIdentifier xIdent = oObj.getIdentifier(); + String id = xIdent.getContentIdentifier(); + String scheme = xIdent.getContentProviderScheme(); + log.println("Id: " + id); + log.println("Scheme: " + scheme); + return id != null && scheme != null && id.indexOf("vnd.sun.star.tdoc") != -1 && scheme.indexOf("vnd.sun.star.tdoc") != -1; + } + public boolean _removeContentEventListener() { + System.out.println("Event: " + (listener.disposed || listener.firedEvent)); + oObj.removeContentEventListener(listener); + return true; + } + + + private class ContentListener implements XContentEventListener { + private boolean disposed = false; + private boolean firedEvent = false; + + public void reset() { + disposed = false; + firedEvent = false; + } + + public void contentEvent(com.sun.star.ucb.ContentEvent contentEvent) { + firedEvent = true; + } + + public void disposing(com.sun.star.lang.EventObject eventObject) { + disposed = true; + } + + } +} diff --git a/ucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java b/ucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java new file mode 100755 index 000000000000..88e080cd9ec2 --- /dev/null +++ b/ucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java @@ -0,0 +1,67 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package complex.tdoc; + +import com.sun.star.beans.XPropertiesChangeListener; +import com.sun.star.beans.XPropertiesChangeNotifier; +import share.LogWriter; + +/** + * Check the XPropertiesChangeNotifier + */ +public class _XPropertiesChangeNotifier { + public XPropertiesChangeNotifier oObj = null; + public LogWriter log = null; + + PropertiesChangeListener listener = new PropertiesChangeListener(); + String[] args = null; + + + public boolean _addPropertiesChangeListener() { + oObj.addPropertiesChangeListener(args, listener); + return true; + } + + public boolean _removePropertiesChangeListener() { + oObj.removePropertiesChangeListener(args, listener); + return true; + } + + private class PropertiesChangeListener implements XPropertiesChangeListener { + public boolean disposed = false; + public boolean propChanged = false; + + public void disposing(com.sun.star.lang.EventObject eventObject) { + disposed = true; + } + + public void propertiesChange(com.sun.star.beans.PropertyChangeEvent[] propertyChangeEvent) { + propChanged = true; + } + + } +} diff --git a/ucb/qa/complex/tdoc/_XPropertyContainer.java b/ucb/qa/complex/tdoc/_XPropertyContainer.java new file mode 100755 index 000000000000..e425a703d403 --- /dev/null +++ b/ucb/qa/complex/tdoc/_XPropertyContainer.java @@ -0,0 +1,102 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package complex.tdoc; + +import com.sun.star.beans.XPropertyContainer; +import share.LogWriter; + +/** + * + * @author sg128468 + */ +public class _XPropertyContainer { + public XPropertyContainer oObj = null; + public LogWriter log = null; + + public boolean _addProperty() { + boolean result = true; + // add illegal property + try { + oObj.addProperty("MyIllegalProperty", (short)0, null); + } + catch(com.sun.star.beans.PropertyExistException e) { + e.printStackTrace((java.io.PrintWriter)log); + result = false; + } + catch(com.sun.star.lang.IllegalArgumentException e) { + e.printStackTrace((java.io.PrintWriter)log); + log.println("'IllegalArgument' Unexpected but correct."); + } + catch(com.sun.star.beans.IllegalTypeException e) { + log.println("'IllegalType' Correctly thrown"); + } + // add valid property + try { + oObj.addProperty("MyLegalProperty", (short)0, "Just a value"); + } + catch(com.sun.star.beans.PropertyExistException e) { + e.printStackTrace((java.io.PrintWriter)log); + result = false; + } + catch(com.sun.star.lang.IllegalArgumentException e) { + e.printStackTrace((java.io.PrintWriter)log); + result = false; + } + catch(com.sun.star.beans.IllegalTypeException e) { + e.printStackTrace((java.io.PrintWriter)log); + result = false; + } + return result; + } + + public boolean _removeProperty() { + boolean result = true; + try { + oObj.removeProperty("MyIllegalProperty"); + } + catch(com.sun.star.beans.UnknownPropertyException e) { + log.println("'UnknownProperty' Correctly thrown"); + } + catch(com.sun.star.beans.NotRemoveableException e) { + e.printStackTrace((java.io.PrintWriter)log); + result = false; + } + try { + oObj.removeProperty("MyLegalProperty"); + } + catch(com.sun.star.beans.UnknownPropertyException e) { + e.printStackTrace((java.io.PrintWriter)log); + result = false; + } + catch(com.sun.star.beans.NotRemoveableException e) { + e.printStackTrace((java.io.PrintWriter)log); + result = false; + } + return result; + } + +} diff --git a/ucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java b/ucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java new file mode 100755 index 000000000000..4671a0d21571 --- /dev/null +++ b/ucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java @@ -0,0 +1,67 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package complex.tdoc; + +import com.sun.star.beans.XPropertySetInfoChangeListener; +import com.sun.star.beans.XPropertySetInfoChangeNotifier; +import share.LogWriter; + +/** + * + */ +public class _XPropertySetInfoChangeNotifier { + public XPropertySetInfoChangeNotifier oObj = null; + public LogWriter log = null; + + PropertySetInfoChangeListener listener = new PropertySetInfoChangeListener(); + String[] args = null; + + + public boolean _addPropertiesChangeListener() { + oObj.addPropertySetInfoChangeListener(listener); + return true; + } + + public boolean _removePropertiesChangeListener() { + oObj.removePropertySetInfoChangeListener(listener); + return true; + } + + private class PropertySetInfoChangeListener implements XPropertySetInfoChangeListener { + public boolean disposed = false; + public boolean propChanged = false; + + public void disposing(com.sun.star.lang.EventObject eventObject) { + disposed = true; + } + + public void propertySetInfoChange(com.sun.star.beans.PropertySetInfoChangeEvent propertySetInfoChangeEvent) { + } + + } + +} diff --git a/ucb/qa/complex/tdoc/_XServiceInfo.java b/ucb/qa/complex/tdoc/_XServiceInfo.java new file mode 100755 index 000000000000..9c2089f212f9 --- /dev/null +++ b/ucb/qa/complex/tdoc/_XServiceInfo.java @@ -0,0 +1,99 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.tdoc; + +import lib.MultiMethodTest; + +import com.sun.star.lang.XServiceInfo; +import share.LogWriter; + +/** +* Testing com.sun.star.lang.XServiceInfo +* interface methods : +*

            +*
          • getImplementationName()
          • +*
          • supportsService()
          • +*
          • getSupportedServiceNames()
          • +*

          +* Test is multithread compilant.

          +* @see com.sun.star.lang.XServiceInfo +*/ +public class _XServiceInfo { + public static XServiceInfo oObj = null; + public static String[] names = null; + public LogWriter log = null; + + /** + * Just calls the method.

          + * Has OK status if no runtime exceptions occured. + */ + public boolean _getImplementationName() { + boolean result = true; + log.println("testing getImplementationName() ... "); + + log.println("The ImplementationName ist "+oObj.getImplementationName()); + result=true; + + return result; + + } // end getImplementationName() + + + /** + * Just calls the method.

          + * Has OK status if no runtime exceptions occured. + */ + public boolean _getSupportedServiceNames() { + boolean result = true; + log.println("getting supported Services..."); + names = oObj.getSupportedServiceNames(); + for (int i=0;igetSupportedServiceNames method and + * calls the supportsService methos with this + * name.

          + * Has OK status if true value is + * returned. + */ + public boolean _supportsService() { + log.println("testing supportsService"); + names = oObj.getSupportedServiceNames(); + return oObj.supportsService(names[0]); + } // end supportsService() +} + diff --git a/ucb/qa/complex/tdoc/_XTypeProvider.java b/ucb/qa/complex/tdoc/_XTypeProvider.java new file mode 100755 index 000000000000..f8247e7016fe --- /dev/null +++ b/ucb/qa/complex/tdoc/_XTypeProvider.java @@ -0,0 +1,95 @@ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package complex.tdoc; + +import lib.MultiMethodTest; + +import com.sun.star.lang.XTypeProvider; +import com.sun.star.uno.Type; +import share.LogWriter; + +/** +* Testing com.sun.star.lang.XTypeProvider +* interface methods : +*

            +*
          • getTypes()
          • +*
          • getImplementationId()
          • +*

          +* Test is NOT multithread compilant.

          +* @see com.sun.star.lang.XTypeProvider +*/ +public class _XTypeProvider { + + public static XTypeProvider oObj = null; + public static Type[] types = null; + public LogWriter log = null; + + /** + * Just calls the method.

          + * Has OK status if no runtime exceptions occured. + */ + public boolean _getImplementationId() { + boolean result = true; + log.println("testing getImplementationId() ... "); + + log.println("The ImplementationId is "+oObj.getImplementationId()); + result = true; + + return result; + + } // end getImplementationId() + + + /** + * ?alls the method and checks the return value.

          + * Has OK status if one of the return value equals to the + * type com.sun.star.lang.XTypeProvider. + */ + public boolean _getTypes() { + boolean result = false; + log.println("getting Types..."); + types = oObj.getTypes(); + for (int i=0;i"); + } + + return result; + + } // end getTypes() + +} + diff --git a/ucb/qa/complex/tdoc/interfaces/_XChild.java b/ucb/qa/complex/tdoc/interfaces/_XChild.java deleted file mode 100755 index 351fc6f84aa1..000000000000 --- a/ucb/qa/complex/tdoc/interfaces/_XChild.java +++ /dev/null @@ -1,104 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.tdoc.interfaces; - -import lib.MultiMethodTest; -import lib.Status; - -import com.sun.star.container.XChild; -import com.sun.star.container.XNamed; -import com.sun.star.uno.UnoRuntime; -import share.LogWriter; - -/* -* Testing com.sun.star.container.XChild -* interface methods : -*

            -*
          • getParent()
          • -*
          • setParent()
          • -*
          -* @see com.sun.star.container.XChild -*/ -public class _XChild { - - public XChild oObj = null; - public Object gotten = null; - public LogWriter log = null; - - - /** - * Test calls the method and checks return value and that - * no exceptions were thrown. Parent returned is stored.

          - * Has OK status if the method returns not null value - * and no exceptions were thrown.

          - */ - public boolean _getParent(boolean hasParent) { - gotten = oObj.getParent(); - if (!hasParent) - return gotten == null; - XNamed the_name = (XNamed) UnoRuntime.queryInterface(XNamed.class,gotten); - if (the_name != null) - log.println("Parent:"+the_name.getName()); - return gotten != null; - } - - /** - * Sets existing parent and checks that - * no exceptions were thrown.

          - * Has OK status if no exceptions were thrown.

          - * The following method tests are to be completed successfully before : - *

            - *
          • getParent() : to get the parent.
          • - *
          - */ - public boolean _setParent(boolean supported) { -// requiredMethod("getParent()") ; - - String parentComment = null;//String) tEnv.getObjRelation("cannotSwitchParent"); - - if (parentComment != null) { - log.println(parentComment); - return true; - } - - try { - oObj.setParent(gotten); - } - catch (com.sun.star.lang.NoSupportException ex) { - log.println("Exception occured during setParent() - " + (supported?"FAILED":"OK")); - if (supported) { - ex.printStackTrace((java.io.PrintWriter)log); - return false; - } - } - return true; - } - -} // finish class _XChild - - diff --git a/ucb/qa/complex/tdoc/interfaces/_XCommandInfoChangeNotifier.java b/ucb/qa/complex/tdoc/interfaces/_XCommandInfoChangeNotifier.java deleted file mode 100755 index 9800c5c0a398..000000000000 --- a/ucb/qa/complex/tdoc/interfaces/_XCommandInfoChangeNotifier.java +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package complex.tdoc.interfaces; - -import com.sun.star.ucb.XCommandInfoChangeListener; -import com.sun.star.ucb.XCommandInfoChangeNotifier; -import share.LogWriter; - -/** - * - */ -public class _XCommandInfoChangeNotifier { - public XCommandInfoChangeNotifier oObj = null; - public LogWriter log = null; - private CommandInfoChangeListener listener = new CommandInfoChangeListener(); - - public boolean _addCommandInfoChangeListener() { - oObj.addCommandInfoChangeListener(listener); - return true; - } - - public boolean _removeCommandInfoChangeListener() { - oObj.removeCommandInfoChangeListener(listener); - return true; - } - - private class CommandInfoChangeListener implements XCommandInfoChangeListener { - boolean disposing = false; - boolean infoChanged = false; - - public void commandInfoChange(com.sun.star.ucb.CommandInfoChangeEvent commandInfoChangeEvent) { - infoChanged = true; - } - - public void disposing(com.sun.star.lang.EventObject eventObject) { - disposing = true; - } - - } -} diff --git a/ucb/qa/complex/tdoc/interfaces/_XCommandProcessor.java b/ucb/qa/complex/tdoc/interfaces/_XCommandProcessor.java deleted file mode 100755 index 2fc31a4bd586..000000000000 --- a/ucb/qa/complex/tdoc/interfaces/_XCommandProcessor.java +++ /dev/null @@ -1,286 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.tdoc.interfaces; - -import com.sun.star.beans.Property; -import com.sun.star.beans.XPropertySetInfo; -import lib.MultiMethodTest; -import lib.StatusException; - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.ucb.Command; -import com.sun.star.ucb.CommandAbortedException; -import com.sun.star.ucb.CommandInfo; -import com.sun.star.ucb.GlobalTransferCommandArgument; -import com.sun.star.ucb.NameClash; -import com.sun.star.ucb.TransferCommandOperation; -import com.sun.star.ucb.UnsupportedCommandException; -import com.sun.star.ucb.XCommandInfo; -import com.sun.star.ucb.XCommandProcessor; -import com.sun.star.uno.Exception; -import com.sun.star.uno.UnoRuntime; -import share.LogWriter; - -/** -* Tests XCommandProcessor. The TestCase can pass (but doesn't have -* to) "XCommandProcessor.AbortCommand" relation, to specify command to abort in -* abort() test. -* -* Testing com.sun.star.ucb.XCommandProcessor -* interface methods : -*
            -*
          • createCommandIdentifier()
          • -*
          • execute()
          • -*
          • abort()
          • -*

          -* This test needs the following object relations : -*

            -*
          • 'XCommandProcessor.AbortCommand' optional -* (of type com.sun.star.ucb.Command): -* specify command to abort in abort() test. -* If the relation is not specified the 'GlobalTransfer' -* command is used.
          • -*

              -* The following predefined files needed to complete the test: -*

                -*
              • poliball.gif : this file is required in case -* if the relation 'XCommandProcessor.AbortCommand' -* is not specified. This file is used by 'GlobalTransfer' -* command as a source file for copying.
              • -*

                  -* Test is NOT multithread compilant.

                  -* @see com.sun.star.ucb.XCommandProcessor -*/ -public class _XCommandProcessor { - - /** - * Conatins the tested object. - */ - public XCommandProcessor oObj; - public LogWriter log = null; - private XMultiServiceFactory xMSF = null; - - /** - * Contains the command id returned by createCommandIdentifier() - * . It is used in abort() test. - */ - int cmdId; - - public void before(XMultiServiceFactory _xMSF) { - xMSF = _xMSF; - } - - /** - * Tests createCommandIdentifier(). Calls it for two times - * and checks returned values.

                  - * Has OK status if values are unique correct idenifiers: not 0. - */ - public boolean _createCommandIdentifier() { - log.println("creating a command line identifier"); - - int testCmdId = oObj.createCommandIdentifier(); - cmdId = oObj.createCommandIdentifier(); - - if (cmdId == 0 || testCmdId == 0) { - log.println("createCommandLineIdentifier() returned 0 - FAILED"); - } - - if (cmdId == testCmdId) { - log.println("the command identifier is not unique"); - } - - return testCmdId != 0 && cmdId != 0 && cmdId != testCmdId; - } - - /** - * First executes 'geCommandInfo' command and examines returned - * command info information. Second tries to execute inproper - * command.

                  - * Has OK status if in the first case returned information - * contains info about 'getCommandInfo' command and in the second - * case an exception is thrown.

                  - */ - public boolean _execute() { - String[]commands = new String[] {"getCommandInfo", "getPropertySetInfo"}; - boolean returnVal = true; - for (int j=0; jabort method - * is called permanently. Then a "long" command (for example, - * "transfer") is started. I case if relation is not - * specified 'GlobalTransfer' command starts to - * copy a file to temporary directory (if the relation is present - * then the its command starts to work).

                  - * Has OK status if the command execution is aborted, i.e. - * CommandAbortedException is thrown.

                  - * The following method tests are to be completed successfully before : - *

                    - *
                  • createCommandIdentifier() : to have a unique - * identifier which is used to abourt started command.
                  • - *
                  - */ - public boolean _abort() { - //executeMethod("createCommandIdentifier()"); - -// Command command = null;//(Command)tEnv.getObjRelation( - //"XCommandProcessor.AbortCommand"); - Command command = new Command("getCommandInfo", -1, null); - - if (command == null) { - String commandName = "globalTransfer"; - - String srcURL = util.utils.getFullTestURL("solibrary.jar") ; - String tmpURL = util.utils.getOfficeTemp(xMSF) ; - log.println("Copying '" + srcURL + "' to '" + tmpURL) ; - - GlobalTransferCommandArgument arg = new - GlobalTransferCommandArgument( - TransferCommandOperation.COPY, srcURL, - tmpURL, "", NameClash.OVERWRITE); - - command = new Command(commandName, -1, arg); - } - - Thread aborter = new Thread() { - public void run() { - for (int i = 0; i < 10; i++) { - log.println("try to abort command"); - oObj.abort(cmdId); - try { - Thread.sleep(10); - } catch (InterruptedException e) { - } - } - } - }; - - aborter.start(); - - try { - Thread.sleep(15); - } catch (InterruptedException e) { - } - - log.println("executing command"); - try { - oObj.execute(command, cmdId, null); - log.println("Command execution completed"); - log.println("CommandAbortedException is not thrown"); - log.println("This is OK since there is no command implemented "+ - "that can be aborted"); - } catch (CommandAbortedException e) { - return true; - } catch (Exception e) { - log.println("Unexpected exception " + e.getMessage()); - e.printStackTrace((java.io.PrintWriter)log); - return false; - } - - try { - aborter.join(5000); - aborter.interrupt(); - } catch(java.lang.InterruptedException e) { - } - return true; - } -} diff --git a/ucb/qa/complex/tdoc/interfaces/_XComponent.java b/ucb/qa/complex/tdoc/interfaces/_XComponent.java deleted file mode 100755 index 1716e51d1358..000000000000 --- a/ucb/qa/complex/tdoc/interfaces/_XComponent.java +++ /dev/null @@ -1,171 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.tdoc.interfaces; - -import com.sun.star.container.XNameContainer; -import lib.MultiMethodTest; - -import com.sun.star.frame.XDesktop; -import com.sun.star.lang.EventObject; -import com.sun.star.lang.XComponent; -import com.sun.star.lang.XEventListener; -import share.LogWriter; - -/** -* Testing com.sun.star.lang.XComponent -* interface methods : -*
                    -*
                  • dispose()
                  • -*
                  • addEventListener()
                  • -*
                  • removeEventListener()
                  • -*
                  -* After this interface test object must be recreated.

                  -* Multithreaded test ability not implemented yet. -* @see com.sun.star.lang.XComponent -*/ -public class _XComponent { - - public static XComponent oObj = null; - private XNameContainer xContainer = null; - private XComponent altDispose = null; - public LogWriter log = null; - - boolean listenerDisposed[] = new boolean[2]; - String[] Loutput = new String[2]; - - /** - * Listener which added but not removed, and its method must be called - * on dispose call. - */ - public class MyEventListener implements XEventListener { - public void disposing ( EventObject oEvent ) { - Loutput[0] = Thread.currentThread() + " is DISPOSING EV1" + this; - listenerDisposed[0] = true; - } - }; - - /** - * Listener which added and then removed, and its method must not - * be called on dispose call. - */ - public class MyEventListener2 implements XEventListener { - public void disposing ( EventObject oEvent ) { - Loutput[0] = Thread.currentThread() + " is DISPOSING EV2" + this; - listenerDisposed[1] = true; - } - }; - - XEventListener listener1 = new MyEventListener(); - XEventListener listener2 = new MyEventListener2(); - - /** - * For the cfgmgr2.OSetElement tests: dispose the owner element. - */ - protected void before() { - // do not dispose this component, but parent instead -// altDispose = (XComponent)tEnv.getObjRelation("XComponent.DisposeThis"); - - } - - /** - * Adds two listeners.

                  - * Has OK status if then the first listener will receive an event - * on dispose method call. - */ - public boolean _addEventListener() { - - listenerDisposed[0] = false; - listenerDisposed[1] = false; - - oObj.addEventListener( listener1 ); - oObj.addEventListener( listener2 ); - - return true; - } // finished _addEventListener() - - /** - * Removes the second of two added listeners.

                  - * Method tests to be completed successfully : - *

                    - *
                  • addEventListener : method must add two listeners.
                  • - *

                  - * Has OK status if no events will be sent to the second listener on - * dispose method call. - */ - public boolean _removeEventListener() { -// executeMethod("addEventListener()"); - if (disposed) return true; - // the second listener should not be called - oObj.removeEventListener( listener2 ); - log.println(Thread.currentThread() + " is removing EL " + listener2); - return true; - } // finished _removeEventListener() - - static boolean disposed = false; - - /** - * Disposes the object and then check appropriate listeners were - * called or not.

                  - * Method tests to be completed successfully : - *

                    - *
                  • removeEventListener : method must remove one of two - * listeners.
                  • - *

                  - * Has OK status if liseter removed wasn't called and other listener - * was. - */ - public boolean _dispose() { - disposed = false; -// executeMethod("removeEventListener()"); - - log.println( "begin dispose" + Thread.currentThread()); - oObj.dispose(); - - try { - Thread.sleep(500) ; - } catch (InterruptedException e) {} - if (Loutput[0]!=null) log.println(Loutput[0]); - if (Loutput[1]!=null) log.println(Loutput[1]); - log.println( "end dispose" + Thread.currentThread()); - disposed = true; - - // check that dispose() works OK. - return listenerDisposed[0] && !listenerDisposed[1]; - - } // finished _dispose() - - /** - * Forces object recreation. - */ - protected void after() { -// disposeEnvironment(); - } - -} // finished class _XComponent - - diff --git a/ucb/qa/complex/tdoc/interfaces/_XContent.java b/ucb/qa/complex/tdoc/interfaces/_XContent.java deleted file mode 100755 index 4c84ecc1d8df..000000000000 --- a/ucb/qa/complex/tdoc/interfaces/_XContent.java +++ /dev/null @@ -1,86 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package complex.tdoc.interfaces; - -import com.sun.star.ucb.XContent; -import com.sun.star.ucb.XContentEventListener; -import com.sun.star.ucb.XContentIdentifier; -import share.LogWriter; - -/** - * - * @author sg128468 - */ -public class _XContent { - public XContent oObj = null; - public LogWriter log = null; - private ContentListener listener = null; - - public boolean _addContentEventListener() { - listener = new ContentListener(); - oObj.addContentEventListener(listener); - return true; - } - public boolean _getContentType() { - String type = oObj.getContentType(); - log.println("Type: " + type); - return type != null && type.indexOf("vnd.sun.star.tdoc") != -1; - } - public boolean _getIdentifier() { - XContentIdentifier xIdent = oObj.getIdentifier(); - String id = xIdent.getContentIdentifier(); - String scheme = xIdent.getContentProviderScheme(); - log.println("Id: " + id); - log.println("Scheme: " + scheme); - return id != null && scheme != null && id.indexOf("vnd.sun.star.tdoc") != -1 && scheme.indexOf("vnd.sun.star.tdoc") != -1; - } - public boolean _removeContentEventListener() { - System.out.println("Event: " + (listener.disposed || listener.firedEvent)); - oObj.removeContentEventListener(listener); - return true; - } - - - private class ContentListener implements XContentEventListener { - private boolean disposed = false; - private boolean firedEvent = false; - - public void reset() { - disposed = false; - firedEvent = false; - } - - public void contentEvent(com.sun.star.ucb.ContentEvent contentEvent) { - firedEvent = true; - } - - public void disposing(com.sun.star.lang.EventObject eventObject) { - disposed = true; - } - - } -} diff --git a/ucb/qa/complex/tdoc/interfaces/_XPropertiesChangeNotifier.java b/ucb/qa/complex/tdoc/interfaces/_XPropertiesChangeNotifier.java deleted file mode 100755 index 790f295c7be5..000000000000 --- a/ucb/qa/complex/tdoc/interfaces/_XPropertiesChangeNotifier.java +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package complex.tdoc.interfaces; - -import com.sun.star.beans.XPropertiesChangeListener; -import com.sun.star.beans.XPropertiesChangeNotifier; -import share.LogWriter; - -/** - * Check the XPropertiesChangeNotifier - */ -public class _XPropertiesChangeNotifier { - public XPropertiesChangeNotifier oObj = null; - public LogWriter log = null; - - PropertiesChangeListener listener = new PropertiesChangeListener(); - String[] args = null; - - - public boolean _addPropertiesChangeListener() { - oObj.addPropertiesChangeListener(args, listener); - return true; - } - - public boolean _removePropertiesChangeListener() { - oObj.removePropertiesChangeListener(args, listener); - return true; - } - - private class PropertiesChangeListener implements XPropertiesChangeListener { - public boolean disposed = false; - public boolean propChanged = false; - - public void disposing(com.sun.star.lang.EventObject eventObject) { - disposed = true; - } - - public void propertiesChange(com.sun.star.beans.PropertyChangeEvent[] propertyChangeEvent) { - propChanged = true; - } - - } -} diff --git a/ucb/qa/complex/tdoc/interfaces/_XPropertyContainer.java b/ucb/qa/complex/tdoc/interfaces/_XPropertyContainer.java deleted file mode 100755 index fd7ff94c8f8f..000000000000 --- a/ucb/qa/complex/tdoc/interfaces/_XPropertyContainer.java +++ /dev/null @@ -1,102 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package complex.tdoc.interfaces; - -import com.sun.star.beans.XPropertyContainer; -import share.LogWriter; - -/** - * - * @author sg128468 - */ -public class _XPropertyContainer { - public XPropertyContainer oObj = null; - public LogWriter log = null; - - public boolean _addProperty() { - boolean result = true; - // add illegal property - try { - oObj.addProperty("MyIllegalProperty", (short)0, null); - } - catch(com.sun.star.beans.PropertyExistException e) { - e.printStackTrace((java.io.PrintWriter)log); - result = false; - } - catch(com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace((java.io.PrintWriter)log); - log.println("'IllegalArgument' Unexpected but correct."); - } - catch(com.sun.star.beans.IllegalTypeException e) { - log.println("'IllegalType' Correctly thrown"); - } - // add valid property - try { - oObj.addProperty("MyLegalProperty", (short)0, "Just a value"); - } - catch(com.sun.star.beans.PropertyExistException e) { - e.printStackTrace((java.io.PrintWriter)log); - result = false; - } - catch(com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace((java.io.PrintWriter)log); - result = false; - } - catch(com.sun.star.beans.IllegalTypeException e) { - e.printStackTrace((java.io.PrintWriter)log); - result = false; - } - return result; - } - - public boolean _removeProperty() { - boolean result = true; - try { - oObj.removeProperty("MyIllegalProperty"); - } - catch(com.sun.star.beans.UnknownPropertyException e) { - log.println("'UnknownProperty' Correctly thrown"); - } - catch(com.sun.star.beans.NotRemoveableException e) { - e.printStackTrace((java.io.PrintWriter)log); - result = false; - } - try { - oObj.removeProperty("MyLegalProperty"); - } - catch(com.sun.star.beans.UnknownPropertyException e) { - e.printStackTrace((java.io.PrintWriter)log); - result = false; - } - catch(com.sun.star.beans.NotRemoveableException e) { - e.printStackTrace((java.io.PrintWriter)log); - result = false; - } - return result; - } - -} diff --git a/ucb/qa/complex/tdoc/interfaces/_XPropertySetInfoChangeNotifier.java b/ucb/qa/complex/tdoc/interfaces/_XPropertySetInfoChangeNotifier.java deleted file mode 100755 index ec1d7d64ada5..000000000000 --- a/ucb/qa/complex/tdoc/interfaces/_XPropertySetInfoChangeNotifier.java +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package complex.tdoc.interfaces; - -import com.sun.star.beans.XPropertySetInfoChangeListener; -import com.sun.star.beans.XPropertySetInfoChangeNotifier; -import share.LogWriter; - -/** - * - */ -public class _XPropertySetInfoChangeNotifier { - public XPropertySetInfoChangeNotifier oObj = null; - public LogWriter log = null; - - PropertySetInfoChangeListener listener = new PropertySetInfoChangeListener(); - String[] args = null; - - - public boolean _addPropertiesChangeListener() { - oObj.addPropertySetInfoChangeListener(listener); - return true; - } - - public boolean _removePropertiesChangeListener() { - oObj.removePropertySetInfoChangeListener(listener); - return true; - } - - private class PropertySetInfoChangeListener implements XPropertySetInfoChangeListener { - public boolean disposed = false; - public boolean propChanged = false; - - public void disposing(com.sun.star.lang.EventObject eventObject) { - disposed = true; - } - - public void propertySetInfoChange(com.sun.star.beans.PropertySetInfoChangeEvent propertySetInfoChangeEvent) { - } - - } - -} diff --git a/ucb/qa/complex/tdoc/interfaces/_XServiceInfo.java b/ucb/qa/complex/tdoc/interfaces/_XServiceInfo.java deleted file mode 100755 index 761cca87998a..000000000000 --- a/ucb/qa/complex/tdoc/interfaces/_XServiceInfo.java +++ /dev/null @@ -1,99 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.tdoc.interfaces; - -import lib.MultiMethodTest; - -import com.sun.star.lang.XServiceInfo; -import share.LogWriter; - -/** -* Testing com.sun.star.lang.XServiceInfo -* interface methods : -*

                    -*
                  • getImplementationName()
                  • -*
                  • supportsService()
                  • -*
                  • getSupportedServiceNames()
                  • -*

                  -* Test is multithread compilant.

                  -* @see com.sun.star.lang.XServiceInfo -*/ -public class _XServiceInfo { - public static XServiceInfo oObj = null; - public static String[] names = null; - public LogWriter log = null; - - /** - * Just calls the method.

                  - * Has OK status if no runtime exceptions occured. - */ - public boolean _getImplementationName() { - boolean result = true; - log.println("testing getImplementationName() ... "); - - log.println("The ImplementationName ist "+oObj.getImplementationName()); - result=true; - - return result; - - } // end getImplementationName() - - - /** - * Just calls the method.

                  - * Has OK status if no runtime exceptions occured. - */ - public boolean _getSupportedServiceNames() { - boolean result = true; - log.println("getting supported Services..."); - names = oObj.getSupportedServiceNames(); - for (int i=0;igetSupportedServiceNames method and - * calls the supportsService methos with this - * name.

                  - * Has OK status if true value is - * returned. - */ - public boolean _supportsService() { - log.println("testing supportsService"); - names = oObj.getSupportedServiceNames(); - return oObj.supportsService(names[0]); - } // end supportsService() -} - diff --git a/ucb/qa/complex/tdoc/interfaces/_XTypeProvider.java b/ucb/qa/complex/tdoc/interfaces/_XTypeProvider.java deleted file mode 100755 index aef931bdeef1..000000000000 --- a/ucb/qa/complex/tdoc/interfaces/_XTypeProvider.java +++ /dev/null @@ -1,95 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package complex.tdoc.interfaces; - -import lib.MultiMethodTest; - -import com.sun.star.lang.XTypeProvider; -import com.sun.star.uno.Type; -import share.LogWriter; - -/** -* Testing com.sun.star.lang.XTypeProvider -* interface methods : -*

                    -*
                  • getTypes()
                  • -*
                  • getImplementationId()
                  • -*

                  -* Test is NOT multithread compilant.

                  -* @see com.sun.star.lang.XTypeProvider -*/ -public class _XTypeProvider { - - public static XTypeProvider oObj = null; - public static Type[] types = null; - public LogWriter log = null; - - /** - * Just calls the method.

                  - * Has OK status if no runtime exceptions occured. - */ - public boolean _getImplementationId() { - boolean result = true; - log.println("testing getImplementationId() ... "); - - log.println("The ImplementationId is "+oObj.getImplementationId()); - result = true; - - return result; - - } // end getImplementationId() - - - /** - * ?alls the method and checks the return value.

                  - * Has OK status if one of the return value equals to the - * type com.sun.star.lang.XTypeProvider. - */ - public boolean _getTypes() { - boolean result = false; - log.println("getting Types..."); - types = oObj.getTypes(); - for (int i=0;i"); - } - - return result; - - } // end getTypes() - -} - diff --git a/ucb/qa/complex/tdoc/makefile.mk b/ucb/qa/complex/tdoc/makefile.mk index f5f2629f5592..01f8ec0f76fa 100755 --- a/ucb/qa/complex/tdoc/makefile.mk +++ b/ucb/qa/complex/tdoc/makefile.mk @@ -43,15 +43,21 @@ JAVATESTFILES = \ CheckTransientDocumentsDocumentContent.java JAVAFILES = $(JAVATESTFILES) \ - TestDocument.java + TestDocument.java \ + _XChild.java \ + _XCommandInfoChangeNotifier.java \ + _XCommandProcessor.java \ + _XComponent.java \ + _XContent.java \ + _XPropertiesChangeNotifier.java \ + _XPropertyContainer.java \ + _XPropertySetInfoChangeNotifier.java \ + _XServiceInfo.java \ + _XTypeProvider.java JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar EXTRAJARFILES = $(OOO_JUNIT_JAR) - -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) -SUBDIRS = interfaces - # Sample how to debug # JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y -- cgit