rText.insertString(rRange , string, false);
}
}
static void testDocument(XMultiServiceFactory rSmgr) throws com.sun.star.uno.Exception, IOException {
XComponentLoader rLoader = UnoRuntime.queryInterface(XComponentLoader.class, rSmgr.createInstance("com.sun.star.frame.Desktop"));
String urls[] = new String[] {
"private:factory/swriter",
"private:factory/scalc",
"private:factory/sdraw",
"http://www.heise.de",
};
String docu[] = new String[] {
"a new writer document ...\n",
"a new calc document ...\n",
"a new draw document ...\n",
"www.heise.de\n",
};
for(int i = 0; i < urls.length; ++ i) {
System.err.println("press any key to open " + docu[i]);
System.in.read();
while(System.in.available() > 0)
System.in.read();
XComponent rComponent = rLoader.loadComponentFromURL(urls[i], "_blank", 0, new PropertyValue[0]);
// testWriter(rComponent);
System.err.println("press any key to close the document");
System.in.read();
while(System.in.available() > 0)