/// <summary> /// Clone a new instance of SLRun. /// </summary> /// <returns>An SLRun object.</returns> public SLRun Clone() { SLRun r = new SLRun(); r.Font = this.Font.Clone(); r.Text = this.Text; return(r); }
/// <summary> /// Get a list of rich text runs. /// </summary> /// <returns>A list of rich text runs.</returns> public List <SLRun> GetRuns() { List <SLRun> result = new List <SLRun>(); SLRun r; using (OpenXmlReader oxr = OpenXmlReader.Create(this.istrReal)) { while (oxr.Read()) { if (oxr.ElementType == typeof(Run)) { r = new SLRun(); r.FromRun((Run)oxr.LoadCurrentElement()); result.Add(r.Clone()); } } } return(result); }