- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFShape.getXmlObject()
方法的一些代码示例,展示了XSLFShape.getXmlObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLFShape.getXmlObject()
方法的具体详情如下:
包路径:org.apache.poi.xslf.usermodel.XSLFShape
类名称:XSLFShape
方法名:getXmlObject
暂无
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* As there's no xmlbeans hierarchy, but XSLF works with subclassing, not all
* child classes work with a {@link CTShape} object, but often contain the same
* properties. This method is the generalized form of selecting and casting those
* properties.
*
* @param resultClass the requested result class
* @param xquery the simple (xmlbean) xpath expression to the property
* @return the xml object at the xpath location, or null if not found
*/
@SuppressWarnings({"unchecked", "WeakerAccess"})
protected <T extends XmlObject> T selectProperty(Class<T> resultClass, String xquery) {
XmlObject[] rs = getXmlObject().selectPath(xquery);
if (rs.length == 0) {
return null;
}
return (resultClass.isInstance(rs[0])) ? (T)rs[0] : null;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
public boolean fetch(XSLFShape shape) {
XmlObject[] o = shape.getXmlObject().selectPath(
"declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' " +
"declare namespace a='http://schemas.openxmlformats.org/drawingml/2006/main' " +
".//p:txBody/a:lstStyle/a:lvl" + (_level + 1) + "pPr"
);
if (o.length == 1) {
CTTextParagraphProperties props = (CTTextParagraphProperties) o[0];
return fetch(props);
}
return false;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
public boolean fetch(XSLFShape shape) {
XmlObject[] o = shape.getXmlObject().selectPath(
"declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' " +
"declare namespace a='http://schemas.openxmlformats.org/drawingml/2006/main' " +
".//p:txBody/a:bodyPr"
);
if (o.length == 1) {
CTTextBodyProperties props = (CTTextBodyProperties) o[0];
return fetch(props);
}
return false;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
XmlObject obj = xShape.getXmlObject();
CTGroupShape spTree = getSpTree();
deregisterShapeId(xShape.getShapeId());
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Remove the specified shape from this group
*/
@Override
public boolean removeShape(XSLFShape xShape) {
XmlObject obj = xShape.getXmlObject();
CTGroupShape grpSp = (CTGroupShape)getXmlObject();
getSheet().deregisterShapeId(xShape.getShapeId());
if(obj instanceof CTShape){
grpSp.getSpList().remove(obj);
} else if (obj instanceof CTGroupShape){
XSLFGroupShape gs = (XSLFGroupShape)xShape;
new ArrayList<>(gs.getShapes()).forEach(gs::removeShape);
grpSp.getGrpSpList().remove(obj);
} else if (obj instanceof CTConnector){
grpSp.getCxnSpList().remove(obj);
} else if (obj instanceof CTGraphicalObjectFrame) {
grpSp.getGraphicFrameList().remove(obj);
} else if (obj instanceof CTPicture) {
XSLFPictureShape ps = (XSLFPictureShape)xShape;
XSLFSheet sh = getSheet();
if (sh != null) {
sh.removePictureRelation(ps);
}
grpSp.getPicList().remove(obj);
} else {
throw new IllegalArgumentException("Unsupported shape: " + xShape);
}
return _shapes.remove(xShape);
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Return direct child objects of this shape
*
* @param childClass the class to cast the properties to
* @param namespace the namespace - usually it is {@code "http://schemas.openxmlformats.org/presentationml/2006/main"}
* @param nodename the node name, without prefix
* @return the properties object or null if it can't be found
*/
@SuppressWarnings({"unchecked", "WeakerAccess", "unused", "SameParameterValue"})
protected <T extends XmlObject> T getChild(Class<T> childClass, String namespace, String nodename) {
XmlCursor cur = getXmlObject().newCursor();
T child = null;
if (cur.toChild(namespace, nodename)) {
child = (T)cur.getObject();
}
if (cur.toChild(XSLFRelation.NS_DRAWINGML, nodename)) {
child = (T)cur.getObject();
}
cur.dispose();
return child;
}
代码示例来源:origin: apache/tika
if (!skipPlaceholders && (sh.getXmlObject() instanceof CTPicture)) {
CTPicture ctPic = ((CTPicture) sh.getXmlObject());
if (ctPic.getBlipFill() != null && ctPic.getBlipFill().getBlip() != null) {
String relID = ctPic.getBlipFill().getBlip().getEmbed();
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* As there's no xmlbeans hierarchy, but XSLF works with subclassing, not all
* child classes work with a {@link CTShape} object, but often contain the same
* properties. This method is the generalized form of selecting and casting those
* properties.
*
* @param resultClass the requested result class
* @param xquery the simple (xmlbean) xpath expression to the property
* @return the xml object at the xpath location, or null if not found
*/
@SuppressWarnings({"unchecked", "WeakerAccess"})
protected <T extends XmlObject> T selectProperty(Class<T> resultClass, String xquery) {
XmlObject[] rs = getXmlObject().selectPath(xquery);
if (rs.length == 0) {
return null;
}
return (resultClass.isInstance(rs[0])) ? (T)rs[0] : null;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
public boolean fetch(XSLFShape shape) {
XmlObject[] o = shape.getXmlObject().selectPath(
"declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' " +
"declare namespace a='http://schemas.openxmlformats.org/drawingml/2006/main' " +
".//p:txBody/a:bodyPr"
);
if (o.length == 1) {
CTTextBodyProperties props = (CTTextBodyProperties) o[0];
return fetch(props);
}
return false;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
public boolean fetch(XSLFShape shape) {
XmlObject[] o = shape.getXmlObject().selectPath(
"declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' " +
"declare namespace a='http://schemas.openxmlformats.org/drawingml/2006/main' " +
".//p:txBody/a:lstStyle/a:lvl" + (_level + 1) + "pPr"
);
if (o.length == 1) {
CTTextParagraphProperties props = (CTTextParagraphProperties) o[0];
return fetch(props);
}
return false;
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Remove the specified shape from this group
*/
public boolean removeShape(XSLFShape xShape) {
XmlObject obj = xShape.getXmlObject();
if(obj instanceof CTShape){
_shape.getSpList().remove(obj);
} else if (obj instanceof CTGroupShape){
_shape.getGrpSpList().remove(obj);
} else if (obj instanceof CTConnector){
_shape.getCxnSpList().remove(obj);
} else {
throw new IllegalArgumentException("Unsupported shape: " + xShape);
}
return _shapes.remove(xShape);
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Removes the specified shape from this sheet, if it is present
* (optional operation). If this sheet does not contain the element,
* it is unchanged.
*
* @param xShape shape to be removed from this sheet, if present
* @return <tt>true</tt> if this sheet contained the specified element
* @throws IllegalArgumentException if the type of the specified shape
* is incompatible with this sheet (optional)
*/
public boolean removeShape(XSLFShape xShape) {
XmlObject obj = xShape.getXmlObject();
CTGroupShape spTree = getSpTree();
if(obj instanceof CTShape){
spTree.getSpList().remove(obj);
} else if (obj instanceof CTGroupShape){
spTree.getGrpSpList().remove(obj);
} else if (obj instanceof CTConnector){
spTree.getCxnSpList().remove(obj);
} else {
throw new IllegalArgumentException("Unsupported shape: " + xShape);
}
return getShapeList().remove(xShape);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
XmlObject obj = xShape.getXmlObject();
CTGroupShape spTree = getSpTree();
deregisterShapeId(xShape.getShapeId());
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Remove the specified shape from this group
*/
@Override
public boolean removeShape(XSLFShape xShape) {
XmlObject obj = xShape.getXmlObject();
CTGroupShape grpSp = (CTGroupShape)getXmlObject();
getSheet().deregisterShapeId(xShape.getShapeId());
if(obj instanceof CTShape){
grpSp.getSpList().remove(obj);
} else if (obj instanceof CTGroupShape){
XSLFGroupShape gs = (XSLFGroupShape)xShape;
new ArrayList<>(gs.getShapes()).forEach(gs::removeShape);
grpSp.getGrpSpList().remove(obj);
} else if (obj instanceof CTConnector){
grpSp.getCxnSpList().remove(obj);
} else if (obj instanceof CTGraphicalObjectFrame) {
grpSp.getGraphicFrameList().remove(obj);
} else if (obj instanceof CTPicture) {
XSLFPictureShape ps = (XSLFPictureShape)xShape;
XSLFSheet sh = getSheet();
if (sh != null) {
sh.removePictureRelation(ps);
}
grpSp.getPicList().remove(obj);
} else {
throw new IllegalArgumentException("Unsupported shape: " + xShape);
}
return _shapes.remove(xShape);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Return direct child objects of this shape
*
* @param childClass the class to cast the properties to
* @param namespace the namespace - usually it is {@code "http://schemas.openxmlformats.org/presentationml/2006/main"}
* @param nodename the node name, without prefix
* @return the properties object or null if it can't be found
*/
@SuppressWarnings({"unchecked", "WeakerAccess", "unused", "SameParameterValue"})
protected <T extends XmlObject> T getChild(Class<T> childClass, String namespace, String nodename) {
XmlCursor cur = getXmlObject().newCursor();
T child = null;
if (cur.toChild(namespace, nodename)) {
child = (T)cur.getObject();
}
if (cur.toChild(XSLFRelation.NS_DRAWINGML, nodename)) {
child = (T)cur.getObject();
}
cur.dispose();
return child;
}
代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers
if (!skipPlaceholders && (sh.getXmlObject() instanceof CTPicture)) {
CTPicture ctPic = ((CTPicture) sh.getXmlObject());
if (ctPic.getBlipFill() != null && ctPic.getBlipFill().getBlip() != null) {
String relID = ctPic.getBlipFill().getBlip().getEmbed();
代码示例来源:origin: org.apache.tika/tika-parsers
if (!skipPlaceholders && (sh.getXmlObject() instanceof CTPicture)) {
CTPicture ctPic = ((CTPicture) sh.getXmlObject());
if (ctPic.getBlipFill() != null && ctPic.getBlipFill().getBlip() != null) {
String relID = ctPic.getBlipFill().getBlip().getEmbed();
我得到了带有简单演示的 pptx 文件。它有背景图像,上面有白色文本,并且该文本有阴影。我需要简化演示并删除所有这些内容(将背景设置为白色,将字体颜色设置为黑色并删除阴影) 更改 bachground
我正在使用 Apache POI 库通过 Java 创建 powerpoint 幻灯片。我们的客户对嵌入文本、图像和视频感兴趣。没有花哨现在需要图表等东西。据我了解 XSLF 仍然正在开发中,尚未成为
我使用 Apache POI 作为一种模板化布局的方式,其中的占位符形状将替换为从 Restful 调用中检索到的内容。 所有这些工作正常,但我找不到用另一个图像替换图像的方法。 我知道可以使用以下代
我正在努力在 apache POI 中创建部分。我希望能够用幻灯片定义部分,我该如何做到这一点?到目前为止,我可以毫无问题地添加幻灯片。 这是保存为 XML 的演示文稿的 PowerPoint 部分,
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlideLayout类的一些代码示例,展示了XSLFSlideLayout类的具体用法。这些代码示例主要来源于
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTextParagraph类的一些代码示例,展示了XSLFTextParagraph类的具体用法。这些代码示例主
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTextRun类的一些代码示例,展示了XSLFTextRun类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlideMaster类的一些代码示例,展示了XSLFSlideMaster类的具体用法。这些代码示例主要来源于
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTableCell类的一些代码示例,展示了XSLFTableCell类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTableRow类的一些代码示例,展示了XSLFTableRow类的具体用法。这些代码示例主要来源于Github
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFNotes类的一些代码示例,展示了XSLFNotes类的具体用法。这些代码示例主要来源于Github/Stack
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFPictureShape类的一些代码示例,展示了XSLFPictureShape类的具体用法。这些代码示例主要来
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSheet类的一些代码示例,展示了XSLFSheet类的具体用法。这些代码示例主要来源于Github/Stack
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFHyperlink类的一些代码示例,展示了XSLFHyperlink类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlideShow类的一些代码示例,展示了XSLFSlideShow类的具体用法。这些代码示例主要来源于Gith
当我使用 POI XSLF 创建 PPTX 时,我得到一张空白幻灯片: XMLSlideShow ppt = new XMLSlideShow(); XSLFSlide slide = ppt.cre
我正在制作一个应用程序来创建幻灯片放映。我设法在每张幻灯片上放置一个图像,但它覆盖了书面文本。如何将文字放在图片前面? 这是我的代码。 public void createNewSlide() thr
我需要在使用 Apache POI API 创建的 PowerPoint 演示文稿中创建一个具有水平或垂直渐变填充的矩形。 我正在为矩形使用 XSLFFreeformShape: XSLFGr
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlideLayout.getName()方法的一些代码示例,展示了XSLFSlideLayout.getNam
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlideLayout.getBackground()方法的一些代码示例,展示了XSLFSlideLayout.
我是一名优秀的程序员,十分优秀!