Bug 53275

Summary: XSSFColor.setColor requires to clear previously set 'indexed' flag if color is non-indexed (theme) color
Product: POI Reporter: andrei <andrei.astrouski>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: major    
Priority: P2    
Version: 3.8-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   

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.