gpt4 book ai didi

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

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

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

XSLFSlideShow.getPackage介绍

暂无

代码示例

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

public XSLFPowerPointExtractor(XSLFSlideShow slideShow) {
  this(new XMLSlideShow(slideShow.getPackage()));
}

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

public XSLFSlideShow(OPCPackage container) throws OpenXML4JException, IOException, XmlException {
  super(container);
  if(getCorePart().getContentType().equals(XSLFRelation.THEME_MANAGER.getContentType())) {
    rebase(getPackage());
  }
  presentationDoc =
    PresentationDocument.Factory.parse(getCorePart().getInputStream(), DEFAULT_XML_OPTIONS);
  embedds = new LinkedList<>();
  for (CTSlideIdListEntry ctSlide : getSlideReferences().getSldIdArray()) {
    PackagePart corePart = getCorePart();
    PackagePart slidePart = corePart.getRelatedPart(corePart.getRelationship(ctSlide.getId2()));
    for(PackageRelationship rel : slidePart.getRelationshipsByType(OLE_OBJECT_REL_TYPE)) {
      if (TargetMode.EXTERNAL == rel.getTargetMode()) {
        continue;
      }
      // TODO: Add this reference to each slide as well
      embedds.add(slidePart.getRelatedPart(rel));
    }
    for (PackageRelationship rel : slidePart.getRelationshipsByType(PACK_OBJECT_REL_TYPE)) {
      embedds.add(slidePart.getRelatedPart(rel));
    }
  }
}
public XSLFSlideShow(String file) throws OpenXML4JException, IOException, XmlException {

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

public XSLFPowerPointExtractor(XSLFSlideShow slideShow) {
  this(new XMLSlideShow(slideShow.getPackage()));
}

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

public XSLFSlideShow(OPCPackage container) throws OpenXML4JException, IOException, XmlException {
  super(container);
  if(getCorePart().getContentType().equals(XSLFRelation.THEME_MANAGER.getContentType())) {
    rebase(getPackage());
  }
  presentationDoc =
    PresentationDocument.Factory.parse(getCorePart().getInputStream(), DEFAULT_XML_OPTIONS);
  embedds = new LinkedList<>();
  for (CTSlideIdListEntry ctSlide : getSlideReferences().getSldIdArray()) {
    PackagePart corePart = getCorePart();
    PackagePart slidePart = corePart.getRelatedPart(corePart.getRelationship(ctSlide.getId2()));
    for(PackageRelationship rel : slidePart.getRelationshipsByType(OLE_OBJECT_REL_TYPE)) {
      if (TargetMode.EXTERNAL == rel.getTargetMode()) {
        continue;
      }
      // TODO: Add this reference to each slide as well
      embedds.add(slidePart.getRelatedPart(rel));
    }
    for (PackageRelationship rel : slidePart.getRelationshipsByType(PACK_OBJECT_REL_TYPE)) {
      embedds.add(slidePart.getRelatedPart(rel));
    }
  }
}
public XSLFSlideShow(String file) throws OpenXML4JException, IOException, XmlException {

代码示例来源:origin: com.qwazr/qwazr-library-poi

@Override
public void parseContent(final MultivaluedMap<String, String> parameters, final Path filePath,
    final String extension, final String mimeType, final ParserResultBuilder resultBuilder) throws Exception {
  final XSLFSlideShow pptSlideShow = new XSLFSlideShow(filePath.toAbsolutePath().toString());
  final XMLSlideShow slideshow = new XMLSlideShow(pptSlideShow.getPackage());
  final ParserFieldsBuilder metas = resultBuilder.metas();
  metas.set(MIME_TYPE, findMimeType(extension, mimeType, this::findMimeTypeUsingDefault));
  // Extract metadata
  try (XSLFPowerPointExtractor poiExtractor = new XSLFPowerPointExtractor(slideshow)) {
    final CoreProperties info = poiExtractor.getCoreProperties();
    if (info != null) {
      metas.add(TITLE, info.getTitle());
      metas.add(CREATOR, info.getCreator());
      metas.add(SUBJECT, info.getSubject());
      metas.add(DESCRIPTION, info.getDescription());
      metas.add(KEYWORDS, info.getKeywords());
      metas.add(CREATION_DATE, info.getCreated());
      metas.add(MODIFICATION_DATE, info.getModified());
    }
  }
  extractSides(slideshow, resultBuilder);
}

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