Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Drag & Drop in Writer inserts the URL and not the image
Drag & Drop in Writer inserts the URL and not the image
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
XFox
Sentinel


Joined: Oct 13, 2005
Posts: 26

PostPosted: Wed Sep 06, 2006 7:33 am    Post subject: Drag & Drop in Writer inserts the URL and not the image

Mac OS X 10.4.7 and NeoOffice 2.0 Aqua Beta 3 Patch 1.
When I drag an image from a web browser (tested with Safari 2.0.4 and SeaMonkey 1.0.4) to a Writer document, NeoOffice inserts the URL of the image, not the image itself.
If the image has an hyperlink assigned, the link is inserted.
When I drag the same images in a Draw document, the images are inserted.

Even if I think this is the expected behaviour, it would be very useful having a modifier button, like Alt or Command, to force NeoOffice to always insert the image, even in Writer's documents. Or there could be an option in NeoOffice's preferences.

The more similar bug I found is drag and drop of images from web browser doesn't work in the OpenOffice.org's Bugzilla system but I suspect Patrick has already fixed that issue in the NeoOffice code because the reporter says that drag'n'drop inserts "a piece of HTML source code" and this is not the case with the current version of NeoOffice.
Should I file an enhancement request in the NeoOffice's Bugzilla system?
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Wed Sep 06, 2006 9:32 am    Post subject:

This is really a browser bug, since the browser puts two (or more) flavors on the clipboard (text, image) and the text (at least in the Gecko case) is put first.

So Writer, being a text app, grabs the text rather than the image, whereas Draw ignores the text and takes the image. (The work-around for Writer is to drag into a pre-constructed image frame).

