示例#1
0
        /// <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;
        }
示例#2
0
        /// <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);
        }
示例#3
0
        /// <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);
        }
示例#4
0
        /// <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;
        }