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