Filippo Machi wrote:

> Hi, 
> I'm Filippo Machi. I've to copy portions of formatted text and/or table rows 
> in writer document, using java. These portions are defined using user text 
> fields. I succeded in that selecting portions and dispatching copy / paste 
> commands. 
> However, since my program performs a lot of these copies, if the user changes 
> the content of the clipboard when my program is running, he makes copy/paste 
> activity go wrong.
> Now I'm wondering wheter...
> 1) is there another way to copy/paste text and rows keeping formatting? 
> (Autotext works with text but when I try to use it with table rows I copy 
> table structure too)
> 2) can I use another clipboard? A local clipboard in order to prevent user 
> activity to change chipboard content?
> Thanks a lot
> Kind regards
> Filippo Machi

This is what the interface
com.sun.star.datatransfer.XTransferableSupplier is for.

It is implemented at the Controller object of a document view. You can
retrieve the current selection from a view and paste it somewhere else
and it will work exactly as if you had used the clipboard functions. You
can see it as a kind of "local clipboard".

This interface is implemented in Writer since several versions and in
Calc since 2.3 (IIRC). Draw/Impress is still missing.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to