コード例 #1
0
ファイル: TextSequence.cs プロジェクト: zhaoyin/officeOBA
        /// <summary>
        /// Create a deep clone of this FormatedText object.
        /// </summary>
        /// <remarks>A possible Attached Style wouldn't be cloned!</remarks>
        /// <returns>
        /// A clone of this object.
        /// </returns>
        public object Clone()
        {
            FormatedText formatedTextClone = null;

            if (Document != null && Node != null)
            {
                TextContentProcessor tcp = new TextContentProcessor();
                formatedTextClone = tcp.CreateFormatedText(
                    Document, new XElement(Node));
            }

            return(formatedTextClone);
        }
コード例 #2
0
        /// <summary>
        /// Create a deep clone of this FormatedText object.
        /// </summary>
        /// <remarks>A possible Attached Style wouldn't be cloned!</remarks>
        /// <returns>
        /// A clone of this object.
        /// </returns>
        public object Clone()
        {
            FormatedText formatedTextClone = null;

            if (this.Document != null && this.Node != null)
            {
                TextContentProcessor tcp = new TextContentProcessor();
                formatedTextClone = tcp.CreateFormatedText(
                    this.Document, this.Node.CloneNode(true));
            }

            return(formatedTextClone);
        }