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/10/24 23:43:33 UTC

DO NOT REPLY [Bug 52079] New: Colors black font white when specifically set

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

             Bug #: 52079
           Summary: Colors black font white when specifically set
           Product: POI
           Version: 3.8-dev
          Platform: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: gjungman@utilinc.com
    Classification: Unclassified


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));
                }

-- 
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


DO NOT REPLY [Bug 52079] Colors black font white when specifically set

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52079

mcroci@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcroci@gmail.com

-- 
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


[Bug 52079] Colors black font white when specifically set

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52079

Bodo Wippermann <bo...@bodow.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bodo@bodow.de

--- Comment #1 from Bodo Wippermann <bo...@bodow.de> ---
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.

-- 
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


Re: [Bug 52079] Colors black font white when specifically set

Posted by Bodo Wippermann <bo...@bodow.de>.
Am 07.11.2012 14:05, schrieb Aurimas:
> The issue still appears when trying to set the font color using
> XSSFFont.setColor(XSSFColor)Although XSSFColor was constructed properly, but
> in XSSFFont.setColor, the XSSFColor.getRgb() method is called which returns
> back the switched RGB values for black and white colors

i submitted a patch in August. XSSFColor would be corrected with the 
patch, but as i stated in a previous comment, it would break existing code.



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


Re: [Bug 52079] Colors black font white when specifically set

Posted by Aurimas <au...@outlook.com>.
The issue still appears when trying to set the font color using
XSSFFont.setColor(XSSFColor)Although XSSFColor was constructed properly, but
in XSSFFont.setColor, the XSSFColor.getRgb() method is called which returns
back the switched RGB values for black and white colors



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-52079-New-Colors-black-font-white-when-specifically-set-tp4934312p5711429.html
Sent from the POI - Dev mailing list archive at Nabble.com.

[Bug 52079] Colors black font white when specifically set

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52079

--- Comment #2 from Bodo Wippermann <bo...@bodow.de> ---
Created attachment 29219
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29219&action=edit
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 !

-- 
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