Exemple #1
0
 /**
  * get the color value for the font
  * References a color defined as  Standard Alpha Red Green Blue color value (ARGB).
  *
  * @return XSSFColor - rgb color to use
  */
 public XSSFColor GetXSSFColor()
 {
     Spreadsheet.CT_Color ctColor = _ctFont.sizeOfColorArray() == 0 ? null : _ctFont.GetColorArray(0);
     if (ctColor != null)
     {
         XSSFColor color = new XSSFColor(ctColor);
         if (_themes != null)
         {
             _themes.InheritFromThemeAsRequired(color);
         }
         return(color);
     }
     else
     {
         return(null);
     }
 }
Exemple #2
0
        /**
         * Get the color to use for the selected border
         *
         * @param side - where to apply the color defInition
         * @return color - color to use as XSSFColor. null if color is not set
         */
        public XSSFColor GetBorderColor(BorderSide side)
        {
            CT_BorderPr borderPr = GetBorder(side);

            if (borderPr != null && borderPr.IsSetColor())
            {
                XSSFColor clr = new XSSFColor(borderPr.color);
                if (_theme != null)
                {
                    _theme.InheritFromThemeAsRequired(clr);
                }
                return(clr);
            }
            else
            {
                // No border set
                return(null);
            }
        }