Issue 2853 - .doc expands for hundred times
Summary: .doc expands for hundred times
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 641
Hardware: PC Windows 98
: P3 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords:
: 6833 7172 7428 (view as issue list)
Depends on:
Blocks:
 
Reported: 2002-01-16 08:52 UTC by ada2778
Modified: 2003-09-08 16:56 UTC (History)
1 user (show)

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


Attachments
The orignal .jpg graphic, size 169KB (169.50 KB, image/jpeg)
2002-01-16 08:59 UTC, ada2778
no flags Details
File created by MS Word (190.00 KB, application/msword)
2002-01-16 09:01 UTC, ada2778
no flags Details
The file opened by oo then save as .doc again (1.51 MB, application/msword)
2002-01-16 09:03 UTC, ada2778
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description ada2778 2002-01-16 08:52:40 UTC
1. Open a new .doc file using MS Word.
2. Insert a .jpg graphic and save.
3. Open this file using oo641.
4. Do nothing and save it as .doc format.
5. The file size then expands for hundred times.
Comment 1 ada2778 2002-01-16 08:59:49 UTC
Created attachment 950 [details]
The orignal .jpg graphic, size 169KB
Comment 2 ada2778 2002-01-16 09:01:37 UTC
Created attachment 951 [details]
File created by MS Word
Comment 3 ada2778 2002-01-16 09:03:54 UTC
Created attachment 952 [details]
The file opened by oo then save as .doc again
Comment 4 stefan.baltzer 2002-01-16 09:19:03 UTC
Reassigned.
Comment 5 michael.ruess 2002-01-16 15:21:31 UTC
MRU->CMC: When we import a Word document with a graphic and then
re-save it as .doc, the size increases. Isn´t it possible for us to
keep the original format of the graphic when we first import and then
again export such a doc?
BTW: the file size increase about ten times, not hundreds... ;-)
Comment 6 ada2778 2002-01-17 01:41:54 UTC
just to emphasize the problem
(excuse only, i really do a wrong calculation... ;-)
Comment 7 jp 2002-01-17 17:39:48 UTC
But this sounds for me like a problem of the MS esher import/export. 
And I think we have the same problem in the Excel and PowerPoint 
filter.
For esher imp./export is SJ responsible, so I assign this issue to 
him. If it is wrong, I'm sorry.
Comment 8 sven.jacobi 2002-01-22 11:10:13 UTC
The escher import/export is working correct. If I load the word 
document and paste the graphic into Impress or Calc and save it to 
then the corresponding Microsoft format, the original jpeg version of 
of the bitmap is used, and the size of the new document is passable, 
whereas if I save the document to Word the escher export 
implementation in svx is not used. It seems that there is a special 
treatment in the Writer and so Juergen might be the right contact for 
this problem.
Comment 9 jp 2002-01-22 13:48:58 UTC
JP->CMC: then please have a look to it
Comment 10 caolanm 2002-01-22 15:26:52 UTC
Yes, this graphic is an inline graphic. i.e. anchored as character, or
a 0x01 graphic.

"True" escher graphics are those that are not inline, the otherwise
anchored graphics (i.e. 0x08 graphics). Inline graphics are stored by
word in the older preescher mechanism. In older versions of word these
are metafiles and therefore big. In newer versions of word these
inline graphics can be stored as basically "fake" escher graphics.
i.e. in escher format but outside and seperate from the normal escher
graphics pool. 

The problem was that in the past we only imported these graphics
through something of a hack (WW8QuickHackForMSDFF_DirectBLIPImport).
There are one or two differences from these "fake" escher graphics
than those found normally in the pool. I was able to fold most of the
two graphic importing mechanisms together for importing
(cvs diff -r1.5 -r1.6 ww8graf2.cxx), but our export for inline
graphics continues to use the 0x01 mechanism with no eschers and
metafiles instead, which is the same for 97+ as well as 95-. 

It would be possible to export these inline graphics as these "fake"
escher ones, but there are a few unknowns in the header which would
have to be understood before doing so. One or two things that we can
ignore and skip on importing, but are likely vital for export to work.
And our escher exporter is also likely to have to be reworked to write
graphics outside the normal graphic pool. Basically how word is
creating these escher type compressed graphics outside the escher pool
is itself a hack that we would have to duplicate.
For what its worth this should only affect graphics anchored as
character, other types of anchoring shouldn't show such dramatic size
increase through being converted to metafiles on export. And documents
created like this work perfectly ok except for the size increase. I'll
look into it closer to see if we would be able to fix it.
Comment 11 caolanm 2002-05-31 12:42:12 UTC
Implementation needed, but not going to happen very soon.
Comment 12 caolanm 2002-08-22 09:31:02 UTC
*** Issue 7172 has been marked as a duplicate of this issue. ***
Comment 13 caolanm 2002-08-28 13:19:20 UTC
Have now implemented this technique for export of inline graphics. 

Results:
.doc original:          194,560 bytes
OOo output .doc:        182,784 bytes

So that's the kind of result we want to see :-)
Comment 14 caolanm 2002-08-28 13:19:58 UTC
Be a while until this makes a build, mark as started until that time.
Comment 15 caolanm 2002-09-18 11:32:35 UTC
This improvement is in place for SRX643z
Comment 16 prgmgr 2002-09-19 02:25:11 UTC
*** Issue 6833 has been marked as a duplicate of this issue. ***
Comment 17 michael.ruess 2002-09-19 11:00:34 UTC
MRU: Yes, works fine with this version. will be available for
OpenOffice in release 643.
Comment 18 prgmgr 2002-09-21 18:27:59 UTC
*** Issue 7428 has been marked as a duplicate of this issue. ***
Comment 19 ada2778 2002-10-25 05:14:44 UTC
test in developer version 643, this bug is not fixed yet
Comment 20 michael.ruess 2002-11-28 14:53:35 UTC
Yes, that's right. But the fix is noiw definitly in newer build
OpenOffice 643C.