// --------------------------------------------------------------------------------------------------------
public void testBeamer() throws Exception, IOException, java.lang.Exception
{
final XController controller = docModel.getCurrentController();
final XFrame frame = controller.getFrame();
final XDispatchProvider dispatchP = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, frame);
URL command = new URL();
// command.Complete = ".component:DB/DataSourceBrowser";
command.Complete = ".uno:ViewDataSourceBrowser";
Object instance = getORB().createInstance("com.sun.star.util.URLTransformer");
XURLTransformer atrans = (XURLTransformer) UnoRuntime.queryInterface(XURLTransformer.class, instance);
com.sun.star.util.URL[] aURLA = new com.sun.star.util.URL[1];
aURLA[0] = command;
atrans.parseStrict(aURLA);
command = aURLA[0];
final XDispatch dispatch = dispatchP.queryDispatch(command, "_self", FrameSearchFlag.AUTO);
assure(dispatch != null);
dispatch.dispatch(command, new PropertyValue[0]);
final PropertyValue[] props = new PropertyValue[]
{
new PropertyValue("DataSourceName", 0, "Bibliography", PropertyState.DIRECT_VALUE),
new PropertyValue("CommandType", 0, Integer.valueOf(CommandType.TABLE), PropertyState.DIRECT_VALUE),
new PropertyValue("Command", 0, "biblio", PropertyState.DIRECT_VALUE)
};
final XFrame beamer = frame.findFrame("_beamer", 0);
assure(beamer != null);
final XEnumerationAccess evtBc = (XEnumerationAccess) UnoRuntime.queryInterface(XEnumerationAccess.class, getORB().createInstance("com.sun.star.frame.GlobalEventBroadcaster"));
XEnumeration enumeration = evtBc.createEnumeration();
int count = -1;
while (enumeration.hasMoreElements())
{
enumeration.nextElement();
++count;
}
final XSelectionSupplier selSup = (XSelectionSupplier)UnoRuntime.queryInterface(XSelectionSupplier.class, beamer.getController());
selSup.select(props);
final com.sun.star.util.XCloseable close = (com.sun.star.util.XCloseable)UnoRuntime.queryInterface(com.sun.star.util.XCloseable.class, frame);
close.close(false);
enumeration = evtBc.createEnumeration();