Ejemplo n.º 1
0
        internal void FromConditionalFormat(ConditionalFormat cf)
        {
            this.SetAllNull();

            if (cf.Scope != null)
            {
                this.Scope = cf.Scope.Value;
            }
            if (cf.Type != null)
            {
                this.Type = cf.Type.Value;
            }
            if (cf.Priority != null)
            {
                this.Priority = cf.Priority.Value;
            }

            SLPivotArea pa;

            using (OpenXmlReader oxr = OpenXmlReader.Create(cf))
            {
                while (oxr.Read())
                {
                    if (oxr.ElementType == typeof(PivotArea))
                    {
                        pa = new SLPivotArea();
                        pa.FromPivotArea((PivotArea)oxr.LoadCurrentElement());
                        this.PivotAreas.Add(pa);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        internal SLPivotArea Clone()
        {
            SLPivotArea pa = new SLPivotArea();

            pa.Field       = this.Field;
            pa.Type        = this.Type;
            pa.DataOnly    = this.DataOnly;
            pa.LabelOnly   = this.LabelOnly;
            pa.GrandRow    = this.GrandRow;
            pa.GrandColumn = this.GrandColumn;
            pa.CacheIndex  = this.CacheIndex;
            pa.Outline     = this.Outline;
            pa.Offset      = this.Offset;
            pa.CollapsedLevelsAreSubtotals = this.CollapsedLevelsAreSubtotals;
            pa.Axis          = this.Axis;
            pa.FieldPosition = this.FieldPosition;

            pa.PivotAreaReferences = new List <SLPivotAreaReference>();
            foreach (SLPivotAreaReference par in this.PivotAreaReferences)
            {
                pa.PivotAreaReferences.Add(par.Clone());
            }

            return(pa);
        }
        internal void FromConditionalFormat(ConditionalFormat cf)
        {
            this.SetAllNull();

            if (cf.Scope != null) this.Scope = cf.Scope.Value;
            if (cf.Type != null) this.Type = cf.Type.Value;
            if (cf.Priority != null) this.Priority = cf.Priority.Value;

            SLPivotArea pa;
            using (OpenXmlReader oxr = OpenXmlReader.Create(cf))
            {
                while (oxr.Read())
                {
                    if (oxr.ElementType == typeof(PivotArea))
                    {
                        pa = new SLPivotArea();
                        pa.FromPivotArea((PivotArea)oxr.LoadCurrentElement());
                        this.PivotAreas.Add(pa);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        internal SLPivotArea Clone()
        {
            SLPivotArea pa = new SLPivotArea();
            pa.Field = this.Field;
            pa.Type = this.Type;
            pa.DataOnly = this.DataOnly;
            pa.LabelOnly = this.LabelOnly;
            pa.GrandRow = this.GrandRow;
            pa.GrandColumn = this.GrandColumn;
            pa.CacheIndex = this.CacheIndex;
            pa.Outline = this.Outline;
            pa.Offset = this.Offset;
            pa.CollapsedLevelsAreSubtotals = this.CollapsedLevelsAreSubtotals;
            pa.Axis = this.Axis;
            pa.FieldPosition = this.FieldPosition;

            pa.PivotAreaReferences = new List<SLPivotAreaReference>();
            foreach (SLPivotAreaReference par in this.PivotAreaReferences)
            {
                pa.PivotAreaReferences.Add(par.Clone());
            }

            return pa;
        }
Ejemplo n.º 5
0
 private void SetAllNull()
 {
     this.PivotArea = new SLPivotArea();
     this.Action = FormatActionValues.Formatting;
     this.FormatId = null;
 }
Ejemplo n.º 6
0
 private void SetAllNull()
 {
     this.PivotArea = new SLPivotArea();
     this.Field = null;
     this.Formula = "";
 }
Ejemplo n.º 7
0
 private void SetAllNull()
 {
     this.PivotArea = new SLPivotArea();
 }