List Info

Thread: Inserting RTF into OpenOffice-Writer Document




Inserting RTF into OpenOffice-Writer Document
user name
2006-07-18 11:54:02
Hi,

i have a character array containing raw RTF-code (e.g.:
{\\rtf1\\b\\i Hello 
World}). Is there an easy way to insert that into a
XTextDocument and get 
formated RTF-Text?

I tried to find an Interface which is responsible for
handling RTF-Text, but i 
couldn't find anything.

Is that possible to do this at all?
And can someone point me to the right part of the
documentation, if it is 
possible?

Regards,
Lothar

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org

Inserting RTF into OpenOffice-Writer Document
user name
2006-07-18 22:28:54
Lothar Braun wrote:

> Hi,
> 
> i have a character array containing raw RTF-code (e.g.:
{\\rtf1\\b\\i Hello 
> World}). Is there an easy way to insert that into a
XTextDocument and get 
> formated RTF-Text?
> 
> I tried to find an Interface which is responsible for
handling RTF-Text, but i 
> couldn't find anything.
> 
> Is that possible to do this at all?
> And can someone point me to the right part of the
documentation, if it is 
> possible?

Inserting text is done at the document through the interface
com.sun.star.document.XDocumentInsertable that IIRC is
implemented at a
text range(?). This method *should* be able to get a stream
to load from
so you can provide an implementation of a stream based on
your array.
But it's possible that the implementation is buggy and can
load only
from a URL. As we are currently working on another fix in
this area I
hope I can tell you more later. But of course you can try by
yourself in
between. 

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project
Lead
Please reply to the list only, nospamforMBAgmx.de is
a spam sink.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )