Example #1
0
        internal CompiledParagraphInfo CreateChildParagraph(HtmlElement.HtmlElementType elementType)
        {
            CompiledParagraphInfo compiledParagraphInfo = new CompiledParagraphInfo();

            compiledParagraphInfo.ElementType       = elementType;
            compiledParagraphInfo.m_parentParagraph = this;
            compiledParagraphInfo.m_flatStore       = m_flatStore;
            m_childParagraph = compiledParagraphInfo;
            return(compiledParagraphInfo);
        }
Example #2
0
        internal CompiledParagraphInfo RemoveAll()
        {
            CompiledParagraphInfo compiledParagraphInfo = this;

            while (compiledParagraphInfo.m_parentParagraph != null)
            {
                compiledParagraphInfo = compiledParagraphInfo.RemoveParagraph(compiledParagraphInfo.ElementType);
            }
            ApplyPendingMargins();
            compiledParagraphInfo.ResetParagraph();
            return(compiledParagraphInfo);
        }
Example #3
0
 public CompiledParagraphInfo RemoveParagraph(HtmlElement.HtmlElementType elementType)
 {
     if (this.m_elementType == elementType)
     {
         this.ApplySpaceAfter();
         if (this.m_parentParagraph != null)
         {
             this.m_parentParagraph.m_childParagraph = null;
             return(this.m_parentParagraph);
         }
         this.ResetParagraph();
     }
     else if (this.m_parentParagraph != null)
     {
         this.m_parentParagraph.InternalRemoveParagraph(elementType);
     }
     return(this);
 }
Example #4
0
 public void InternalRemoveParagraph(HtmlElement.HtmlElementType elementType)
 {
     if (this.m_elementType == elementType)
     {
         this.ApplySpaceAfter();
         if (this.m_parentParagraph != null)
         {
             this.m_parentParagraph.m_childParagraph = this.m_childParagraph;
             this.m_childParagraph.m_parentParagraph = this.m_parentParagraph;
         }
         else if (this.m_parentParagraph == null)
         {
             this.m_childParagraph.m_parentParagraph = null;
         }
     }
     else if (this.m_parentParagraph != null)
     {
         this.m_parentParagraph.InternalRemoveParagraph(elementType);
     }
 }