Re: Commit: Paste Special


Subject: Re: Commit: Paste Special
From: Dom Lachowicz (cinamod@hotmail.com)
Date: Thu May 03 2001 - 22:52:20 CDT


Hi Aaron,

>Ummm, so by default text is pasted in as formatted? Uh, what format of
>formatting (on X)?

By default, text has always been pasted as formatted, if such format exists
on the X clipboard (similarly for other system's clipboards).

By default, we post both RTF and TXT/STRING to the X clipboard. Most
applications just post TXT/STRING, but those apps specifically devoted to
formatted txt (such as a WP) need some formatting present in the selection.

So a normal X application (when trying to paste) does something like this
pseudo-code:

if ClipboardHasSelectionType ("TXT")
   pasteClipboardSelection()

We just happen to post both TXT and RTF data to the clipboard (and are
capable of reading both types back). Almost every other app is more than
happy to ignore the RTF block and just paste the TXT one. Those who do not
ignore the RTF block include:

AbiWord
Gnumeric
OpenOffice

and the like which can handle RTF data (and specifically request the type
from the clipboard, should it exist).

I hope that this clears things up.

Dom

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com



This archive was generated by hypermail 2b25 : Sat May 26 2001 - 03:51:01 CDT