Kaydet (Commit) 63ed9cb4 authored tarafından Stephan Wunderlich's avatar Stephan Wunderlich

CHG: added some debug information

üst 2ad88e66
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: AccessibleCheckBox.java,v $ * $RCSfile: AccessibleCheckBox.java,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Date: 2003-01-27 18:19:33 $ * last change: $Date: 2003-03-27 11:59:51 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -121,6 +121,7 @@ public class AccessibleCheckBox extends TestCase { ...@@ -121,6 +121,7 @@ public class AccessibleCheckBox extends TestCase {
XTextDocument xTextDoc = null; XTextDocument xTextDoc = null;
XAccessibleAction action = null; XAccessibleAction action = null;
DiagThread psDiag = null;
/** /**
* Opens 'Insert Table' dialog using document dispatch provider * Opens 'Insert Table' dialog using document dispatch provider
...@@ -131,8 +132,22 @@ public class AccessibleCheckBox extends TestCase { ...@@ -131,8 +132,22 @@ public class AccessibleCheckBox extends TestCase {
protected TestEnvironment createTestEnvironment( protected TestEnvironment createTestEnvironment(
TestParameters Param, PrintWriter log) { TestParameters Param, PrintWriter log) {
log.println("Creating text document");
if (xTextDoc == null) {
try {
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF());
xTextDoc = SOF.createTextDoc(null);
} catch (com.sun.star.uno.Exception e) {
throw new StatusException("Can't create document", e);
}
}
shortWait();
XInterface oObj = null; XInterface oObj = null;
log.println("getting toolkit");
try { try {
oObj = (XInterface) Param.getMSF().createInstance oObj = (XInterface) Param.getMSF().createInstance
("com.sun.star.awt.Toolkit") ; ("com.sun.star.awt.Toolkit") ;
...@@ -147,19 +162,23 @@ public class AccessibleCheckBox extends TestCase { ...@@ -147,19 +162,23 @@ public class AccessibleCheckBox extends TestCase {
shortWait(); shortWait();
DiagThread psDiag = new DiagThread(xTextDoc,Param.getMSF()); log.println("Opening Dialog in second thread");
psDiag = new DiagThread(xTextDoc,Param.getMSF());
psDiag.start(); psDiag.start();
AccessibilityTools at = new AccessibilityTools(); AccessibilityTools at = new AccessibilityTools();
shortWait(); shortWait();
log.println("Getting the active TopWindow");
XWindow xWindow = (XWindow) XWindow xWindow = (XWindow)
UnoRuntime.queryInterface(XWindow.class,tk.getActiveTopWindow()); UnoRuntime.queryInterface(XWindow.class,tk.getActiveTopWindow());
XAccessible xRoot = at.getAccessibleObject(xWindow); XAccessible xRoot = at.getAccessibleObject(xWindow);
at.printAccessibleTree(log, xRoot); //at.printAccessibleTree(log, xRoot);
oObj = at.getAccessibleObjectForRole oObj = at.getAccessibleObjectForRole
(xRoot, AccessibleRole.PUSHBUTTON,"Cancel"); (xRoot, AccessibleRole.PUSHBUTTON,"Cancel");
...@@ -198,28 +217,25 @@ public class AccessibleCheckBox extends TestCase { ...@@ -198,28 +217,25 @@ public class AccessibleCheckBox extends TestCase {
* <code>createTestEnvironment()</code>. * <code>createTestEnvironment()</code>.
*/ */
protected void cleanup( TestParameters Param, PrintWriter log) { protected void cleanup( TestParameters Param, PrintWriter log) {
log.println( " closing dialog " );
try { try {
log.println( "closing dialog" );
action.doAccessibleAction(0); action.doAccessibleAction(0);
log.println( "interrupting corresponding Thread" );
psDiag.interrupt();
log.println( "closing the document" );
xTextDoc.dispose();
log.println( "reinitialize the variable" );
xTextDoc = null;
} catch (com.sun.star.lang.IndexOutOfBoundsException ioe) { } catch (com.sun.star.lang.IndexOutOfBoundsException ioe) {
log.println("Couldn't close dialog"); log.println("Couldn't close dialog");
} catch (com.sun.star.lang.DisposedException de) { } catch (com.sun.star.lang.DisposedException de) {
log.println("Dialog already disposed"); log.println("Dialog already disposed");
} }
log.println(" disposing doc ");
xTextDoc.dispose();
} }
/**
* Opens new writer document.
*/
protected void initialize(TestParameters Param, PrintWriter log) { protected void initialize(TestParameters Param, PrintWriter log) {
try {
SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF());
xTextDoc = SOF.createTextDoc(null);
} catch (com.sun.star.uno.Exception e) {
throw new StatusException("Can't create document", e);
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment