예제 #1
0
 /// <summary>
 /// 文档加载后的处理
 /// </summary>
 /// <param name="format">文档存储格式</param>
 public override void AfterLoad(FileFormat format)
 {
     if (FixElementsForSerialize(false))
     {
         //WriterUtils.SplitElements(this.Elements);
     }
     WriterUtils.SplitElements(this.Elements, false);
     //if (_ElementsForSerialize != null && _ElementsForSerialize.Count > 0)
     //{
     //    this.Elements.Clear();
     //    foreach (XTextElement element in _ElementsForSerialize)
     //    {
     //        if (element is XTextParagraphElement)
     //        {
     //            this.Elements.AddRange(element.Elements);
     //        }
     //        else
     //        {
     //            this.Elements.Add(element);
     //        }
     //    }//foreach
     //    foreach (XTextElement element in this.Elements)
     //    {
     //        element.OwnerDocument = this.OwnerDocument ;
     //        element.Parent = this;
     //    }
     //    WriterUtils.SplitElements(this.Elements);
     //}
     foreach (DomElement element in this.Elements)
     {
         element.Parent = this;
         element.AfterLoad(format);
     }
     base.AfterLoad(format);
 }