예제 #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;
        }