Example #1
0
 public void AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
 {
   visitor.VisitHyperlink(this);
   if (visitChildren && this.elements != null)
   {
     ((IVisitable)this.elements).AcceptVisitor(visitor, visitChildren);
   }
 }
    /// <summary>
    /// Allows the visitor object to visit the document object and it's child objects.
    /// </summary>
    void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
    {
      visitor.VisitDocumentObjectCollection(this);

      foreach (DocumentObject docobj in this)
      {
        IVisitable visitable = docobj as IVisitable;
        if (visitable != null)
          visitable.AcceptVisitor(visitor, visitChildren);
      }
    }
Example #3
0
 void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
 {
   visitor.VisitLegend(this);
 }
Example #4
0
    /// <summary>
    /// Allows the visitor object to visit the document object and it's child objects.
    /// </summary>
    void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
    {
      visitor.VisitRows(this);

      foreach (Row row in this)
        ((IVisitable)row).AcceptVisitor(visitor, visitChildren);
    }
Example #5
0
        /// <summary>
        /// Allows the visitor object to visit the document object and its child objects.
        /// </summary>
        void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
        {
            visitor.VisitHeadersFooters(this);

            if (visitChildren)
            {
                if (HasHeaderFooter(HeaderFooterIndex.Primary))
                    ((IVisitable)_primary).AcceptVisitor(visitor, true);
                if (HasHeaderFooter(HeaderFooterIndex.EvenPage))
                    ((IVisitable)_evenPage).AcceptVisitor(visitor, true);
                if (HasHeaderFooter(HeaderFooterIndex.FirstPage))
                    ((IVisitable)_firstPage).AcceptVisitor(visitor, true);
            }
        }
Example #6
0
    /// <summary>
    /// Allows the visitor object to visit the document object and it's child objects.
    /// </summary>
    void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
    {
      visitor.VisitRow(this);

      foreach (Cell cell in this.cells)
        ((IVisitable)cell).AcceptVisitor(visitor, visitChildren);
    }
Example #7
0
        /// <summary>
        /// Allows the visitor object to visit the document object and it's child objects.
        /// </summary>
        void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
        {
            visitor.VisitChart(this);
              if (visitChildren)
              {
            if (this.bottomArea != null)
              ((IVisitable)this.bottomArea).AcceptVisitor(visitor, visitChildren);

            if (this.footerArea != null)
              ((IVisitable)this.footerArea).AcceptVisitor(visitor, visitChildren);

            if (this.headerArea != null)
              ((IVisitable)this.headerArea).AcceptVisitor(visitor, visitChildren);

            if (this.leftArea != null)
              ((IVisitable)this.leftArea).AcceptVisitor(visitor, visitChildren);

            if (this.rightArea != null)
              ((IVisitable)this.rightArea).AcceptVisitor(visitor, visitChildren);

            if (this.topArea != null)
              ((IVisitable)this.topArea).AcceptVisitor(visitor, visitChildren);
              }
        }
Example #8
0
        /// <summary>
        /// Allows the visitor object to visit the document object and its child objects.
        /// </summary>
        void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
        {
            visitor.VisitStyles(this);

            Dictionary<Style, object> visitedStyles = new Dictionary<Style, object>();
            foreach (Style style in this)
                VisitStyle(visitedStyles, style, visitor, visitChildren);
        }
Example #9
0
 /// <summary>
 /// Ensures that base styles are visited first.
 /// </summary>
 void VisitStyle(Dictionary<Style, object> visitedStyles, Style style, DocumentObjectVisitor visitor, bool visitChildren)
 {
     if (!visitedStyles.ContainsKey(style))
     {
         Style baseStyle = style.GetBaseStyle();
         if (baseStyle != null && !visitedStyles.ContainsKey(baseStyle)) //baseStyle != ""
             VisitStyle(visitedStyles, baseStyle, visitor, visitChildren);
         ((IVisitable)style).AcceptVisitor(visitor, visitChildren);
         visitedStyles.Add(style, null);
     }
 }
Example #10
0
        /// <summary>
        /// Allows the visitor object to visit the document object and it's child objects.
        /// </summary>
        void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
        {
            visitor.VisitStyles(this);

              Hashtable visitedStyles = new Hashtable();
              foreach (Style style in this)
            VisitStyle(visitedStyles, style, visitor, visitChildren);
        }
