Hi gaopeng, gaopeng wrote: > I'm interest in coping , pasting and compatibility between ms office > and ooo or between ooo applications(e.g writer and Cacl). Anyone can > tell me where I begine to start or give me some hints about it . I'm sorry that I didn't succeed in preparing a list of issues that might be interesting for you to work on. For the time being it could be interesting to read something about the basics of the OOo clipboard implementation.
Basically everything related to clipboard in OOo is built around the clipboard services com.sun.star.datatransfer.clipboard.GenericClipboard and com.sun.star.datatransfer.clipboard.SystemClipboard and some objects that can be put into and retrieved from it. As the latter probably is most interesting for application developers: these are the so called "Transferable" objects that implement the interface com.sun.star.datatransfer.XTransferable. In Writer the code for this object can be found in sw/source/ui/dochdl/swdtflvr.cxx (class SwTransferable). The documentation for the services and interfaces used around clipboard can be found in the Developer's Guide and in the IDL files of the used interfaces and services in the namespace com.sun.star.datatransfer and its sub namespaces. The clipboard functions (Cut,Copy,Paste) in Writer basically are nothing more than simple functions handling Transferable objects. They receive them from the current selection or put them into it. You can find these functions by searching for the SlotIds SID_COPY, SID_CUT and SID_PASTE in the sw/source/ui/shells and sw/source/ui/uiview directories. The most interesting parts of these functions are those that create or evaluate Transferable objects. There is another API in Writer that deals with such objects, its the interface com.sun.star.datatransfer.XTransferableSupplier implemented by the Controller object found in sw/source/ui/uno/unotxvw.cxx. The last two methods in this file show you the starting points for the essential code: how Transferable objects are created and where/how Writer processes them. This interface does not interact with the system clipboard but it could serve as an internal clipboard or an easy way to copy Writer content from one place to another without destroying the content of the system clipboard. A similar implementation will be available in Calc in OOo 2.3, no idea currently about Draw/Impress. I hope that this can give you a start. Please let me know if you need more information. Best regards, 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]
