|
|
|
|
|
|
|
|
List<Paragraph> paragraphs = new List<Paragraph>();
|
|
|
List<Paragraph> paragraphs = new List<Paragraph>();
|
|
|
foreach (XElement e in Xml.Descendants(XName.Get("p", DocX.w.NamespaceName)))
|
|
|
foreach (XElement e in Xml.Descendants(XName.Get("p", DocX.w.NamespaceName)))
|
|
|
{
|
|
|
{
|
|
|
index += HelperFunctions.GetText(e).Length;
|
|
|
|
|
|
Paragraph paragraph = new Paragraph(Document, e, index);
|
|
|
Paragraph paragraph = new Paragraph(Document, e, index);
|
|
|
paragraphs.Add(paragraph);
|
|
|
paragraphs.Add(paragraph);
|
|
|
|
|
|
index += HelperFunctions.GetText(e).Length;
|
|
|
}
|
|
|
}
|
|
|
// GetParagraphsRecursive(Xml, ref index, ref paragraphs, deepSearch);
|
|
|
// GetParagraphsRecursive(Xml, ref index, ref paragraphs, deepSearch);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<int> indexes = p.FindAll(str, options);
|
|
|
List<int> indexes = p.FindAll(str, options);
|
|
|
|
|
|
|
|
|
for (int i = 0; i < indexes.Count(); i++)
|
|
|
for (int i = 0; i < indexes.Count(); i++)
|
|
|
indexes[0] += p.startIndex;
|
|
|
|
|
|
|
|
|
indexes[i] += p.startIndex;
|
|
|
|
|
|
|
|
|
list.AddRange(indexes);
|
|
|
list.AddRange(indexes);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
return list;
|
|
|
return list;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
} |
|
|
|
|
|
|
|
|
}
|