Example #11
0
        /// <summary>
        /// Allows the visitor object to visit the document object and its child objects.
        /// </summary>
        void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
        {
            visitor.VisitTable(this);

            ((IVisitable)_columns).AcceptVisitor(visitor, visitChildren);
            ((IVisitable)_rows).AcceptVisitor(visitor, visitChildren);
        }
Example #12
0
        /// <summary>
        /// Allows the visitor object to visit the document object and its child objects.
        /// </summary>
        void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
        {
            visitor.VisitFootnote(this);

            if (visitChildren && _elements != null)
                ((IVisitable)_elements).AcceptVisitor(visitor, true);
        }
Example #13
0
 void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
 {
   visitor.VisitTextArea(this);
   if (this.elements != null && visitChildren)
     ((IVisitable)this.elements).AcceptVisitor(visitor, visitChildren);
 }
Example #14
0
    /// <summary>
    /// Allows the visitor object to visit the document object and it's child objects.
    /// </summary>
    void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
    {
      visitor.VisitDocumentElements(this);

      foreach (DocumentObject docObject in this)
      {
        if (docObject is IVisitable)
          ((IVisitable)docObject).AcceptVisitor(visitor, visitChildren);
      }
    }
Example #15
0
        /// <summary>
        /// Allows the visitor object to visit the document object and its child objects.
        /// </summary>
        void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
        {
            visitor.VisitChart(this);
            if (visitChildren)
            {
                if (_bottomArea != null)
                    ((IVisitable)_bottomArea).AcceptVisitor(visitor, true);

                if (_footerArea != null)
                    ((IVisitable)_footerArea).AcceptVisitor(visitor, true);

                if (_headerArea != null)
                    ((IVisitable)_headerArea).AcceptVisitor(visitor, true);

                if (_leftArea != null)
                    ((IVisitable)_leftArea).AcceptVisitor(visitor, true);

                if (_rightArea != null)
                    ((IVisitable)_rightArea).AcceptVisitor(visitor, true);

                if (_topArea != null)
                    ((IVisitable)_topArea).AcceptVisitor(visitor, true);
            }
        }
Example #16
0
 /// <summary>
 /// Allows the visitor object to visit the document object and it's child objects.
 /// </summary>
 void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
 {
   visitor.VisitSections(this);
   foreach (Section section in this)
     ((IVisitable)section).AcceptVisitor(visitor, visitChildren);
 }
Example #17
0
    /// <summary>
    /// Allows the visitor object to visit the document object and it's child objects.
    /// </summary>
    void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
    {
      visitor.VisitCell(this);

      if (visitChildren && this.elements != null)
        ((IVisitable)this.elements).AcceptVisitor(visitor, visitChildren);
    }
Example #18
0
    /// <summary>
    /// Allows the visitor object to visit the document object and it's child objects.
    /// </summary>
    void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
    {
      visitor.VisitSection(this);

      if (visitChildren && this.headers != null)
        ((IVisitable)this.headers).AcceptVisitor(visitor, visitChildren);
      if (visitChildren && this.footers != null)
        ((IVisitable)this.footers).AcceptVisitor(visitor, visitChildren);

      if (visitChildren && this.elements != null)
        ((IVisitable)this.elements).AcceptVisitor(visitor, visitChildren);
    }
Example #19
0
 /// <summary>
 /// Allows the visitor object to visit the document object and all it's child objects.
 /// </summary>
 void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
 {
   visitor.VisitDocument(this);
   if (visitChildren)
   {
     ((IVisitable)Styles).AcceptVisitor(visitor, visitChildren);
     ((IVisitable)Sections).AcceptVisitor(visitor, visitChildren);
   }
 }
Example #20
0
        /// <summary>
        /// Allows the visitor object to visit the document object and its child objects.
        /// </summary>
        void IVisitable.AcceptVisitor(DocumentObjectVisitor visitor, bool visitChildren)
        {
            visitor.VisitSection(this);

            if (visitChildren && _headers != null)
                ((IVisitable)_headers).AcceptVisitor(visitor, true);
            if (visitChildren && _footers != null)
                ((IVisitable)_footers).AcceptVisitor(visitor, true);
            if (visitChildren && _elements != null)
                ((IVisitable)_elements).AcceptVisitor(visitor, true);
        }