Example #1
0
        internal void FromConditionalFormat(ConditionalFormat cf)
        {
            SetAllNull();

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

            SLPivotArea pa;

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

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

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

            return(pa);
        }
 private void SetAllNull()
 {
     PivotArea = new SLPivotArea();
     Chart     = 0;
     Format    = 0;
     Series    = false;
 }
 private void SetAllNull()
 {
     PivotArea = new SLPivotArea();
     Field     = null;
     Formula   = "";
 }
 private void SetAllNull()
 {
     PivotArea = new SLPivotArea();
     Action    = FormatActionValues.Formatting;
     FormatId  = null;
 }
 private void SetAllNull()
 {
     PivotArea = new SLPivotArea();
 }