Apache OpenOffice (AOO) Bugzilla – Issue 67165
Metafiles do display or display incorrectly
Last modified: 2024-02-18 10:55:51 UTC
w/Writer, Draw, and Impress: Two files are attached: an enhanced metafile (emf) and a windows metafile (wmf) each containing only a square and circle. The enhanced metafile does not display at all. The windows metafile containing the same square and circle displays correctly. Two additional files are attached: an enhanced metafile (emf) and a windows metafile (wmf) each containing a frame with hash marks (and 20 text labels) with a plot-like graph. The emf displays the plot-like graph but only a 'blob' for the frame (and text?). The wmf displays the plot-like graph and frame correctly, but the text is extremely oversize and does not correspond to the size set when drawn using Lucida Console (or any other OpenType or TrueType font). Outside tests: SquareAndCircle.emf/.wmf: user 1: displays ok in: Windows XP Image Viewer MS Word (v?) Excel (v?) PowerPoint (v?) user 2: Windows XP Pro results in: IrfanView 3.98 OK PaintShopPro 8.10 No image MSPaint OK OpenOffice 1.1 No image XP Preview OK MS Picture It 6.0 OK Delphi compiled App OK GraphTest.emf/.wmf : Windows XP SP2 user 3: (did not specify differentiation, as user 4 below seems to indicate difference in output for .emf vs .wmf on MSPaint/XP Preview) displays ok in: Windows Picture and Fax Viewer Microsoft Word 2002 MSPaint user 4: results in: Windows XP Pro (SP?) .emf .wmf MSPaint ok no text XP Preview ok no text PaintShopPro no no (has images, but garbled) IrfanView ok ok user 5: displays ok in Windows2000 SP4 EMF.exe (www.fengyuan.com/download, author of "Windows Graphics Programming: Win32 GDI and DirectDraw") Irfanview 3.98 Delphi (Borland) compiled Apps
Created attachment 37611 [details] two emf and two wmf
Please have a look.
Happens to me as well. SquareAndCircle.wmf is the only file, that displays in Writer just fine. All others are distorted in one way or another. Please set Status to New.
TM->CGU: Please have a look, thanks !
Please tell me how do you created the emf and the wmf.
I can reproduce the bug. Please have a look.
All files were created with Borland's Delphi Professional v.7.01. Code for the square and circle files: FMF := TMetafile.Create; FMFCanvas := TMetafileCanvas.Create(FMF,0); XExtent := 9586; YExtent := 9586; SetMapMode(FMFCanvas.Handle, MM_ISOTROPIC); SetWindowExtEx(FMFCanvas.Handle, XExtent, YExtent,nil); FMFCanvas.Rectangle(363,-363,9223,-9223); FMFCanvas.Ellipse(363,-363,9223,-9223); FMFCanvas.Free; FMF.SaveToFile('SquareAndCircle.wmf'); FMF.Free; FEnhMF := TMetafile.Create; FEnhMFCanvas := TMetafileCanvas.Create(FEnhMF,0); XExtent := 9586; YExtent := 9586; SetMapMode(FMFCanvas.Handle, MM_ISOTROPIC); SetWindowExtEx(FMFCanvas.Handle, XExtent, YExtent,nil); FEnhMFCanvas.Rectangle(363,-363,9223,-9223); FEnhMFCanvas.Ellipse(363,-363,9223,-9223); FEnhMFCanvas.Free; FEnhMF.SaveToFile('SquareAndCircle.emf'); FEnhMF.Free; The graph plot type files called a more elaborate series of statements. All of the resulting Windows API code (in the .emf files) can be viewed with EMF.exe from www.fengyuan.com/download
Supporting emf correctly is very important, and will become more so over time. Any chance of doing something about this in 3.3?
I can reproduce this issue. WMF files work, while EMF files and EMF format content on the clipboard do not work. Graphic is shown partially in EMF format. Looks like coordinates for clipping rectangle are not set properly.