Revert "Use XSynchronousDispatch to avoid races"
This reverts commit 16383552c8
, which was broken,
but toplevel "make .../workdir/*/JunitTest/sc_unoapi/done" did not trigger
qadevOOo rebuild, so got unnoticed at first.
Change-Id: I6031cf9f67a8cc69cbabd197bd01462968eeb07e
This commit is contained in:
parent
6a7371d266
commit
d23508eebb
1 changed files with 9 additions and 6 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue