Bug 52079 - Colors black font white when specifically set
Summary: Colors black font white when specifically set
Status: RESOLVED DUPLICATE of bug 51222
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.8-dev
Hardware: PC All
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on: 51236 53274
Blocks:
  Show dependency tree
 
Reported: 2011-10-24 21:43 UTC by Greg Jungman
Modified: 2016-07-12 07:26 UTC (History)
2 users (show)



Attachments
change XSSFColor constructors to adjust black and white (1.41 KB, patch)
2012-08-13 18:51 UTC, Bodo Wippermann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Jungman 2011-10-24 21:43:33 UTC
When I upgraded to 3.8 beta from 3.7 I had to adjust the below.  I have code that assigns the font, I had to change the code to not execute the below command if the font color was black, otherwise the text would be white, on a white background.

               if (!foreground.equals(Color.BLACK))// poi version 3.8 beta required to fix some bugs, but can't handle black foreground
                {
                    ((XSSFFont) font).setColor(new XSSFColor(foreground));
                }
Comment 1 Bodo Wippermann 2012-08-06 14:32:30 UTC
i can confirm it in 3.8 release.

i think it is the incorrect missing use of the method "correctRGB" in the 2 constructors of XSSFColor.
calling this.setRgb(...) instad of ctColor.setRgb(...) would fix it.
Comment 2 Bodo Wippermann 2012-08-13 18:51:49 UTC
Created attachment 29219 [details]
change XSSFColor constructors to adjust black and white

additionally patched org.apache.poi.xssf.model.ThemesTable as it used the constructor.

this patch will change the behavior of XSSFColor !
Comment 3 Dominik Stadler 2015-08-25 19:15:40 UTC
Also bug 53274 sounds related.
Comment 4 Yoann Rodière 2016-07-12 07:26:28 UTC
It seems that this bug has been finally solved in r1694093, released in POI version 3.14. See #51222 for explanations, and in particular https://bz.apache.org/bugzilla/show_bug.cgi?id=51222#c6 for a thorough analysis.

*** This bug has been marked as a duplicate of bug 51222 ***