예제 #1
0
        public void InheritFromThemeAsRequired(XSSFColor color)
        {
            if (color == null || !color.GetCTColor().themeSpecified)
            {
                return;
            }
            XSSFColor themeColor = this.GetThemeColor(color.GetTheme());

            color.GetCTColor().SetRgb(themeColor.GetCTColor().GetRgb());
        }
예제 #2
0
        /**
         * If the colour is based on a theme, then inherit
         *  information (currently just colours) from it as
         *  required.
         */
        public void InheritFromThemeAsRequired(XSSFColor color)
        {
            if (color == null)
            {
                // Nothing for us to do
                return;
            }
            if (!color.GetCTColor().themeSpecified)
            {
                // No theme Set, nothing to do
                return;
            }

            // Get the theme colour
            XSSFColor themeColor = GetThemeColor(color.GetTheme());

            // Set the raw colour, not the adjusted one
            // Do a raw Set, no adjusting at the XSSFColor layer either
            color.GetCTColor().SetRgb(themeColor.GetCTColor().GetRgb());

            // All done
        }