Issue 119513 - [From Symphony]Picture is lost when opening sample PPT file
[From Symphony]Picture is lost when opening sample PPT file
Status: CLOSED FIXED
Product: Impress
Classification: Application
Component: save-export
3.4.0
All All
: P3 normal (vote)
: 4.0.0
Assigned To: AOO issues mailing list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-29 08:15 UTC by Du Jing
Modified: 2012-06-25 03:27 UTC (History)
4 users (show)

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


Attachments
part1 (976.56 KB, application/x-rar-compressed)
2012-05-29 08:17 UTC, Du Jing
no flags Details
part2 (976.56 KB, application/x-rar-compressed)
2012-05-29 08:18 UTC, Du Jing
no flags Details
part3 (976.56 KB, application/x-rar-compressed)
2012-05-29 08:26 UTC, Du Jing
no flags Details
part4 (163.77 KB, application/x-rar-compressed)
2012-05-29 08:27 UTC, Du Jing
no flags Details
ppt_lost_jpeg (513 bytes, patch)
2012-06-06 08:44 UTC, Lei Debin
debin.lei: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Du Jing 2012-05-29 08:15:25 UTC
buildinfo:AOO3.4_1327774

Open this sample PPT file, you will find the picture is lost.
Comment 1 Du Jing 2012-05-29 08:17:15 UTC
Created attachment 77714 [details]
part1
Comment 2 Du Jing 2012-05-29 08:18:04 UTC
Created attachment 77715 [details]
part2
Comment 3 Du Jing 2012-05-29 08:26:35 UTC
Created attachment 77716 [details]
part3
Comment 4 Du Jing 2012-05-29 08:27:12 UTC
Created attachment 77717 [details]
part4
Comment 5 Lei Debin 2012-06-05 07:05:40 UTC
I am looking at the issue
Comment 6 Lei Debin 2012-06-06 07:25:38 UTC
Found the root cause:
In the sample file, there is a jpeg file, which caused the issue.
The jpeg file is special in color space. It is JPEG in CMYK color space.
So the code not cover the case, get wrong jpeg data. The result is the image lost.
Comment 7 Lei Debin 2012-06-06 07:29:52 UTC
Here is the specification from MS document:
The OfficeArtBlipJPEG record specifies BLIP file data for the Joint Photographic Experts Group (JPEG) format
rh (8 bytes): An OfficeArtRecordHeader structure, as defined in section 2.2.1, that specifies the header for this record. The following table specifies the subfields.
rh.recInstance
A value that is specified in the following table.
0x46A
JPEG in RGB color space
1
0x46B
JPEG in RGB color space
2
0x6E2
JPEG in CMYK color space
1
0x6E3
JPEG in CMYK color space
2
Comment 8 Lei Debin 2012-06-06 07:58:06 UTC
Solution:
Here is the code
------------------------------------------------------------------------
case 0x46A :			// One byte tag then JPEG (= JFIF) data
case 0x6E0 :			// One byte tag then PNG data
case 0x7A8 :
nSkip += 1;			// One byte tag then DIB data
			break;
-------------------------------------------------------------------------
So then the case is 0x6E2(One byte tag then JPEG in CMYK color space)
the nSkip got the wrong value. We need to add the below:
case 0x6E2 :			// One byte tag then JPEG in CMYK color space
Comment 9 Yan Ji 2012-06-06 08:10:16 UTC
reproduced issue
Comment 10 Lei Debin 2012-06-06 08:44:59 UTC
Created attachment 78066 [details]
ppt_lost_jpeg
Comment 11 hdu@apache.org 2012-06-06 13:03:36 UTC
Excellent, thanks for the patch! Applied as revision 1346867 on trunk.

As the fix has a very high benefit to risk ratio it could be good for AOO 3.4.1 if the ooo-dev mailing list agrees when you discuss it there.
Comment 12 liuping 2012-06-25 03:27:37 UTC
confirm fixing the bug on ver 1351249 in Win7 ,pass