コード例 #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);
                    }
                }
            }
        }
コード例 #2
0
ファイル: SLPivotArea.cs プロジェクト: nunezger/berkeleyshoe
        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);
        }
コード例 #3
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);
                    }
                }
            }
        }
コード例 #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;
        }
コード例 #5
0
 private void SetAllNull()
 {
     this.PivotArea = new SLPivotArea();
     this.Action = FormatActionValues.Formatting;
     this.FormatId = null;
 }
コード例 #6
0
 private void SetAllNull()
 {
     this.PivotArea = new SLPivotArea();
     this.Field = null;
     this.Formula = "";
 }
コード例 #7
0
 private void SetAllNull()
 {
     this.PivotArea = new SLPivotArea();
 }