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); } } } }
private void SetAllNull() { this.PivotAreas = new List<SLPivotArea>(); this.Scope = ScopeValues.Selection; this.Type = RuleValues.None; this.Priority = 0; }