Class FOPictWriterAbstract

All Implemented Interfaces:
Writer
Direct Known Subclasses:
FOPictWriterNoWrapImpl

public abstract class FOPictWriterAbstract
extends AbstractPictWriter
Note that despite its name, this currently only handles v:textbox. Images (ie ./v:shape/v:imagedata) are handled differently, by legacy code. Microsoft Word supports 5 "wrapping styles" for text box. 1. "in line with text": (this is a TODO here) 2,3. square, tight: (these we handle with fo:float) 4,5. behind, in front: (these we handle with position=absolute|fixed and z-index (There are some additional wrapping styles for images, eg top and bottom, which is straightforward, and through, as to which see https://wordribbon.tips.net/T009382_Understanding_Through_Text_Wrapping.html
Author:
jharrop
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.docx4j.convert.out.common.Writer

    Writer.TransformState
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected static org.slf4j.Logger log  
    protected static java.lang.String XSL_FO  

    Fields inherited from class org.docx4j.convert.out.common.writer.AbstractPictWriter

    WRITER_ID

    Fields inherited from class org.docx4j.convert.out.common.writer.AbstractSimpleWriter

    writerId
  • Constructor Summary

    Constructors 
    Constructor Description
    FOPictWriterAbstract()  
  • Method Summary

    Modifier and Type Method Description
    abstract org.w3c.dom.Node handleVTextBoxNoWrap​(AbstractWmlConversionContext context, org.w3c.dom.Node modelContent, org.w3c.dom.Document doc, org.docx4j.vml.VmlShapeElements shape, java.util.Map<java.lang.String,​java.lang.String> props)  
    abstract org.w3c.dom.Node handleVTextBoxWrapped​(AbstractWmlConversionContext context, org.w3c.dom.Node modelContent, org.w3c.dom.Document doc, org.docx4j.vml.VmlShapeElements shape, java.util.Map<java.lang.String,​java.lang.String> props)  
    protected float parsePtsVal​(java.lang.String pts)  
    protected void setBorders​(org.w3c.dom.Element ret)  
    org.w3c.dom.Node toNode​(AbstractWmlConversionContext context, java.lang.Object unmarshalledNode, org.w3c.dom.Node modelContent, Writer.TransformState state, org.w3c.dom.Document doc)  

    Methods inherited from class org.docx4j.convert.out.common.writer.AbstractSimpleWriter

    createTransformState, getID

    Methods inherited from class java.lang.Object

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

    • log

      protected static org.slf4j.Logger log
    • XSL_FO

      protected static java.lang.String XSL_FO
  • Constructor Details

  • Method Details

    • toNode

      public org.w3c.dom.Node toNode​(AbstractWmlConversionContext context, java.lang.Object unmarshalledNode, org.w3c.dom.Node modelContent, Writer.TransformState state, org.w3c.dom.Document doc) throws javax.xml.transform.TransformerException
      Throws:
      javax.xml.transform.TransformerException
    • handleVTextBoxNoWrap

      public abstract org.w3c.dom.Node handleVTextBoxNoWrap​(AbstractWmlConversionContext context, org.w3c.dom.Node modelContent, org.w3c.dom.Document doc, org.docx4j.vml.VmlShapeElements shape, java.util.Map<java.lang.String,​java.lang.String> props)
    • handleVTextBoxWrapped

      public abstract org.w3c.dom.Node handleVTextBoxWrapped​(AbstractWmlConversionContext context, org.w3c.dom.Node modelContent, org.w3c.dom.Document doc, org.docx4j.vml.VmlShapeElements shape, java.util.Map<java.lang.String,​java.lang.String> props)
    • setBorders

      protected void setBorders​(org.w3c.dom.Element ret)
    • parsePtsVal

      protected float parsePtsVal​(java.lang.String pts)