Paste special

Thomas Zander zander at kde.org
Sun Sep 16 10:56:17 BST 2007


On Sunday 16 September 2007 11:07:30 John Tapsell wrote:
> Hey all,
>
>   We need to have some form of "paste special" in many apps.  It would
> be nice to get some ideas now.

Agreed.

>   I was thinking, to take an example, in kwrite to have the Edit menu
[]
>   Paste
>   Paste As->
>       Plain text
>       HTML
>       MathML
[]
> The idea being that when you expand Paste As, it queries the clipboard
> to find out what mimetypes it offers, then shows them in the drop down
> list.

First I have problems envisioning how that would work; if I have a 
clipboard part with application/vnd.oasis.opendocument.text data, how do 
I decide that this is actually paste-able in kwrite ?

On top of that I have usecases in KOffice that need something a bit more 
elaborate. Which means we will probably not use the above scheme if it 
went into kdelibs.
Usecase;  user has on the clipboard plain text that is csv formatted and 
he wants to paste that in kspread. He expects kspread to put each comma 
separated value into a separate cell.  Options like 'separator char' need 
to somehow be available.
Usecase; User has html-text on the clipboard. Instead of pasting with 
markup he wants to show a dialog that allows him to map html-styles (h1 
etc) to kword styles, or configure that pasting hrefs will not result in 
links being created in the document.  i.e. show the html-import dialog.

I would suggest to have a standard action called 'paste special...' which 
will show a dialog that will allow specific actions based on the 
available mime types.  This will require applications to provide 
app-specific panels for certain mime-types. We can provide some good 
defaults that most apps will use, but can be replaced with app-specific 
ones.

I'm not sure this is a KDE4.0 feature, though. We have enough stabilizing 
to do, no need to take time away from that inventing new features.

> We could have a similar menu for koffice.

Thanks for thinking about us :)

Cheers!
-- 
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070916/de52d5b1/attachment.sig>


More information about the kde-core-devel mailing list