/* A desktop environment contains tasks with one or more
frames in which components can be loaded. Desktop is the
environment for components which can instanciate within
frames. */
XComponentLoader xcomponentloader = ( XComponentLoader )
UnoRuntime.queryInterface( XComponentLoader.class,
xmulticomponentfactory.createInstanceWithContext(
"com.sun.star.frame.Desktop", xcomponentcontext ) );
// Preparing properties for loading the document
PropertyValue propertyvalue[] = new PropertyValue[ 1 ];
// Setting the flag for hidding the open document
propertyvalue[ 0 ] = new PropertyValue();
propertyvalue[ 0 ].Name = "Hidden";
propertyvalue[ 0 ].Value = new Boolean(true);
// Loading the wanted document
Object objectDocumentToStore =
xcomponentloader.loadComponentFromURL(
stringUrl, "_blank", 0, propertyvalue );
// Getting an object that will offer a simple way to store a document to a URL.
XStorable xstorable =
( XStorable ) UnoRuntime.queryInterface( XStorable.class,