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