Issue 67165 - Metafiles do display or display incorrectly
Summary: Metafiles do display or display incorrectly
Status: CONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: ui (show other issues)
Version: OOo 2.0.3
Hardware: PC Windows, all
: P3 Trivial with 6 votes (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-10 00:59 UTC by gnewton
Modified: 2013-02-07 21:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
two emf and two wmf (42.39 KB, application/octet-stream)
2006-07-10 01:03 UTC, gnewton
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description gnewton 2006-07-10 00:59:48 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
Comment 1 gnewton 2006-07-10 01:03:05 UTC
Created attachment 37611 [details]
two emf and two wmf
Comment 2 Olaf Felka 2006-07-10 08:06:58 UTC
Please have a look.
Comment 3 kpalagin 2006-08-04 11:19:44 UTC
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.
Comment 4 thorsten.martens 2006-08-16 13:33:59 UTC
TM->CGU: Please have a look, thanks !
Comment 5 christian.guenther 2006-08-17 09:58:53 UTC
Please tell me how do you created the emf and the wmf.
Comment 6 christian.guenther 2006-08-17 10:01:05 UTC
I can reproduce the bug.
Please have a look.
Comment 7 gnewton 2006-08-17 18:12:24 UTC
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 
Comment 8 cactuscomputing 2010-04-15 20:09:03 UTC
Supporting emf correctly is very important, and will become more so over time.
Any chance of doing something about this in 3.3?
Comment 9 bongovr 2010-10-07 09:09:28 UTC
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.