Am Mi, den 16.03.2005 schrieb Cristian Fonti um 10:12:
[...]
> > Use something similar to the following:
> >
> > oCursor.getText().insertString(oCursor, "text to insert", False)
> >
> I try, but so the "text to insert" is append at the end of the document
> after all the RTF and not between them...
> The code is like this: [docs is an array of documentURL]
>
> for (int i=0;i<docs.length;i++) {
>
> TextCursor=xText.createTextCursor();
> xd=(XDocumentInsertable)
> UnoRuntime.queryInterface(XDocumentInsertable.class,TextCursor);
> xd.insertDocumentFromURL(docs[i],loadProps);
> TextCursor.gotoEnd(false);
>
> TextCursor.getText().insertString(TextCursor,"-----------------------------------------------------",false);
Use the documents ViewCursor and move it to the appropriate place. Then
insert the string. In BASIC:
oDoc = thisComponent
oViewCursor = oDoc.CurrentController.getViewCursor
For using this in JAva you'll have to query the correct interfaces as
usual.
The movement methods can be found in the IDL reference...
HTH,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]