Ejemplo n.º 1
0
        internal X14.ConditionalFormatting ToConditionalFormatting()
        {
            X14.ConditionalFormatting cf = new X14.ConditionalFormatting();
            // otherwise xm:f and xm:seqref becomes xne:f and xne:seqref
            cf.AddNamespaceDeclaration("xm", SLConstants.NamespaceXm);
            // how come sparklines don't need explicit namespace declarations?

            if (this.Pivot)
            {
                cf.Pivot = this.Pivot;
            }

            int i;

            for (i = 0; i < this.Rules.Count; ++i)
            {
                cf.Append(this.Rules[i].ToConditionalFormattingRule());
            }

            if (this.ReferenceSequence.Count > 0)
            {
                cf.Append(new Excel.ReferenceSequence(SLTool.TranslateCellPointRangeToRefSeq(this.ReferenceSequence)));
            }

            return(cf);
        }