Re: [icon-users] CTRL-C, CTRL-V annoyance

  • From: Alan Adams <alan@xxxxxxxxxxxxxxxx>
  • To: Icon Users Group <icon-users@xxxxxxxxxxxxx>
  • Date: Mon, 09 Apr 2012 19:14:53 +0100

In message <527dd0005elists@xxxxxxxxxxxx>
          "Chris Bell (Lists)" <lists@xxxxxxxxxxxx> wrote:

> John Harrison <john@xxxxxxxxxxxxxxxx> wrote:

>>> Ctrl-V into a Zap HoTMeaL document pastes the text plus a whole
>>> load of unwanted HTML code.  (This happens when the selected text
>>> was formatted in some way or another - eg a heading.)  Is there any
>>> way to stop this happening?

<snip>

> Why do EW/TW have to be different?  Can they be reconfigured?

The documentation of the clipboard protocol says, in part:

==========

Paste

The application should first check to see if it owns the clipboard, 
and use the data directly if so. If is does not own it, it should 
broadcast the following message:

Message_DataRequest (16)
0 message size
4 task handle of task requesting data 8 message id
12 your_ref (0)
16 Message_DataRequest
20 window handle
24 internal handle to indicate destination of data 28 x
32 y
36 flags:

        bit 2 set => send data from clipboard (must be 1)
        all other bits reserved (must be 0)
************
40 list of filetypes in order of preference,
************
      terminated by -1

The sender must set flags bit 2, and the receiver must check this bit, 
and ignore the message if it is not set. All other flags bits must be 
cleared by the sender and ignored by the receiver.

If an application receiving this message owns the clipboard, it should 
choose the earliest filetype in the list that it can provide, and if 
none are possible it should provide the data its original (native) 
format. Note that the list can be null, to indicate that the native 
data should be sent. It should reply using the normal Message_DataSave 
protocol. Bytes 20 through 35 of the DataSave block should be copied 
directly from the corresponding bytes of the Message_DataRequest 
block, whilst the estimated size field, filetype and filename must be 
filled in.

=====

It would appear that the key is the list of filetypes. Most 
application developers would be expected to put the "richest" filetype 
earliest in the list, so that as much information as possible is 
preserved in the paste operation. That seems to be what happens here.

I don't know why it has changed from taking the "text" type to native, 
but I suspect a change in EW/TW itself. (Just to confirm, you are 
copying from a Word document open in EW, and pasting into another 
document open in EW? In that situation EW negotiates with itself the 
type to use, and will match the first in the list.)

Alan

-- 
Alan Adams, from Northamptonshire
alan@xxxxxxxxxxxxxxxx
http://www.nckc.org.uk/
------------------------------------------------------------
    To change, suspend or cancel your subscription go to
          //www.freelists.org/list/icon-users
------------------------------------------------------------


Other related posts: