Ejemplo n.º 1
0
        /// <summary>
        /// Gets a subset of the paragraphs elements.
        /// </summary>
        /// <param name="startIdx">Start index of the required subset.</param>
        /// <param name="endIdx">End index of the required subset.</param>
        /// <returns>A ParagraphElements object with cloned elements.</returns>
        private ParagraphElements SubsetElements(int startIdx, int endIdx)
        {
            ParagraphElements paragraphElements = new ParagraphElements();

            for (int idx = startIdx; idx <= endIdx; ++idx)
            {
                paragraphElements.Add((DocumentObject)this.elements[idx].Clone());
            }
            return(paragraphElements);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a paragraph iterator given the root node, its position in the object tree and the current object
 /// </summary>
 /// <param name="rootNode">The node the position indices relate to.</param>
 /// <param name="current">The element the iterator shall point to.</param>
 /// <param name="indices">The position of the paragraph iterator in terms of element indices.</param>
 private ParagraphIterator(ParagraphElements rootNode, DocumentObject current, ArrayList indices)
 {
     this.rootNode = rootNode;
       this.positionIndices = indices;
       this.current = current;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a paragraph iterator pointing on the given paragraph elements object.
 /// Paragraph iterators received from this paragraph iterator relate to this root node.
 /// </summary>
 /// <param name="rootNode">The root node for the paragraph iterator.</param>
 internal ParagraphIterator(ParagraphElements rootNode)
 {
     this.rootNode = rootNode;
       this.current = rootNode;
       this.positionIndices = new ArrayList();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Gets a subset of the paragraphs elements.
 /// </summary>
 /// <param name="startIdx">Start index of the required subset.</param>
 /// <param name="endIdx">End index of the required subset.</param>
 /// <returns>A ParagraphElements object with cloned elements.</returns>
 private ParagraphElements SubsetElements(int startIdx, int endIdx)
 {
   ParagraphElements paragraphElements = new ParagraphElements();
   for (int idx = startIdx; idx <= endIdx; ++idx)
   {
     paragraphElements.Add((DocumentObject)this.elements[idx].Clone());
   }
   return paragraphElements;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a paragraph iterator given the root node, its position in the object tree and the current object
 /// </summary>
 /// <param name="rootNode">The node the position indices relate to.</param>
 /// <param name="current">The element the iterator shall point to.</param>
 /// <param name="indices">The position of the paragraph iterator in terms of element indices.</param>
 private ParagraphIterator(ParagraphElements rootNode, DocumentObject current, List<int> indices)
 {
     _rootNode = rootNode;
     _positionIndices = indices;
     _current = current;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a paragraph iterator pointing on the given paragraph elements object.
 /// Paragraph iterators received from this paragraph iterator relate to this root node.
 /// </summary>
 /// <param name="rootNode">The root node for the paragraph iterator.</param>
 internal ParagraphIterator(ParagraphElements rootNode)
 {
     _rootNode = rootNode;
     _current = rootNode;
     _positionIndices = new List<int>();
 }