Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Copy & paste of OLE object to Gimp fails with error message | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | General | Reporter: | plexi <microdmitry> | ||||||||||||
Component: | code | Assignee: | AOO issues mailing list <issues> | ||||||||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
Severity: | Trivial | ||||||||||||||
Priority: | P5 (lowest) | CC: | Armin.Le.Grand, damjan, elish, issues, mseidel, rainerbielefeld_ooo_qa | ||||||||||||
Version: | 3.4.0 | Keywords: | usability | ||||||||||||
Target Milestone: | 4.2.0 | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | All | ||||||||||||||
See Also: | https://issues.apache.org/ooo/show_bug.cgi?id=123063 | ||||||||||||||
Issue Type: | DEFECT | Latest Confirmation in: | 4.2.0-dev | ||||||||||||
Developer Difficulty: | --- | ||||||||||||||
Attachments: |
|
Description
plexi
2010-07-01 00:35:07 UTC
Can paste graph in Paint using Rev. 1499775 Win 7. If GIMP refuses to paste it has a problem. Closed this bug as FIXED and not as NOTABUG because till recently graph pasted incorrectly even within suite showing only area without data. My conclusion was premature. Values are incorrect. Created attachment 81016 [details]
pasted graph
pasted graph with wrong numerical values
Created attachment 81017 [details]
original data
Created attachment 81018 [details]
auxilliary file
auxiliary file needed due to vlookup function in original data
ALG: Opening file from comment 4 asks for updating links to another file (probably file from comment 5), requires password for file 'File2.ods', please add password. The original task is about getting a *bitmap* image in an external paint program when copy/pasting a chart, not about copying the chart between apps of AOO4.0. Copy/Pasting between apps in AOO4.0 is #120559#. To check for copy/paste between AOO4.0 apps I will need the password for file 'File2.ods'. Copy/pasting with gimp is not reliable; I found myself some time ago that the clipboard support of gimp is varying from version to version, thus it is better to check with various graphic apps. On win I checked: - copy/pasting from Writer /test file from comment 3) to paint.net -> works well - to gimp2.8 -> not directly from Writer, but as workaround it's possible to copy/paste to Draw/Impress, convert to bitmap there and copy/paste to Gimp. - to MyPaint: Same as for Gimp. Original bug is questionable: Is it intended to copy a chart from Writer to an external pixel program directly? It is possible from Draw/Impress directly, all others should get the chart first copied to Draw/Impress as workaround. ALG: Using Paint from win7 directly (as reference for clipboard functionality): The chart can be directly copied from all apps (also checked that copying the chart from test doc from comment 3 to all other apps, works well without data loss). The question for other external paint programs is more what clipboard formats these support, AOO offers something useful in all cases. password is scooter. File is related to some other bug I reviewed, sorry. ALG: Hi Edwin, thanks for the password, but - it does not work. It says 'the password is incorrect'. Please check with 'File1.ods'. I check and recheck - scooter, like the famous German band :) ALG: Edwin, I may be too lame to type that, but I cannot open 'File1.ods' from comment 4 using 'scooter' as password. What's going on ;-) Created attachment 81046 [details]
File 1 no password
This is strange...
Only scooter opens the file.
This attachment is just save as without password.
ALG: Thanks Edwin, can open now. Still strange, and after load and update, the value '13' is not shown in the chart. After activating and toggling dataRanges/DataSeriesInRows and back to Columns it gets visible, a refresh problem...? copy/pasting in calc or to new app does not lose any data (thus #120559# was successful), but changes the data labels on the Y-Axis from simple values to date format. Is that what you mean with 'wrong numerical values'? If yes, please check if we have a task for this or create a new one. This can also be reproduced by creating a chart as this newly just with fixed values and copy/pasting it. - Does not happen in OOo3.3 - Does not happen in OOo3.2 Back to this task: I checked on mac; I do not know what app to use as standard regarding clipboard implementation, but it can be copied to some apps. The workaround converting to graphic is always possible. (In reply to Armin Le Grand from comment #13) > Is that what you mean with 'wrong numerical values'? If yes, > please check if we have a task for this or create a new one. Yes - opened bug 122714 Additional Info: --------------- (a) The original report was concerning a copy/paste problem of Charts to Gimp. That never worked for me with OOo back to 1.1.5 (b) As Edwin stated, that might be a Gimp problem. (c) But from the same sample document opened with I can Copy / Paste the chart object to Gimp (c1) From Gnumeric (c2) From SoftMaker FreeOffice (using an .xls) (c3) Even from Lotus Symphony Release 3.0.1 Revision 20120110.2000 Copy / Paste of Chart to Gimp works fine. So this might be an OOo / AOO problem? (d) Already reproducible with Pre-3.4.0 (OOo 1.1.5), but because of crippled Version selector (Bug 123063) no useful info can be contributed (d) all the same when I try to copy / paste a chart object from Writer to Gimp (e) but the problem Copy/Paste to gimp is not limited to Chart objects. Fails with same error message for copy / paste from AOO 4.0.1 (e1) Formula object from Writer, Calc, Draw (e2) Spreadsheet object from writer (others not tested I will obsolete all old Attachmets because they are only worrying hand do not have to do anything with the original report. Created attachment 82198 [details]
Sample Document
Steps how to reproduce with "AOO 4.0.1 – German UI / German locale [Rev. 1524958 2013-09-20 11:40:29]" on German WIN7 Home Premium (64bit)", “historic” 4.0 User Profile used for all predecessor versions
0. Launch Gimp
1. From AOO Start Center open attached sample document
2. Click Chart (or Formula)
3. <control+c> for Copy
4. Switch to Gimp
5. <Control+v> for paste
(Alternatively: menu 'Edit -> Paste As -> New picture)
Expected: new picture with chart image
Actual: Error message: "Clipboard does not contain picture ..." :-(
Works with 'Paint' and 'Paint.NET', but not with 'MyPaint' or 'Gimp2.8'. This shows that AOO offers (bitmap?) data that can be consumed. Need to check deeper... If your OS uses X11, the list of clipboard formats currently on the clipboard can be checked with this command: $ xclip -selection clipboard -target TARGETS When a chart is copied, the returned list of clipboard formats is: ---snip--- application/x-openoffice-embed-source-xml;windows_formatname="Star Embed Source (XML)" application/x-openoffice-objectdescriptor-xml;windows_formatname="Star Object Descriptor (XML)";classname="12DCAE26-281F-416F-a234-c3086127382e";typename="Star Object Descriptor (XML)";viewaspect="1";width="16000";height="9000";posx="0";posy="0" application/x-openoffice-gdimetafile;windows_formatname="GDIMetaFile" application/x-openoffice-emf;windows_formatname="Image EMF" application/x-openoffice-wmf;windows_formatname="Image WMF" MULTIPLE ---snip--- which are all internal formats, completely useless to third-party apps like GIMP. With LO I get a longer list: ---snip--- application/x-openoffice-embed-source-xml;windows_formatname="Star Embed Source (XML)" application/x-openoffice-objectdescriptor-xml;windows_formatname="Star Object Descriptor (XML)";classname="12DCAE26-281F-416F-a234-c3086127382e";typename="Star Object Descriptor (XML)";viewaspect="1";width="16000";height="9000";posx="0";posy="0" application/x-openoffice-gdimetafile;windows_formatname="GDIMetaFile" application/x-openoffice-emf;windows_formatname="Image EMF" application/x-openoffice-wmf;windows_formatname="Image WMF" application/x-openoffice-bitmap;windows_formatname="Bitmap" image/png image/bmp TARGETS MULTIPLE TIMESTAMP SAVE_TARGETS ---snip--- where image/png or image/bmp are presumably what GIMP imports. Gnumeric offers by far the longest list: ---snip--- TIMESTAMP TARGETS MULTIPLE SAVE_TARGETS application/x-gnumeric application/x-goffice-graph image/svg image/svg+xml image/png image/avif image/bmp image/x-bmp image/x-MS-bmp image/x-icon image/x-ico image/x-win-bitmap image/vnd.microsoft.icon application/ico image/ico image/icon text/ico image/jpeg image/jxl image/tiff ---snip--- So what clipboard formats should we be exporting charts with? 1. Export as raster image formats like image/png and/or image/bmp. Possibly, but this requires rasterizing vector images before export to the clipboard, which is lossy. 2. Export as the official MIME types for WMF and EMF (image/wmf and image/emf) as per https://datatracker.ietf.org/doc/html/rfc7903, which third party applications should recognize better, unlike our private MIME types application/x-openoffice-wmf and application/x-openoffice-emf which are a mystery to all. 3. Export as other vector graphics formats, such as SVG. Doing this: $ xclip -selection clipboard -target 'application/x-openoffice-wmf;windows_formatname="Image WMF"' -o > /tmp/image.wmf does allow GIMP to open /tmp/image.wmf successfully. However just because GIMP can open WMF files on disk, doesn't mean it can paste them, trying: $ xclip -selection clipboard -target 'image/wmf' -in /tmp/image.wmf still doesn't paste in GIMP, despite pasting the same contents successfully with xclip. Couldn't paste it in Inkscape either :-(. But I can finally paste into MyPaint. So it looks like GIMP and Inkscape do not support WMF on the clipboard, even though they can open them from files on disk. Putting an SVG image on the clipboard, eg: $ xclip -selection clipboard -target 'image/svg+xml' -in /usr/local/share/icons/gnome/scalable/emotes/face-angel-symbolic.svg does allow GIMP and Inkscape and MyPaint to paste it successfully. So for maximum interoperability we should export charts in: - WMF and EMF, using the official MIME types, for some apps like MyPaint. - SVG, for GIMP, Inkscape, and other apps. MyPaint seems extremely fussy and can only paste when "image/wmf" is the only format on the clipboard. GIMP and Inkscape cannot paste even then. I am very close to getting SVG export to the clipboard implemented though, "image/svg+xml" shows up as a clipboard format, but pasting fails somewhere. It's working. Copying Calc charts and Draw figures into the clipboard, now does allow them to be pasted in GIMP and Inkscape in the lossless SVG format. It took a while to figure out but was surprisingly easy to add, OpenOffice already has an SVG GraphicsConverter, all that was necessary was to declare the SVG clipboard format, and update the clipboard callbacks to use the SVG GraphicsConverter when the SVG format is requested. I am just testing on Windows before I push my changes. Fixed by commit 61aee323790d0a1ed0745ee5a84b8885bcd0a559 in trunk, resolving FIXED. Thank you for your bug report. Cherry-picked for AOO42X with commit ad6faf9749cad74c167c20bfc434a305f8fb5e15. |