Issue 58151 - Freeze Importing a Windows Word document containing .EMF or WMF
Summary: Freeze Importing a Windows Word document containing .EMF or WMF
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOo 2.0
Hardware: PC All
: P2 Trivial (vote)
Target Milestone: OOo 3.x
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2005-11-19 10:01 UTC by fulmine68
Modified: 2013-02-07 21:50 UTC (History)
1 user (show)

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

This tar.gz attachment contains the two test cases (.EMF and .WMF) (214.12 KB, application/x-gzip)
2005-11-19 10:04 UTC, fulmine68
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description fulmine68 2005-11-19 10:01:16 UTC
I work in an Microsoft Office 2003 environment. So I exchange a lot of 
documents with them. Each of these docs contains a mixture of text and 
graphics, mainly in EMF (Enhanced Meta File) or WMF (Windows Enhanced 
When I try to import those documents OO Writer ehaves in the following ways: 
EMF: the doc imports fine. OO Writer freezes when I zoom in or zoom out 
WMF: OO Writer freezes on import 
All is fine when importing a doc with .PNG or .JPG images 
I have documents to test this behaviour
Comment 1 fulmine68 2005-11-19 10:04:37 UTC
Created attachment 31627 [details]
This tar.gz attachment contains the two test cases (.EMF and .WMF)
Comment 2 ulf.stroehler 2005-11-21 07:57:36 UTC
fulmine68 thanks for reporting and providing the bugdoc.

indeed this looks like a freeze; my first guess after attaching the debugger was
a deadlock but then continuing revealed that it loads but needs unacceptably
long. Can you confirm that the document is loaded?
I still consider this a serious (performance) bug.
Comment 3 ulf.stroehler 2005-11-21 08:00:13 UTC
looks like z_inflate_flush () from consumes most of the time.
Comment 4 ulf.stroehler 2005-11-21 09:22:18 UTC
transferring to SJ and confirming.
Comment 5 fulmine68 2005-11-21 11:17:29 UTC
Thank you for your prompt reply.
Today evening I'll try to open the documents and wait until (if) they are loaded.

Stay tuned.

Comment 6 sven.jacobi 2005-11-21 11:19:16 UTC
SJ->THB: This is double to one of your wmf clipping problems.

 	tl680mi.dll!basegfx::B2DPolyPolygon::count()  + 0x9d9	C
 	tl680mi.dll!_gpc_polygon_clip()  + 0x8b6	C
 	tl680mi.dll!PolyPolygon::ImplDoOperation()  + 0x3d	C++
 	tl680mi.dll!PolyPolygon::GetDifference()  + 0x10	C++
>	svt680mi.dll!WinMtfClipPath::ExcludeClipRect(const Rectangle & rRect={...})
 Line 111	C++
 	svt680mi.dll!WinMtfOutput::ExcludeClipRect(const Rectangle & rRect={...}) 
Line 880	C++
 	svt680mi.dll!WMFReader::ReadRecordParams(unsigned short nFunction=1045) 
Line 814	C++
 	svt680mi.dll!WMFReader::ReadWMF()  Line 1071	C++
 	svt680mi.dll!ConvertWMFToGDIMetaFile(SvStream & rStreamWMF={...}, GDIMetaFile
& rGDIMetaFile={...}, unsigned char (void *, unsigned short)*
pCallback=0x01407750, void * pCallerData=0x00eee528)  Line 86 + 0x74	C++
 	svt680mi.dll!GraphicFilter::ImportGraphic(Graphic & rGraphic={...}, const
String & rPath={...}, SvStream & rIStream={...}, unsigned short nFormat=0,
unsigned short * pDeterminedFormat=0x00000000, unsigned long nImportFlags=0) 
Line 1572 + 0x1c	C++
 	svt680mi.dll!GraphicFilter::FilterCallback(ConvertData * pData=0x00eee61c) 
Line 2278 + 0x36	C++
 	svt680mi.dll!GraphicFilter::LinkStubFilterCallback(void * pThis=0x08b6e078,
void * pCaller=0x00eee61c)  Line 2248 + 0xf	C++
 	tl680mi.dll!Link::Call()  + 0x11	C++
 	tl680mi.dll!Link::Call()  + 0x11	C++
 	vcl680mi.dll!GraphicConverter::Import(SvStream & rIStm={...}, Graphic &
rGraphic={...}, unsigned long nFormat=11)  Line 184 + 0xd	C++
 	vcl680mi.dll!GfxLink::LoadNative(Graphic & rGraphic={...})  Line 307 + 0x1a	C++
Comment 7 ulf.stroehler 2005-11-21 12:30:00 UTC
set target/component/subcomponent
Comment 8 sinysee 2008-01-15 13:02:15 UTC
In OOo 2.3.1 on Linux the issue is still there. I have a document that took over
15 minutes to open, while Microsoft Office opens it immediately. Most of the
time in OOo is spent in z_inflate_flush that is called from
ConvertGDIMetaFileToWMF() from

Tested existing test case (Test_EMF_WMF.doc.tar.gz attached to the issue).
Import takes over 1 minute CPU time.
Comment 9 urazovl 2008-02-16 02:36:22 UTC
Lachin Urazov Feb 15--
It does seem to take excessive time - performance problem
I ran the provided Test Case on 
A)1.7 Ghz P4 768 MB RAM Os: Win 2000 SP4 -- took 2:48 CPU time / 52 MB memory
B)1.7 Ghz Centrino 512 MB RAM OS:Win XP SP3 -- took 2:18 CPU time / 66 MB memory
whereas it takes !! 2 sec CPU time to open the same document using MS Word 2003
(19 MB memory)
Comment 10 urazovl 2008-02-16 02:41:05 UTC
btw, using OOo_2.3.1_Win32Intel en-US build for both configurations. (refer to
previous comment)
Comment 11 thb 2008-06-04 12:54:20 UTC
@sj: Please take this one back, it's unlikely I'll find time for it...
Comment 12 sven.jacobi 2008-06-05 14:23:22 UTC