Class TagSingleBox

java.lang.Object
org.docx4j.convert.out.html.SdtTagHandler
org.docx4j.convert.out.html.TagSingleBox

public class TagSingleBox
extends SdtTagHandler
In Word, adjacent paragraphs with the same borders are enclosed in a single border (unless bullets/numbering apply). Similarly with shading. (If the 2 paragraphs are shaded different colors, then the color of the first extends to the start of the second, so there is no white strip between them). To do the same in HTML, Containerization puts matching paragraphs into a content control. It is the job of this class to make a div out of that content control, and set the border/shading on that as a style, copying the style value from the first paragraph enclosed. TODO: Note that there will typically be 2 content controls and therefore divs, one for borders and one for shading. But the style will be the same on each, so one is redundant.
Author:
jason
  • Constructor Summary

    Constructors 
    Constructor Description
    TagSingleBox()  
  • Method Summary

    Modifier and Type Method Description
    org.w3c.dom.Node toNode​(WordprocessingMLPackage wmlPackage, SdtPr sdtPr, java.util.HashMap<java.lang.String,​java.lang.String> tagMap, org.w3c.dom.Node resultSoFar)  
    org.w3c.dom.Node toNode​(WordprocessingMLPackage wmlPackage, SdtPr sdtPr, java.util.HashMap<java.lang.String,​java.lang.String> tagMap, org.w3c.dom.traversal.NodeIterator childResults)  

    Methods inherited from class org.docx4j.convert.out.html.SdtTagHandler

    attachContents, attachContents, getAlias

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • toNode

      public org.w3c.dom.Node toNode​(WordprocessingMLPackage wmlPackage, SdtPr sdtPr, java.util.HashMap<java.lang.String,​java.lang.String> tagMap, org.w3c.dom.traversal.NodeIterator childResults) throws javax.xml.transform.TransformerException
      Specified by:
      toNode in class SdtTagHandler
      Throws:
      javax.xml.transform.TransformerException
    • toNode

      public org.w3c.dom.Node toNode​(WordprocessingMLPackage wmlPackage, SdtPr sdtPr, java.util.HashMap<java.lang.String,​java.lang.String> tagMap, org.w3c.dom.Node resultSoFar) throws javax.xml.transform.TransformerException
      Specified by:
      toNode in class SdtTagHandler
      Throws:
      javax.xml.transform.TransformerException