本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSheet.getSlideShow()
方法的一些代码示例,展示了XSLFSheet.getSlideShow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLFSheet.getSlideShow()
方法的具体详情如下:
包路径:org.apache.poi.xslf.usermodel.XSLFSheet
类名称:XSLFSheet
方法名:getSlideShow
暂无
代码示例来源:origin: org.apache.poi/poi-ooxml
@Override
public Rectangle2D getAnchor(){
Dimension pg = getSheet().getSlideShow().getPageSize();
return new Rectangle2D.Double(0, 0, pg.getWidth(), pg.getHeight());
}
代码示例来源:origin: org.apache.poi/poi-ooxml
boolean fetchThemeProperty(final ParagraphPropertyFetcher<?> visitor) {
final XSLFTextShape shape = getParentShape();
if (shape.isPlaceholder()) {
return false;
}
// if it is a plain text box then take defaults from presentation.xml
@SuppressWarnings("resource")
final XMLSlideShow ppt = shape.getSheet().getSlideShow();
final CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(getIndentLevel());
return themeProps != null && visitor.fetch(themeProps);
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Get assigned TableStyle
*
* @return the assigned TableStyle
*
* @since POI 3.15-beta2
*/
protected XSLFTableStyle getTableStyle() {
CTTable tab = getCTTable();
// TODO: support inline table style
if (!tab.isSetTblPr() || !tab.getTblPr().isSetTableStyleId()) {
return null;
}
String styleId = tab.getTblPr().getTableStyleId();
XSLFTableStyles styles = getSheet().getSlideShow().getTableStyles();
for (XSLFTableStyle style : styles.getStyles()) {
if (style.getStyleId().equals(styleId)) {
return style;
}
}
return null;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
XSLFPictureShape p = (XSLFPictureShape)shape;
XSLFPictureData pd = p.getPictureData();
XSLFPictureData pdNew = getSheet().getSlideShow().addPicture(pd.getData(), pd.getType());
newShape = createPicture(pdNew);
} else if (shape instanceof XSLFGroupShape) {
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Import a picture data from another document.
*
* @param blipId ID of the package relationship to retrieve.
* @param parent parent document containing the data to import
* @return ID of the created relationship
*/
String importBlip(String blipId, POIXMLDocumentPart parent) {
final XSLFPictureData parData = parent.getRelationPartById(blipId).getDocumentPart();
final XSLFPictureData pictureData;
if (getPackagePart().getPackage() == parent.getPackagePart().getPackage()) {
// handle ref counter correct, if the parent document is the same as this
pictureData = parData;
} else {
XMLSlideShow ppt = getSlideShow();
pictureData = ppt.addPicture(parData.getData(), parData.getType());
}
RelationPart rp = addRelation(blipId, XSLFRelation.IMAGES, pictureData);
return rp.getRelationship().getId();
}
代码示例来源:origin: org.apache.poi/poi-ooxml
XMLSlideShow slideShow = sheet.getSlideShow();
CTTableStyleCellStyle tcStyle = tps.getTcStyle();
if (tcStyle.isSetFill()) {
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
@Override
public Rectangle2D getAnchor(){
Dimension pg = getSheet().getSlideShow().getPageSize();
return new Rectangle2D.Double(0, 0, pg.getWidth(), pg.getHeight());
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
@Override
public Rectangle2D getAnchor(){
Dimension pg = getSheet().getSlideShow().getPageSize();
return new Rectangle2D.Double(0, 0, pg.getWidth(), pg.getHeight());
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
boolean fetchThemeProperty(final ParagraphPropertyFetcher<?> visitor) {
final XSLFTextShape shape = getParentShape();
if (shape.isPlaceholder()) {
return false;
}
// if it is a plain text box then take defaults from presentation.xml
@SuppressWarnings("resource")
final XMLSlideShow ppt = shape.getSheet().getSlideShow();
final CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(getIndentLevel());
return themeProps != null && visitor.fetch(themeProps);
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
if(!_shape.getWordWrap()) {
width = _shape.getSheet().getSlideShow().getPageSize().getWidth() - anchor.getX();
} else {
width = anchor.getWidth() - leftInset - rightInset - leftMargin;
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
XSLFPictureShape p = (XSLFPictureShape)shape;
XSLFPictureData pd = p.getPictureData();
XSLFPictureData pdNew = getSheet().getSlideShow().addPicture(pd.getData(), pd.getType());
newShape = createPicture(pdNew);
} else if (shape instanceof XSLFGroupShape) {
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Get assigned TableStyle
*
* @return the assigned TableStyle
*
* @since POI 3.15-beta2
*/
protected XSLFTableStyle getTableStyle() {
CTTable tab = getCTTable();
// TODO: support inline table style
if (!tab.isSetTblPr() || !tab.getTblPr().isSetTableStyleId()) {
return null;
}
String styleId = tab.getTblPr().getTableStyleId();
XSLFTableStyles styles = getSheet().getSlideShow().getTableStyles();
for (XSLFTableStyle style : styles.getStyles()) {
if (style.getStyleId().equals(styleId)) {
return style;
}
}
return null;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Import a picture data from another document.
*
* @param blipId ID of the package relationship to retrieve.
* @param parent parent document containing the data to import
* @return ID of the created relationship
*/
String importBlip(String blipId, POIXMLDocumentPart parent) {
final XSLFPictureData parData = parent.getRelationPartById(blipId).getDocumentPart();
final XSLFPictureData pictureData;
if (getPackagePart().getPackage() == parent.getPackagePart().getPackage()) {
// handle ref counter correct, if the parent document is the same as this
pictureData = parData;
} else {
XMLSlideShow ppt = getSlideShow();
pictureData = ppt.addPicture(parData.getData(), parData.getType());
}
RelationPart rp = addRelation(blipId, XSLFRelation.IMAGES, pictureData);
return rp.getRelationship().getId();
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Import a picture data from another document.
*
* @param blipId ID of the package relationship to retrieve.
* @param packagePart package part containing the data to import
* @return ID of the created relationship
*/
String importBlip(String blipId, PackagePart packagePart) {
PackageRelationship blipRel = packagePart.getRelationship(blipId);
PackagePart blipPart;
try {
blipPart = packagePart.getRelatedPart(blipRel);
} catch (InvalidFormatException e){
throw new POIXMLException(e);
}
XSLFPictureData data = new XSLFPictureData(blipPart, null);
XMLSlideShow ppt = getSlideShow();
int pictureIdx = ppt.addPicture(data.getData(), data.getPictureType());
PackagePart pic = ppt.getAllPictures().get(pictureIdx).getPackagePart();
PackageRelationship rel = getPackagePart().addRelationship(
pic.getPartName(), TargetMode.INTERNAL, blipRel.getRelationshipType());
addRelation(rel.getId(), new XSLFPictureData(pic, rel));
return rel.getId();
}
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
private boolean fetchCharacterProperty(CharacterPropertyFetcher fetcher){
boolean ok = false;
if(_r.isSetRPr()) ok = fetcher.fetch(getRPr());
if(!ok) {
XSLFTextShape shape = _p.getParentShape();
ok = shape.fetchShapeProperty(fetcher);
if(!ok){
CTPlaceholder ph = shape.getCTPlaceholder();
if(ph == null){
// if it is a plain text box then take defaults from presentation.xml
XMLSlideShow ppt = shape.getSheet().getSlideShow();
CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(_p.getLevel());
if(themeProps != null) {
fetcher.isFetchingFromMaster = true;
ok = fetcher.fetch(themeProps);
}
}
if (!ok) {
CTTextParagraphProperties defaultProps = _p.getDefaultMasterStyle();
if(defaultProps != null) {
fetcher.isFetchingFromMaster = true;
ok = fetcher.fetch(defaultProps);
}
}
}
}
return ok;
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
private boolean fetchParagraphProperty(ParagraphPropertyFetcher visitor){
boolean ok = false;
if(_p.isSetPPr()) ok = visitor.fetch(_p.getPPr());
if(!ok) {
XSLFTextShape shape = getParentShape();
ok = shape.fetchShapeProperty(visitor);
if(!ok){
CTPlaceholder ph = shape.getCTPlaceholder();
if(ph == null){
// if it is a plain text box then take defaults from presentation.xml
XMLSlideShow ppt = getParentShape().getSheet().getSlideShow();
CTTextParagraphProperties themeProps = ppt.getDefaultParagraphStyle(getLevel());
if(themeProps != null) ok = visitor.fetch(themeProps);
}
if(!ok){
// defaults for placeholders are defined in the slide master
CTTextParagraphProperties defaultProps = getDefaultMasterStyle();
if(defaultProps != null) ok = visitor.fetch(defaultProps);
}
}
}
return ok;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
XMLSlideShow slideShow = sheet.getSlideShow();
CTTableStyleCellStyle tcStyle = tps.getTcStyle();
if (tcStyle.isSetFill()) {
内容来源于网络,如有侵权,请联系作者删除!