public abstract class AbstractTextContentInserterFilter extends java.lang.Object implements Filter
Constructor and Description |
---|
AbstractTextContentInserterFilter(java.awt.Dimension size,
int horizontalPosition,
int verticalPosition)
Creates a new filter that will insert a text content (shape) of the specified size at the
specified location while converting a document.
|
AbstractTextContentInserterFilter(java.awt.Dimension size,
java.util.Map<java.lang.String,java.lang.Object> shapeProperties)
Creates a new filter that will insert a text content (shape) of the specified size using the
specified shape properties while converting a document.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyAnchorPageNoFix(com.sun.star.text.XTextDocument docText,
com.sun.star.text.XTextCursor textCursor)
Jumps to the page specified by the "AnchorPageNo" if present in the shape properties if this
filter.
|
static java.util.Map<java.lang.String,java.lang.Object> |
createDefaultShapeProperties(int horizontalPosition,
int verticalPosition)
Creates the default shape properties that would insert text content at the specified position
on the first page of a document.
|
java.awt.Dimension |
getRectSize()
Gets the rectangle's size of the shape that will be inserted.
|
java.util.Map<java.lang.String,java.lang.Object> |
getShapeProperties()
Gets the shape's properties to apply when inserting the shape to the document.
|
static com.sun.star.awt.Size |
toOfficeSize(java.awt.Dimension size)
Converts the specified size where units are millimeters to an office size where unit are 1/100
millimeters.
|
public AbstractTextContentInserterFilter(java.awt.Dimension size, int horizontalPosition, int verticalPosition)
size
- The dimension of the shape that will be inserted (millimeters).horizontalPosition
- The horizontal position where to insert the text content on the
document (millimeters).verticalPosition
- The vertical position where to insert the text content on the document
(millimeters).public AbstractTextContentInserterFilter(java.awt.Dimension size, java.util.Map<java.lang.String,java.lang.Object> shapeProperties)
size
- The dimension of the shape that will be inserted (millimeters).shapeProperties
- The properties to apply to the created shape.public static java.util.Map<java.lang.String,java.lang.Object> createDefaultShapeProperties(int horizontalPosition, int verticalPosition)
horizontalPosition
- The horizontal position where to insert the text content on the
document (millimeters).verticalPosition
- The vertical position where to insert the text content on the document
(millimeters).public static com.sun.star.awt.Size toOfficeSize(java.awt.Dimension size)
size
- The size to convert, in millimeters.protected void applyAnchorPageNoFix(com.sun.star.text.XTextDocument docText, com.sun.star.text.XTextCursor textCursor)
docText
- The text interface for the document.textCursor
- The text cursor of the document.public java.awt.Dimension getRectSize()
public java.util.Map<java.lang.String,java.lang.Object> getShapeProperties()