On Thu, May 04, 2017 at 07:52:00AM +0200, Tommaso Cucinotta wrote: > On 04/05/2017 01:36, Scott Kostyshak wrote: > > Works well! I found what I think is unexpected behavior: if I select the > > graphics inset (e.g. after I have followed your instructions and clicked > > on "run" and everything looks good), and copy it, I am presented with > > the authorization dialog. [...] Can you reproduce? > > yes, and it is unexpected that the converter question comes on the Copy > operation, not the Paste one! > > In my stack trace I'm seeing > > convert - Converter.cpp:462 > prepareHTMLFile - InsetGraphics.cpp:940 > ... > writeLyXHTMLSource - Buffer.cpp:2239 > putClipboard - CutAndPaste.cpp:574 > copySelection - CutAndPaste.cpp:1042 > > interestingly, just above the copySelection() line, we can see: > > // We do not need to produce images, etc. > runparams.dryrun = true; > > as a consequence, I came up with the attached patch that solves the > annoyance for me, but I'm not expert of this area of the code, so > can please someone review? > (I just checked that I can still copy and paste the graphics as before)
Thanks for looking into it. It seems we are generating the image for storing the text/html MIME on the clipboard. That actually doesn't seem strange to me if we want to embed the image in the clipboard. Does that actually work? I tried copy/pasting from LyX with an image to LibreOffice and I don't get the picture. I get a placeholder. If I try from the browser, I get the embedded picture. Assuming we do want to embed the picture on the clipboard, the next question is should we run the converter again? Or if the format we already have stored for the preview is lossless (e.g. vector) then won't it be more efficient to convert from that than to rerun the converter? Perhaps it would just be difficult to do that. Scott
signature.asc
Description: PGP signature