gaopeng wrote:
> Philipp.Lohmann Wrote:
> Mostly right. The way it works is this: on "copy" the copied application
> acquires the clipboard,
> saying "I have content, and I could deliver it in these mimetypes". On paste
> the pasting application asks the clipboard for the supported mimetypes,
> selects one and
> then asks the clipboard for the content in that specific mimetype. The
> clipboard then asks
> the "copied" application for content in that specific mimetype an d
> delivers the resulting data
> to the "pasting" application.
>
> I don't fully understand what's you said above , my dobuts are following :
> 1: how dose the "copy" application tell clipboard which mimetypes it
> supported . in other words . where the mimetypes supported by the copy
> applicaton stored and how dose the clipboard get these information . or these
> mimetypes supported by the copy application is not store the clipboard at all
> , these information is only store the copy appliction .
In terms of OOo's UNO API the "copy" application provides a Transferable
object. This object can be asked for the mimetypes available
and in a second step the content can be asked for a specific mimetype.
The clipboard itself is the point where this Transferable
can be reached by the "paste" application.
> 2 : what I get from what's you said above is when the "pasting" application
> asks the clipboard for the content in that specific mimetype . but I want to
> know if the specific mimetype is not supported by the "copy" application ,
> how dose the OOo application deal with that case ?
By not delivering the data but instead throwing a
UnsupportedFlavorException.
Kind regards, pl
--
If you give someone a program, you will frustrate them for a day;
if you teach them how to program, you will frustrate them for a lifetime.
-- Author unknown
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]