Exemple #1
0
        /**
         * Set the foreground fill color as a indexed color value
         *
         * @param index - the color to use
         */
        public void SetFillForegroundColor(int index)
        {
            CT_PatternFill ptrn     = EnsureCTPatternFill();
            CT_Color       CT_Color = ptrn.IsSetFgColor() ? ptrn.fgColor : ptrn.AddNewFgColor();

            CT_Color.indexed = (uint)index;
        }
Exemple #2
0
        public void TestGetFillForegroundColor()
        {
            CT_Fill        ctFill        = new CT_Fill();
            XSSFCellFill   cellFill      = new XSSFCellFill(ctFill);
            CT_PatternFill ctPatternFill = ctFill.AddNewPatternFill();
            CT_Color       fgColor       = ctPatternFill.AddNewFgColor();

            Assert.IsNotNull(cellFill.GetFillForegroundColor());
            fgColor.indexed          = 8;
            fgColor.indexedSpecified = true;
            Assert.AreEqual(8, cellFill.GetFillForegroundColor().Indexed);
        }
Exemple #3
0
        public void SetFillForegroundColor(int index)
        {
            CT_PatternFill ctPatternFill = this.EnsureCTPatternFill();

            (ctPatternFill.IsSetFgColor() ? ctPatternFill.fgColor : ctPatternFill.AddNewFgColor()).indexed = (uint)index;
        }