Apache OpenOffice (AOO) Bugzilla – Issue 69695
An emf inserted into a wordprocessing document, saved as .doc,is not readable by Microsoft Word 2003 when opened
Last modified: 2013-02-07 22:00:44 UTC
The attached document is having a graphics inserted from MS Visio into a OpenOffice.org Writer document. When this document is saved as MS word doc, the graphics is still readable by OpenOffice.org/StarOffice, but it is not readable by Micro$oft Word.
Created attachment 39266 [details] A file demonstrating this behaviour
@sj: I had a look at the emf reading and writing code and it might be that we have got the header wrongly. I found this documentation http://wvware.sourceforge.net/caolan/ora-wmf.html and wherever it speaks about a value of size LONG in the extended metafile header, we use INT32, instead of a 64 bit number. Both for writing and for reading. So, an image that we create ourselves is easily readable by ourselves, but it fails on win32. I might be wrong and your documentation may be different, just let me know whether this is the problem or not.
Please, disregard my previous comment. I understood that LONG actually means signed DWORD in the docs and SHORT means signed WORD :-(
Yes, the emf graphic is not readable by Word, it means the attached Word document is already defect. I need to know how to reproduce this problem, if I am inserting a Visio Object into Writer and storing the document to Word, everything is fine. sj->wg: can you please try to reproduce this problem.
Sorry, nor can I reproduce this. When extracting the graphic from the file and trying it to load it in another application it does not show up, it is broken. Trying this with other, self build emf files is working.
Maybe this one will help: I am attaching three files first.emf, 2000034700003BCC000029FC60F4097A.svm and second.emf First.emf is obtained this way: A visio graphics is inserted into a MS Word document and saved. Using the DBG_EXTRACTGRAPHICS define in svx/source/msfilter/msdffimp.cxx extracted the emf file by opening the Word document in OOo. Second.emf is obtained this way: A visio graphics is inserted into OpenOffice.org document which is saved as *.odt. Than this document is opened and resaved as a word document. Using the same dbg option, I extracted the file from the document. 2000034700003BCC000029FC60F4097A.svm is what one can find in the Pictures directory of the ODT file.
Created attachment 39303 [details] A picture as it is stored in the odt file
Created attachment 39304 [details] an extended meta file that results from inserting the visio graphics into a MSWord document in MS word
Created attachment 39305 [details] emf file extracted from a msword document that results from OOo converting a odf file with a picture inserted
Many thanks for the new attachments, even though I can't still reproduce this issue by inserting an OLE object from Visio, the attachments are valuable, because I noticed that we do have a problem when exporting the svm graphic to emf, then only a part of the metafile is displayed in Word. I will fix the problem we have when exporting the attached svm graphic to emf (in the hope that this also solves everything else)
changed target
set target 3.x