internal SLRangeSet Clone() { SLRangeSet rs = new SLRangeSet(); rs.FieldItemIndexPage1 = this.FieldItemIndexPage1; rs.FieldItemIndexPage2 = this.FieldItemIndexPage2; rs.FieldItemIndexPage3 = this.FieldItemIndexPage3; rs.FieldItemIndexPage4 = this.FieldItemIndexPage4; rs.Reference = this.Reference; rs.Name = this.Name; rs.Sheet = this.Sheet; rs.Id = this.Id; return(rs); }
internal void FromConsolidation(Consolidation c) { this.SetAllNull(); if (c.AutoPage != null) { this.AutoPage = c.AutoPage.Value; } Page pg; PageItem pgi; List <string> listPage; SLRangeSet rs; using (OpenXmlReader oxr = OpenXmlReader.Create(c)) { while (oxr.Read()) { if (oxr.ElementType == typeof(Page)) { listPage = new List <string>(); pg = (Page)oxr.LoadCurrentElement(); using (OpenXmlReader oxrPage = OpenXmlReader.Create(pg)) { while (oxrPage.Read()) { if (oxrPage.ElementType == typeof(PageItem)) { pgi = (PageItem)oxrPage.LoadCurrentElement(); listPage.Add(pgi.Name.Value); } } } this.Pages.Add(listPage); } else if (oxr.ElementType == typeof(RangeSet)) { rs = new SLRangeSet(); rs.FromRangeSet((RangeSet)oxr.LoadCurrentElement()); this.RangeSets.Add(rs); } } } }