You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/11/15 22:42:18 UTC

DO NOT REPLY [Bug 51222] XSSFColor.getARGBHex() returns wrong color for Excel 2007 xlsx file

https://issues.apache.org/bugzilla/show_bug.cgi?id=51222

--- Comment #3 from Mick Sear <mi...@succeed.co.uk> 2011-11-15 21:42:18 UTC ---
I've also had this problem.  3.8 beta 4 seems to invert black and white.

I tested with 3.8 beta 4, which shows the problem, and 3.7, which is correct.

@Test
    public void testXSSFColor(){
        //Ver 3.8beta4 of poi-xml seems buggy
        Color c = new Color(0,0,0);
        XSSFColor c2 = new XSSFColor(c);

        //Actually, ver 3.7 seems wrong too - Shouldn't ARGB black be FF000000?
        //3.8 beta 4 returns FFFFFFFF
        //3.7 returns 000000
        assertTrue(c2.getARGBHex().equals("000000"));

        Color c3 = new Color(255,255,255);
        XSSFColor c4 = new XSSFColor(c3);
        //3.8 beta 4 returns FF000000
        //3.7 returns FFFFFF
        assertTrue(c4.getARGBHex().equals("FFFFFF"));
    }

Net result is that if you specify new new XSSFColor(Color(0,0,0)) as the font
colour, you get white text.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org