View | Details | Raw Unified | Return to bug 52079
Collapse All | Expand All

(-)src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFColor.java (-2 / +2 lines)
Lines 44-55 Link Here
44
44
45
    public XSSFColor(java.awt.Color clr) {
45
    public XSSFColor(java.awt.Color clr) {
46
        this();
46
        this();
47
        ctColor.setRgb(new byte[]{(byte)clr.getRed(), (byte)clr.getGreen(), (byte)clr.getBlue()});
47
        this.setRgb(new byte[]{(byte)clr.getRed(), (byte)clr.getGreen(), (byte)clr.getBlue()});
48
    }
48
    }
49
49
50
    public XSSFColor(byte[] rgb) {
50
    public XSSFColor(byte[] rgb) {
51
        this();
51
        this();
52
        ctColor.setRgb(rgb);
52
        this.setRgb(rgb);
53
    }
53
    }
54
54
55
    /**
55
    /**
(-)src/ooxml/java/org/apache/poi/xssf/model/ThemesTable.java (-1 / +2 lines)
Lines 96-102 Link Here
96
       XSSFColor themeColor = getThemeColor(color.getTheme());
96
       XSSFColor themeColor = getThemeColor(color.getTheme());
97
       // Set the raw colour, not the adjusted one
97
       // Set the raw colour, not the adjusted one
98
       // Do a raw set, no adjusting at the XSSFColor layer either
98
       // Do a raw set, no adjusting at the XSSFColor layer either
99
       color.getCTColor().setRgb(themeColor.getCTColor().getRgb());
99
       // XSSFColor constructor was patched, so adjust back is now necessary
100
       color.setRgb(themeColor.getCTColor().getRgb());
100
       
101
       
101
       // All done
102
       // All done
102
    }
103
    }

Return to bug 52079