public class GraphicInserterFilter extends AbstractTextContentInserterFilter
| Constructor and Description |
|---|
GraphicInserterFilter(String imagePath,
int horizontalPosition,
int verticalPosition)
创建一个新过滤器,在转换文档时将在指定位置插入指定的图像.
|
GraphicInserterFilter(String imagePath,
int width,
int height,
int horizontalPosition,
int verticalPosition)
创建一个新过滤器,在转换文档时将在指定位置插入指定的图像.
|
GraphicInserterFilter(String imagePath,
int width,
int height,
Map<String,Object> shapeProperties)
创建一个新的过滤器,它将在转换文档时使用指定的属性插入指定的图像.
|
GraphicInserterFilter(String imagePath,
Map<String,Object> shapeProperties)
创建一个新的过滤器,它将在转换文档时使用指定的属性插入指定的图像.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doFilter(Context context,
com.sun.star.lang.XComponent document,
FilterChain chain)
由于转换请求,每次通过链传递文档时,都会调用过滤器的doFilter方法。
传入此方法的筛选器链允许筛选器将文档传递给链中的下一个实体.
|
applyAnchorPageNoFix, createDefaultShapeProperties, getRectSize, getShapeProperties, toOfficeSizepublic GraphicInserterFilter(String imagePath, int horizontalPosition, int verticalPosition) throws InstrumentException
imagePath - 到磁盘上的映像(文件)的路径.horizontalPosition - 在文档上插入图像的水平位置(毫米).verticalPosition - 在文档上插入图像的垂直位置(毫米).InstrumentException - 如果无法检测到图像的大小.public GraphicInserterFilter(String imagePath, int width, int height, int horizontalPosition, int verticalPosition)
imagePath - 到磁盘上的映像(文件)的路径.width - 要插入的图像的宽度。原始图像将根据需要调整大小(毫米).height - 要插入的图像的高度。原始图像将根据需要调整大小(毫米).horizontalPosition - 在文档上插入图像的水平位置(毫米).verticalPosition - 在文档上插入图像的垂直位置(毫米).public GraphicInserterFilter(String imagePath, int width, int height, Map<String,Object> shapeProperties)
imagePath - 到磁盘上的映像(文件)的路径.width - 要插入的图像的宽度。原始图像将根据需要调整大小(毫米).height - 要插入的图像的高度。原始图像将根据需要调整大小(毫米).shapeProperties - 要应用于创建的图形形状的属性.public GraphicInserterFilter(String imagePath, Map<String,Object> shapeProperties) throws InstrumentException
imagePath - 到磁盘上的映像(文件)的路径.shapeProperties - 要应用于创建的图形形状的属性InstrumentException - 如果无法检测到图像的大小.public void doFilter(Context context, com.sun.star.lang.XComponent document, FilterChain chain) throws Exception
Filtercontext - 用于沿链传递的Office Context.document - 被转换为沿链传递的XComponent.chain - 链Exception - 如果处理过滤器时发生错误.Copyright © 2019. All rights reserved.