Paragraph.AppendHyperlink works fine. Paragraph.InsertHyperlink generates hyperlinks with empty ids. MS Word doesn't open files after Paragraph.InsertHyperlink.
Fixed issue with accessing "Pictures" property of "Paragraph" that has been removed from the document. Added method to replace an image inside a paragraph while keeping all image formatting.
* minimize closure allocations by replacing LINQ with foreach when needed
* use lookups when possible
* reuse filtered items, pre-compute when possible
* use lighter Monitor for isolated storage locking instead of Mutex
* fix DocX references to be real project references instead of DLL references
On my search to solve the inserting problem of tables and paragraphs I change this code.
If the document.paragraphLookup is always correct or filled no problem.
But why depend on document.paragraphLookup if it can be done direct?
So this is not a bug.
For me it is not clear why we have the dictionary paragraphLookup.
Is there a real need for the dictionary paragraphLookup, or is it just a result of historical starting ideas and should it be cleaned?
The paragraph startindex and endindex are corrupted in Document.paragraphs[].
The result was a wrong insertion of paragraphs and tables. (at wrong locations)
The function GetParagraphs had the bug. the variable index in that function should be updated after creation of the paragraph not before
The function public virtual List<int> FindAll(string str, RegexOptions options) was only resulting one item in the list. instead of a list of find idexes
If there was only find one no big problem but if it finds more the return index was wrong also .
I think it is a typo error, instead of indexes[0] it should be indexes[i].