diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-12-07 12:34:28 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-12-07 12:35:58 +0100 |
commit | d23508eebba52d7e40c84b3cea17868192519654 (patch) | |
tree | 15ab739c4d469ea60569d82608319fccf8bc6bb2 /qadevOOo | |
parent | loplugin: various unused variables (diff) | |
download | core-d23508eebba52d7e40c84b3cea17868192519654.tar.gz core-d23508eebba52d7e40c84b3cea17868192519654.zip |
Revert "Use XSynchronousDispatch to avoid races"
This reverts commit 16383552c8477ac4620d6260a2b7981a9a6aaf17, which was broken,
but toplevel "make .../workdir/*/JunitTest/sc_unoapi/done" did not trigger
qadevOOo rebuild, so got unnoticed at first.
Change-Id: I6031cf9f67a8cc69cbabd197bd01462968eeb07e
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java b/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java index d58e374caab5..e1b50192dabb 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeaderArea.java @@ -37,9 +37,9 @@ import com.sun.star.accessibility.XAccessibleStateSet; import com.sun.star.awt.XWindow; import com.sun.star.container.XIndexAccess; import com.sun.star.frame.XController; +import com.sun.star.frame.XDispatch; import com.sun.star.frame.XDispatchProvider; import com.sun.star.frame.XModel; -import com.sun.star.frame.XSynchronousDispatch; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.sheet.XSpreadsheet; import com.sun.star.sheet.XSpreadsheetDocument; @@ -124,15 +124,18 @@ public class ScAccessiblePageHeaderArea extends TestCase { aParseURL[0].Complete = ".uno:PrintPreview"; xParser.parseStrict(aParseURL); URL aURL = aParseURL[0]; - XSynchronousDispatch xDispatcher = UnoRuntime.queryInterface( - XSynchronousDispatch.class, - xDispProv.queryDispatch(aURL, "", 0)); - xDispatcher.dispatch( aURL, null ); + XDispatch xDispatcher = xDispProv.queryDispatch(aURL, "", 0); + if(xDispatcher != null) + xDispatcher.dispatch( aURL, null ); } catch (com.sun.star.uno.Exception e) { log.println("Couldn't change mode"); throw new StatusException(Status.failed("Couldn't change mode")); } + try { + Thread.sleep(500); + } catch (InterruptedException ex) {} + AccessibilityTools at = new AccessibilityTools(); XWindow xWindow = at.getCurrentContainerWindow( (XMultiServiceFactory) Param.getMSF(), aModel); @@ -210,4 +213,4 @@ public class ScAccessiblePageHeaderArea extends TestCase { throw new StatusException( "Couldn't create document ", e ); } } -} +}
\ No newline at end of file |