The only bug you should file (except against Safari; there's already a bug against Gecko for putting the image first in the drag) is in the OOo IssueZilla asking for a drag-modifier that will choose an alternate flavor when drags contain several flavors.

Also note that if you copy/paste, you can in most browsers select "copy image" to only get the image, and "Paste Special" in Neo to choose which flavor to paste.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
XFox
Sentinel


Joined: Oct 13, 2005
Posts: 26

PostPosted: Thu Sep 07, 2006 2:55 am    Post subject:

First, please to meet you here, too, Smokey.
I didn't imagine Internet could be so small! Very Happy

sardisson wrote:
This is really a browser bug, since the browser puts two (or more) flavors on the clipboard (text, image) and the text (at least in the Gecko case) is put first.


Why do you think it's a bug?
If I would be a browser developer I would put how many flavors I can on the clipboard if I'm not sure what the user is asking for and I think that there isn't a "right" flavor to be put first.
It's the task of the destination application to choose the right data flavor.

sardisson wrote:
So Writer, being a text app, grabs the text rather than the image, whereas Draw ignores the text and takes the image. (The work-around for Writer is to drag into a pre-constructed image frame).


Could you tell me how I create a pre-constructed image frame in a Writer document?

sardisson wrote:
The only bug you should file (except against Safari; there's already a bug against Gecko for putting the image first in the drag) is in the OOo IssueZilla asking for a drag-modifier that will choose an alternate flavor when drags contain several flavors.


Could you point me to the Gecko bug you mentioned?
I'll insert the enhancement request in IssueZilla.

sardisson wrote:
Also note that if you copy/paste, you can in most browsers select "copy image" to only get the image, and "Paste Special" in Neo to choose which flavor to paste.


Yes, I know, but is less practical and quick than a simple drag 'n' drop.
Moreover, in Safari copy image copies both the image URL and the image itself, so it's always required to use Past Special.
Back to top
XFox
Sentinel


Joined: Oct 13, 2005
Posts: 26

PostPosted: Fri Sep 08, 2006 3:02 am    Post subject:

XFox wrote:
I'll insert the enhancement request in IssueZilla.


If someone wants to vote… Very Happy

http://www.openoffice.org/issues/show_bug.cgi?id=69387
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri Sep 08, 2006 1:57 pm    Post subject:

XFox wrote:
First, please to meet you here, too, Smokey.
I didn't imagine Internet could be so small! Very Happy

Nice to see you, too Smile Indeed it is a small Internet Wink

XFox wrote:
sardisson wrote:
This is really a browser bug, since the browser puts two (or more) flavors on the clipboard (text, image) and the text (at least in the Gecko case) is put first.


Why do you think it's a bug?
If I would be a browser developer I would put how many flavors I can on the clipboard if I'm not sure what the user is asking for and I think that there isn't a "right" flavor to be put first.
It's the task of the destination application to choose the right data flavor.

Well, it's a complex issue relating to flavor preferences and ordering...and based on the changes to the context menu (see below), I think it's a browser bug. It's certainly subject to debate. But it seems reasonable to me for Writer to prefer text in a drag, since Writer is in fact a text-processing app Wink

XFox wrote:
sardisson wrote:
So Writer, being a text app, grabs the text rather than the image, whereas Draw ignores the text and takes the image. (The work-around for Writer is to drag into a pre-constructed image frame).


Could you tell me how I create a pre-constructed image frame in a Writer document?

I think it's Insert: Frame, but I don't have time to check atm....

XFox wrote:
Could you point me to the Gecko bug you mentioned?
I'll insert the enhancement request in IssueZilla.

Bug 287134 (there's another one, fixed, that I can't find atm where the context menu was changed specifically to put only the image on the clipboard, not the URL, too.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
djpimley
The Anomaly
(earlier version)


Joined: Jun 11, 2006
Posts: 481
Location: Great Britain

PostPosted: Fri Sep 08, 2006 4:06 pm    Post subject:

sardisson wrote:
This is really a browser bug, since the browser puts two (or more) flavors on the clipboard (text, image) and the text (at least in the Gecko case) is put first.

XFox wrote:
Why do you think it's a bug?
If I would be a browser developer I would put how many flavors I can on the clipboard if I'm not sure what the user is asking for and I think that there isn't a "right" flavor to be put first.
It's the task of the destination application to choose the right data flavor.

URL is a distinct data type in the OS X clipboard - separate from text - so either NeoOffice is pasting url clipboard data as text or the browser is copying url data to the text clipboard. What happens if you paste into TextEdit? If you get the same url then it's the browser's fault.

Regards,
Daniel Pimley
Back to top
XFox
Sentinel


Joined: Oct 13, 2005
Posts: 26

PostPosted: Mon Sep 11, 2006 1:31 am    Post subject:

sardisson wrote:
XFox wrote:
Could you tell me how I create a pre-constructed image frame in a Writer document?
I think it's Insert: Frame, but I don't have time to check atm....


I tried Insert -> Frame and if I drop the image in the Index field the URL is pasted and when I click OK the image is copied in a new frame of the document.
However, what I get isn't the same that I get with Insert -> Image.
With Insert -> Frame I get a full-fledged frame with toolbars and grids,
with Insert -> Image I get only the image with the resizing control points and the floating Image toolbar.

djpimley wrote:
URL is a distinct data type in the OS X clipboard - separate from text - so either NeoOffice is pasting url clipboard data as text or the browser is copying url data to the text clipboard. What happens if you paste into TextEdit? If you get the same url then it's the browser's fault.


TextEdit behaves the same as NeoOffice, but what is the browser's fault, exactly? Confused
Back to top
djpimley
The Anomaly
(earlier version)


Joined: Jun 11, 2006
Posts: 481
Location: Great Britain

PostPosted: Mon Sep 11, 2006 1:23 pm    Post subject:

XFox wrote:
TextEdit behaves the same as NeoOffice, but what is the browser's fault, exactly? Confused

It's a fuzzy issue: it depends on what your idea of "correct" behaviour is.

The browser copies the image's data into the image clipboard and the image's url into the url clipboard. The programmers have decided that it is "correct" (I disagree) for the browser also to copy the text of the image's url into the text clipboard. When NeoOffice looks for clipboard data to paste into a document, if there are multiple data types on the clipboard it can only choose one. NeoOffice correctly (in my opinion) prefers text over image data because, as Smokey said, it is primarily a text processing application.

So in my opinion the browser's behaviour is "incorrect" - not buggy, not wrong, just incorrect.
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Mon Sep 11, 2006 2:05 pm    Post subject:

djpimley wrote:
NeoOffice correctly (in my opinion) prefers text over image data because, as Smokey said, it is primarily a text processing application.

Just to clarify: Writer (and I think Calc) prefer text; Draw (and I think Impress, but not sure--50/50 anyway) prefer images, based on each module's primary function.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.