gpt4 book ai didi

org.apache.poi.xslf.usermodel.XSLFShape.copy()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 02:42:40 29 4
gpt4 key购买 nike

本文整理了Java中org.apache.poi.xslf.usermodel.XSLFShape.copy()方法的一些代码示例,展示了XSLFShape.copy()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLFShape.copy()方法的具体详情如下:
包路径:org.apache.poi.xslf.usermodel.XSLFShape
类名称:XSLFShape
方法名:copy

XSLFShape.copy介绍

[英]Set the contents of this shape to be a copy of the source shape. This method is called recursively for each shape when merging slides
[中]将此形状的内容设置为源形状的副本。合并幻灯片时,对每个形状递归调用此方法

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

private void wipeAndReinitialize(XSLFSheet src, int offset) {
  // explicitly initialize drawing and shapes from _spTree
  _shapes = null;
  _drawing = null;
  initDrawingAndShapes();
  // placeholders will be implicitly initialized when requested
  _placeholders = null;
  // update each shape according to its own additional copy rules
  List<XSLFShape> tgtShapes = getShapes();
  List<XSLFShape> srcShapes = src.getShapes();
  for(int i = 0; i < srcShapes.size(); i++){
    XSLFShape s1 = srcShapes.get(i);
    XSLFShape s2 = tgtShapes.get(offset + i);
    s2.copy(s1);
  }
}

代码示例来源:origin: org.apache.poi/poi-ooxml

@Override
void copy(XSLFShape sh){
  super.copy(sh);
  CTGraphicalObjectData data = ((CTGraphicalObjectFrame)getXmlObject()).getGraphic().getGraphicData();
  String uri = data.getUri();
  if(uri.equals("http://schemas.openxmlformats.org/drawingml/2006/diagram")){
    copyDiagram(data, (XSLFGraphicFrame)sh);
  } if(uri.equals("http://schemas.openxmlformats.org/drawingml/2006/chart")){
    copyChart(data, (XSLFGraphicFrame)sh);
  } else {
    // TODO  support other types of objects
  }
}

代码示例来源:origin: org.apache.poi/poi-ooxml

XSLFShape s2 = tgtShapes.get(i);
s2.copy(s1);
newShape.copy(shape);

代码示例来源:origin: org.apache.poi/poi-ooxml

@Override
void copy(XSLFShape sh){
  super.copy(sh);

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

@Override
void copy(XSLFShape src){
  XSLFGroupShape gr = (XSLFGroupShape)src;
  // recursively update each shape
  XSLFShape[] tgtShapes = getShapes();
  XSLFShape[] srcShapes = gr.getShapes();
  for(int i = 0; i < tgtShapes.length; i++){
    XSLFShape s1 = srcShapes[i];
    XSLFShape s2 = tgtShapes[i];
    s2.copy(s1);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

private void wipeAndReinitialize(XSLFSheet src, int offset) {
  // explicitly initialize drawing and shapes from _spTree
  _shapes = null;
  _drawing = null;
  initDrawingAndShapes();
  // placeholders will be implicitly initialized when requested
  _placeholders = null;
  // update each shape according to its own additional copy rules
  List<XSLFShape> tgtShapes = getShapes();
  List<XSLFShape> srcShapes = src.getShapes();
  for(int i = 0; i < srcShapes.size(); i++){
    XSLFShape s1 = srcShapes.get(i);
    XSLFShape s2 = tgtShapes.get(offset + i);
    s2.copy(s1);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

@Override
void copy(XSLFShape sh){
  super.copy(sh);
  CTGraphicalObjectData data = ((CTGraphicalObjectFrame)getXmlObject()).getGraphic().getGraphicData();
  String uri = data.getUri();
  if(uri.equals("http://schemas.openxmlformats.org/drawingml/2006/diagram")){
    copyDiagram(data, (XSLFGraphicFrame)sh);
  } if(uri.equals("http://schemas.openxmlformats.org/drawingml/2006/chart")){
    copyChart(data, (XSLFGraphicFrame)sh);
  } else {
    // TODO  support other types of objects
  }
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Set the contents of this sheet to be a copy of the source sheet.
 * This method erases any existing shapes and replaces them with
 * object from the source sheet.
 *
 * @param src the source sheet to copy data from
 * @return modified 'this'
 */
public XSLFSheet importContent(XSLFSheet src){
  _shapes = null;
  _spTree = null;
  _drawing = null;
  _spTree = null;
  // first copy the source xml
  getSpTree().set(src.getSpTree());
  // recursively update each shape
  List<XSLFShape> tgtShapes = getShapeList();
  List<XSLFShape> srcShapes = src.getShapeList();
  for(int i = 0; i < tgtShapes.size(); i++){
    XSLFShape s1 = srcShapes.get(i);
    XSLFShape s2 = tgtShapes.get(i);
    s2.copy(s1);
  }
  return this;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

XSLFShape s2 = tgtShapes.get(i);
s2.copy(s1);
newShape.copy(shape);

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

XSLFShape s2 = tgtShapes.get(numShapes + i);
s2.copy(s1);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

@Override
void copy(XSLFShape sh){
  super.copy(sh);

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

@Override
void copy(XSLFShape sh){
  super.copy(sh);

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com