Apache OpenOffice (AOO) Bugzilla – Issue 119513
[From Symphony]Picture is lost when opening sample PPT file
Last modified: 2012-06-25 03:27:37 UTC
buildinfo:AOO3.4_1327774 Open this sample PPT file, you will find the picture is lost.
Created attachment 77714 [details] part1
Created attachment 77715 [details] part2
Created attachment 77716 [details] part3
Created attachment 77717 [details] part4
I am looking at the issue
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.
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
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
reproduced issue
Created attachment 78066 [details] ppt_lost_jpeg
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.
confirm fixing the bug on ver 1351249 in Win7 ,pass