Bug 48916 - font.color problem in RichTextRun copied from one SlideShow to another
Summary: font.color problem in RichTextRun copied from one SlideShow to another
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: 3.6-FINAL
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-15 17:55 UTC by Jeff Lavezzo
Modified: 2010-04-03 15:09 UTC (History)
0 users



Attachments
Example code to illustrate the problem (5.13 KB, text/x-java)
2010-03-15 17:55 UTC, Jeff Lavezzo
Details
The 'template' PPT file for use with the example code (229.50 KB, application/octet-stream)
2010-03-15 17:56 UTC, Jeff Lavezzo
Details
The 'merge' PPT to use with the example code. (536.50 KB, application/vnd.ms-powerpoint)
2010-03-15 17:57 UTC, Jeff Lavezzo
Details

Note You need to log in before you can comment on or make changes to this bug.
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