Bug Hunting Session
Bug 60651 - A copy/paste of shape from Microsoft Visio 2007 to Libreoffice Draw is not visible.
Summary: A copy/paste of shape from Microsoft Visio 2007 to Libreoffice Draw is not vi...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: mab4.0
  Show dependency treegraph
 
Reported: 2013-02-11 10:56 UTC by Joël Frankson
Modified: 2013-11-08 13:34 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Files and screens (158.27 KB, multipart/zip)
2013-02-11 10:56 UTC, Joël Frankson
Details
Scenario with new Libreoffice version (620.06 KB, application/zip)
2013-04-16 12:07 UTC, Joël Frankson
Details
EMF file that causes problems (4.26 KB, image/x-emf)
2013-05-12 07:59 UTC, Chris Sherlock
Details
better rendering ? (101.17 KB, image/png)
2013-06-11 17:14 UTC, Michael Meeks
Details
Vision original screenshot (267.85 KB, image/png)
2013-06-12 09:02 UTC, A. Stucki
Details
after insertion in master 2013-06-11 (88.75 KB, image/png)
2013-06-12 09:02 UTC, A. Stucki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joël Frankson 2013-02-11 10:56:32 UTC
Created attachment 74598 [details]
Files and screens

Source: Microsoft Office Vision 2007
Target: LibreOffice Draw Version 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89) Version FR

1. Original document - See attachment Source.vsd
2. Copy the object "Key user" (in Source.vsd) via CTRL+c
3. Opening LibreOffice Draw
4. copy 1: Edit/Special paste/Microsoft Visio Drawing
5. Moving the object top left and adding the text "Copy 1" after a 2xclic on the object
6. copy 2: Edit/Special paste/GDI Metafile
7. Moving the object top center and adding the text "Copy 2" after a 2xclic on the object
8. copy 2: Edit/Special paste/Bitmap
9. Moving the object top right and adding the text "Copy 3" after a 2xclic on the object
10. See the snapshot in the attachment Snapshot1 - Copies.jpg
11. Saving the draw document: My test.odg (till now, the objects are visible)
12. Closing LibreOffice Draw
13. Starting LibreOffice Draw and selection of the last used document.
14. Two objects disappear (1 and 2) but the text still visible - Attachment Snapshot2 - Opening after LibreOffice restart.jpg

Thank you for your feedback and your help.

Regards

Joël Frankson
Comment 1 Joel Madero 2013-03-21 15:40:03 UTC
Unfortunately it looks like in order to test this you need MS Visio - I'm not sure if anyone in QA has it but I will ask around.

Note: I tried just opening the visio file in Draw, copy from Draw to a new Draw file, it worked fine, saved, closed, opened, the images all were still there.

Can you confirm that this works for you? If this is true, then it's physically copying from Visio to Draw that's the issue which seems really strange to me :-/
Comment 2 Joël Frankson 2013-03-22 14:01:38 UTC
Hi,

I confirm all works fine from Draw to Draw.
I've made additional tests from Visio to Draw witout success.

Regards.
Comment 3 BorosIstvan 2013-04-05 14:06:28 UTC
I can't reproduce that bug, i try at 4.0.0.2, and 4.0.2.2 version and in the daily master, but i can't. What is your operating system?
Comment 4 Joel Madero 2013-04-14 16:58:59 UTC
Marking as NEEDINFO as the last person to leave a comment has requested additional information and has said that things seem to work fine for them.

@ BorosIstvan  -- did you test this with Visio or from draw to draw? Just asking because Joël has said it only occurs when copying from Visio

@Joël - have you tested with latest stable release of LibreOffice? Also, can you paste to other software from Visio (not even sure what software you could test this on) but I want to narrow down the cause. It sounds like it could be clipboard bug and not LibreOffice as you can copy just fine from LibreOffice to LibreOffice the same object.

Please answer the questions that have been asked and then mark as UNCONFIRMED, then we'll track down Visio users to test.


Thanks!
Comment 5 Joël Frankson 2013-04-16 12:05:38 UTC
@ Istvan
H've just installed the version 4.0.2.2 (Build ID: 4c82dcdd6efcd48b1d8bba66bfe1989deee49c3)
My OS: Windows 7 Professionnel (FR) Service Pack1 32bits
Hardware:
Dell Latitude E5410
Intel(R) Core(TM) i3 CPU M350 2.27GHz
RAM: 4,00 Gb

@ Joel
My new test scenario is:
1. Select a built-in shape (Microsoft Office Visio 2007) and insert it in a new Visio document (vsd)
2. Copy this shape (CTRL+C) and past it in Libreoffice Draw AND IN Microsoft Word 2010
To do the paste, I've used the special paste to try all options

Result:
All the pasted images are visible in Libreoffice Draw and Microsoft Word.
After a "close file/open file" all the images are visible in Microsoft Word but not in Libreoffice Draw.

Rem1: After the file reopening, the "no visible images" appear like a flash and disappear suddenly.
Rem2: I've append the files and print screens of my last test

Hope help you
Comment 6 Joël Frankson 2013-04-16 12:07:09 UTC
Created attachment 78074 [details]
Scenario with new Libreoffice version
Comment 7 Joel Madero 2013-04-21 06:53:58 UTC
Bjoern - that visio bug that we discussed, you mind triaging it?
Comment 8 Chris Sherlock 2013-05-01 16:30:24 UTC
I can confirm on a recent build of master. I've enabled debugging, I'm getting the following output when I open that .odg file:

