Bug 48916

Summary: font.color problem in RichTextRun copied from one SlideShow to another
Product: POI Reporter: Jeff Lavezzo <jeffrey.l.lavezzo>
Component: HSLFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.6-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Example code to illustrate the problem
The 'template' PPT file for use with the example code
The 'merge' PPT to use with the example code.

Description Jeff Lavezzo 2010-03-15 17:55:26 UTC
Created attachment 25129 [details]
Example code to illustrate the problem

Using the attached Java and PPTs, the copied text in the output PPT has font.color of white, even though the original is black and efforts are made to make the color black.

This seems to be specific to the version of PowerPoint used to make the slides, which is my customer's domain.  I can make PPTs in OpenOffice that do not show this problem.

Also, and this can be separated out into another bug if appropriate, when setting the font.color of RichTextRuns in a slides MasterSlide I get a NPE.  This is also in the example code.
Comment 1 Jeff Lavezzo 2010-03-15 17:56:20 UTC
Created attachment 25130 [details]
The 'template' PPT file for use with the example code
Comment 2 Jeff Lavezzo 2010-03-15 17:57:10 UTC
Created attachment 25131 [details]
The 'merge' PPT to use with the example code.
Comment 3 Yegor Kozlov 2010-04-03 15:09:50 UTC
The problem should be fixed in r930525

The Invalid Color issue was caused by improper caching of decoded ppt records. 
Two objects (TextShape and EscherTextboxWrapper) cached different instances of the same logical records which resulted in incorrect text colors in the resulting ppt. 

The NPE was caused by null parent in parent-aware records. Propagation of parent to parent-aware descendants is automatic, it happens when constructing SlideShow. Your bug helped to discover a special case which was not covered.

Regards,
Yegor