protected override void ProcessEndnoteAutonumbered(HWPFDocument wordDocument, int noteIndex, XmlElement block, Range endnoteTextRange) { String textIndex;// = (internalLinkCounter.incrementAndGet()).ToString(); lock (objLinkCounter) { internalLinkCounter++; textIndex = internalLinkCounter.ToString(); } String forwardLinkName = "endnote_" + textIndex; String backwardLinkName = "endnote_back_" + textIndex; XmlElement forwardLink = foDocumentFacade .CreateBasicLinkInternal(forwardLinkName); forwardLink.AppendChild(CreateNoteInline(textIndex)); SetId(forwardLink, backwardLinkName); block.AppendChild(forwardLink); XmlElement endnote = foDocumentFacade.CreateBlock(); XmlElement backwardLink = foDocumentFacade .CreateBasicLinkInternal(backwardLinkName); backwardLink.AppendChild(CreateNoteInline(textIndex + " ")); SetId(backwardLink, forwardLinkName); endnote.AppendChild(backwardLink); ProcessCharacters(wordDocument, int.MinValue, endnoteTextRange, endnote); WordToFoUtils.CompactInlines(endnote); this.endnotes.Add(endnote); }
protected override void ProcessParagraph(HWPFDocumentCore hwpfDocument, XmlElement parentFopElement, int currentTableLevel, Paragraph paragraph, String bulletText) { XmlElement block = foDocumentFacade.CreateBlock(); parentFopElement.AppendChild(block); WordToFoUtils.SetParagraphProperties(paragraph, block); int charRuns = paragraph.NumCharacterRuns; if (charRuns == 0) { return; } bool haveAnyText = false; if (!string.IsNullOrEmpty(bulletText)) { XmlElement inline = foDocumentFacade.CreateInline(); block.AppendChild(inline); XmlText textNode = foDocumentFacade.CreateText(bulletText); inline.AppendChild(textNode); haveAnyText |= bulletText.Trim().Length != 0; } haveAnyText = ProcessCharacters(hwpfDocument, currentTableLevel, paragraph, block); if (!haveAnyText) { XmlElement leader = foDocumentFacade.CreateLeader(); block.AppendChild(leader); } WordToFoUtils.CompactInlines(block); return; }