chris@LibreOfficeDev:~/repos/LibreOffice/core$ /home/chris/repos/LibreOffice/core/solver/unxlngi6/installation/opt/program/soffice.bin --norestore --nologo '--accept=pipe,name=chris;urp;' -env:UserInstallation=file:///home/chris/repos/LibreOffice/core/solver/unxlngi6/installation/
Gtk-Message: Failed to load module "overlay-scrollbar"
warn:sfx2.dialog:26061:1:sfx2/source/dialog/filtergrouping.cxx:361: already have an element for WordPerfect
warn:sfx2.dialog:26061:1:sfx2/source/dialog/filtergrouping.cxx:361: already have an element for writerweb8_writer_template
warn:sfx2.dialog:26061:1:sfx2/source/dialog/filtergrouping.cxx:361: already have an element for writerglobal8
warn:sdremote.bluetooth:26061:10:sd/source/ui/remotecontrol/BluetoothServer.cxx:173: invalid type of reply to DefaultAdapter: '115'
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 34 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 34 > length 4
warn:legacy.tools:26061:1:sfx2/source/control/bindings.cxx:2245: No cache for OfficeDispatch!
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 34 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 34 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 34 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 70 > length 4
warn:cppcanvas:26061:1:cppcanvas/source/mtfrenderer/emfplus.cxx:1934: ImplRenderer::processEMFPlus: size 34 > length 4
Comment 9 Chris Sherlock 2013-05-01 16:45:34 UTC
Reproduced on Ubuntu 12.10, LibreOffice 4.1.0.0.alpha0 2de7919b66b799199ec711dbd75100c15619bf0
Comment 10 Chris Sherlock 2013-05-04 03:06:06 UTC
The warnings occur due to commit ec0d1440cf07008a220708535848567bcbb233ea (not causing the issue itself though), which resolved an infinite loop. 

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ec0d1440cf07008a220708535848567bcbb233ea
Comment 11 Chris Sherlock 2013-05-12 07:59:56 UTC
Created attachment 79190 [details]
EMF file that causes problems

The following EMF file causes issues.
Comment 12 Chris Sherlock 2013-05-12 08:01:58 UTC
Reproducible test case:

1. Open Word 2010
2. Insert the attached EMF file as a picture
3. Copy the picture in MS Word
4. Open LibreOffice drawing
5. Paste image into drawing document
6. Save the file as a .odg file
7. Close LibreOffice
8. Open the .odg file created in step 6

Result:

Image does not display.
Comment 13 Chris Sherlock 2013-05-21 09:15:26 UTC
What I'm noticing about the metafile is that the first record with an issue has the byte sequence:

GDIComment
|
+-- EMF+ header
|
+-- byte sequence: 46 00 00 00 46 00 00 00 10 02 00 00 04 02 00 00...


Notice that 46 00 00 00 indicate a GDIComment... if you take off the first 46 00 00 00, then it looks like a valid record. 

It seems that quite a few EMF records in the EMF file are presenting this issue. It's almost as if there is some sort of padding going on with EMF+ records, but for the life of me I can't work out why this would be!
Comment 14 Michael Meeks 2013-06-11 17:13:47 UTC
Hi guys - so - we just fixed a number of key EMF+ bugs in master around clipping, PieArcs, rendering to bitmaps (via Cairocanvas on Linux) and more.

So - eg. Chris Sherlock - your most recent EMF+ attachment works fine for me (at least as well as it does in Office 2010 ;-)

I'd love to know if people can reproduce these problems with a recent master build - as of ~now. I attach a photo of the first attachment on master.
Comment 15 Michael Meeks 2013-06-11 17:14:25 UTC
Created attachment 80706 [details]
better rendering ?
Comment 16 A. Stucki 2013-06-12 09:00:40 UTC
Hi
I just tried to insert from Visio 2010 to master-2013-06-11.
The result is bad, as well for insert and insert special. See the attached screenshots: visio & inserted_in_master
Comment 17 A. Stucki 2013-06-12 09:02:05 UTC
Created attachment 80716 [details]
Vision original screenshot
Comment 18 A. Stucki 2013-06-12 09:02:38 UTC
Created attachment 80717 [details]
after insertion in master 2013-06-11
Comment 19 Michael Meeks 2013-06-12 10:24:52 UTC
A. Stucki - wow, that's a totally different & un-related screenshot without the Visio / EMF+ file to play with :-) Please can you file that as a separate bug - add it to the 'See Also' here, CC: me and Fridrich on it and attach the source document so we can reproduce / debug it here. We can't afford to have all EMF+ bugs in one single bug :-)

So - since I can no longer reproduce the original issue here, and the cause (almost certainly a clipping error is fixed) I'm closing this bug.

Thanks !
Comment 20 Chris Sherlock 2013-06-12 16:18:01 UTC
Ah! I see commit f387c5da5a824df6cf2874155c13445a86804475 which was done by Fridrich now passes the bounding box to the EMF+ header. 

10 to 1 that fixed the cause of the problem. Probably fixed a whole raft of other issues too, I'd hazard a guess. 

Great work!