Bug 53275 - XSSFColor.setColor requires to clear previously set 'indexed' flag if color is non-indexed (theme) color
Summary: XSSFColor.setColor requires to clear previously set 'indexed' flag if color i...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.8-FINAL
Hardware: PC All
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-22 16:43 UTC by andrei
Modified: 2015-09-03 20:47 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andrei 2012-05-22 16:43:03 UTC
Patch:

public void setColor(XSSFColor color) {
        if(color == null) _ctFont.setColorArray(null);
        else {
            CTColor ctColor = _ctFont.sizeOfColorArray() == 0 ? _ctFont.addNewColor() : _ctFont.getColorArray(0);
            if (ctColor.isSetIndexed()) {
                ctColor.unsetIndexed();
            }
            ctColor.setRgb(color.getRgb());
        }
    }
Comment 1 Dominik Stadler 2015-09-03 20:47:14 UTC
Fixed via r1701134, thanks for the suggestion.