Esempio n. 1
0
  protected void processPageref(
      HWPFDocument hwpfDocument,
      Element currentBlock,
      Range textRange,
      int currentTableLevel,
      String pageref) {
    Element basicLink = htmlDocumentFacade.createHyperlink("#" + pageref);
    currentBlock.appendChild(basicLink);

    if (textRange != null) processCharacters(hwpfDocument, currentTableLevel, textRange, basicLink);
  }
Esempio n. 2
0
  @Override
  protected void processHyperlink(
      HWPFDocument wordDocument,
      Element currentBlock,
      Range textRange,
      int currentTableLevel,
      String hyperlink) {
    Element basicLink = htmlDocumentFacade.createHyperlink(hyperlink);
    currentBlock.appendChild(basicLink);

    if (textRange != null) processCharacters(wordDocument, currentTableLevel, textRange, basicLink);
  }
Esempio n. 3
0
  protected void processNoteAutonumbered(
      HWPFDocument doc, String type, int noteIndex, Element block, Range noteTextRange) {
    final String textIndex = String.valueOf(noteIndex + 1);
    final String textIndexClass =
        htmlDocumentFacade.getOrCreateCssClass("a", "vertical-align:super;font-size:smaller;");
    final String forwardNoteLink = type + "note_" + textIndex;
    final String backwardNoteLink = type + "note_back_" + textIndex;

    Element anchor = htmlDocumentFacade.createHyperlink("#" + forwardNoteLink);
    anchor.setAttribute("name", backwardNoteLink);
    anchor.setAttribute("class", textIndexClass + " " + type + "noteanchor");
    anchor.setTextContent(textIndex);
    block.appendChild(anchor);

    if (notes == null) {
      notes = htmlDocumentFacade.createBlock();
      notes.setAttribute("class", "notes");
    }

    Element note = htmlDocumentFacade.createBlock();
    note.setAttribute("class", type + "note");
    notes.appendChild(note);

    Element bookmark = htmlDocumentFacade.createBookmark(forwardNoteLink);
    bookmark.setAttribute("href", "#" + backwardNoteLink);
    bookmark.setTextContent(textIndex);
    bookmark.setAttribute("class", textIndexClass + " " + type + "noteindex");
    note.appendChild(bookmark);
    note.appendChild(htmlDocumentFacade.createText(" "));

    Element span = htmlDocumentFacade.getDocument().createElement("span");
    span.setAttribute("class", type + "notetext");
    note.appendChild(span);

    this.blocksProperies.add(new BlockProperies("", -1));
    try {
      processCharacters(doc, Integer.MIN_VALUE, noteTextRange, span);
    } finally {
      this.blocksProperies.pop();
    }
  }