[softwarelist] Re: problem with holding format during copy/paste

On 22 Jul, Martin Wuerthner  wrote in message
  <3f5f907e50.martin@xxxxxxxxxxxxxxxxxxx>:

> In message <5db5867e50.steve@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
>           Steve Fryatt <lists@xxxxxxxxxxxxxxxxxx> wrote:
>
> > I've just had a play: a short piece of text with formatting in O-Pro, copy,
> > and paste back.  On RISC OS 5, it works as expected and the formatting is
> > retained.  On RISC OS 4.37, I see exactly what Martin describes (ie. the
> > formatting is lost).  A quick look at the Wimp messages flying around gives
> > some clues as to what might be happening (and I'm fairly sure we've been 
> > here
> > before on this list -- if not, it was with another WP/DTP app).
>
> Yes, we have been here before on this list, years before. However, the
> problem was fixed back then, and it is still working fine here on RISC
> OS 4.39 and RISC OS 6.14. Maybe RISC OS 4.37 behaves differently, but
> that is not too likely. I tried it with the 2-Jun-2006 version of OP
> 2.77 (which is I happened to have installed in my copy of VRPC).

I'm using O-Pro 2.77, dated 14-Jan-09.

[snip]

> > The problem is that the Clipboard Holder seems to always take the lowest
> > common denominator format: plain text, with no formatting.
>
> No, the ClipboardHolder obtains the data in its native format in
> preference. Some earlier versions of OP supplied text, which caused the
> symptoms as described, but that was fixed.

Looking at the messages on RISC OS 4.37 (and with O-Pro as above), when the
text is cut, the Clipboard Holder asks for an empty list of types (ie. the
first type is -1, or end of list) in the DataRequest message. I assume this
means "whatever you like". O-Pro responds in a DataSave message with "Text"
(&FFF).

When the paste happens, O-Pro asks for, in order of decreasing preference,
DrawFile, Sprite, Text, DDL, &000.  The Clipboard Holder offers Text; in fact,
since DDL is below Text in O-Pro's preferences, I don't know if native format
would ever be offered?  I think the &000 may be an error, but I don't know;
it's followed by the -1 terminator.

> > When O-Pro comes to paste in the text from the clipboard, it has to
> > ask the Clipboard Holder for it as it no longer 'owns' the clipboard
> > for itself.  What it gets back is plain text, with no formatting.
>
> That is what would happen if ClipboardHolder obtained plain text and
> then claimed the global clipboard, but that is not what I observe here
> on 4.39 and 6.14: OP 2.77 with "Global clipboard" enabled pastes text
> with effects just fine. I confirmed that the global clipboard works by
> pasting the same text into Zap, which worked fine, too, just as plain
> text of course. Pasting into OP again still pastes the text with
> effects.

Sadly, it doesn't paste the effects here (on RO4; it does on RO5).  I think
further investigation is probably a job for tomorrow (or possibly the weekend,
depending on available time).

-- 
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/

To unsubscribe or subscribe goto: http://www.freelists.org/list/davidpilling

Other related posts: