// Query for the interface XComponentContext.
xcomponentcontext = ( XComponentContext ) UnoRuntime.queryInterface(
XComponentContext.class, objectDefaultContext );
// Querying for the interface XDesktop.
XDesktop xdesktop = ( XDesktop ) UnoRuntime.queryInterface(
XDesktop.class, xmulticomponentfactory.createInstanceWithContext(
"com.sun.star.frame.Desktop", xcomponentcontext ) );
// Getting the current frame from the OpenOffice.org Server.
XFrame xframe = xdesktop.getCurrentFrame();
// Getting the controller.
XController xcontroller = xframe.getController();
XSelectionSupplier xselectionsupplier =