Issue 119513 - [From Symphony]Picture is lost when opening sample PPT file
Summary: [From Symphony]Picture is lost when opening sample PPT file
Alias: None
Product: Impress
Classification: Application
Component: save-export (show other issues)
Version: 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
Depends on:
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 in: ---
Developer Difficulty: ---

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

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]
Comment 2 Du Jing 2012-05-29 08:18:04 UTC
Created attachment 77715 [details]
Comment 3 Du Jing 2012-05-29 08:26:35 UTC
Created attachment 77716 [details]
Comment 4 Du Jing 2012-05-29 08:27:12 UTC
Created attachment 77717 [details]
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.
A value that is specified in the following table.
JPEG in RGB color space
JPEG in RGB color space
JPEG in CMYK color space
JPEG in CMYK color space
Comment 8 Lei Debin 2012-06-06 07:58:06 UTC
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
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]
Comment 11 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