I'm working in Java and I'm not able to get those objects. Are those fields private or something ? XComponent (= return type of loadComponentFromURL) does not offer any field "CurrentController".
XTextDocument has a a method getCurrentController() , but this returns a XController, and a cast to XTransferableSupplier gives me an error. On 3/20/07, Mathias Bauer <[EMAIL PROTECTED]> wrote:
Dominique De Munck wrote: > Hi, > > Thx for the lead. > However, I don't find any indication how to use this > XTransferableSupplier interface. > Unfortunatly, the "currentController" does not support this interface, > as you thought in > the following thread: > > http://www.nabble.com/Sub-Document-Creation-Problem-(Java)-t3407774.html This interface ATM is supported only in Writer. The usage is simple: obj = ThisComponent.CurrentController.getTransferable() retrieves the current selection and stores it into the variable "obj". If you wanted to paste it into a new blank document you could do: dim noargs() doc = StarDesktop.loadComponentFromURL( \ "private:factory/swriter","_blank",0,noargs()) doc.CurrentController.insertTransferable(obj) At least Calc will also support this interface in OOo2.3. 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]
-- -- tel: (32)/(0)486 23 81 33 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
