本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFStyles.getUsedStyleList()
方法的一些代码示例,展示了XWPFStyles.getUsedStyleList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWPFStyles.getUsedStyleList()
方法的具体详情如下:
包路径:org.apache.poi.xwpf.usermodel.XWPFStyles
类名称:XWPFStyles
方法名:getUsedStyleList
[英]get the styles which are related to the parameter style and their relatives this method can be used to copy all styles from one document to another document
[中]获取与参数样式及其相关项相关的样式此方法可用于将所有样式从一个文档复制到另一个文档
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* get the styles which are related to the parameter style and their relatives
* this method can be used to copy all styles from one document to another document
*
* @param style
* @return a list of all styles which were used by this method
*/
public List<XWPFStyle> getUsedStyleList(XWPFStyle style) {
List<XWPFStyle> usedStyleList = new ArrayList<>();
usedStyleList.add(style);
return getUsedStyleList(style, usedStyleList);
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* get the styles which are related to parameter style
*
* @param style
* @return all Styles of the parameterList
*/
private List<XWPFStyle> getUsedStyleList(XWPFStyle style, List<XWPFStyle> usedStyleList) {
String basisStyleID = style.getBasisStyleID();
XWPFStyle basisStyle = getStyle(basisStyleID);
if ((basisStyle != null) && (!usedStyleList.contains(basisStyle))) {
usedStyleList.add(basisStyle);
getUsedStyleList(basisStyle, usedStyleList);
}
String linkStyleID = style.getLinkStyleID();
XWPFStyle linkStyle = getStyle(linkStyleID);
if ((linkStyle != null) && (!usedStyleList.contains(linkStyle))) {
usedStyleList.add(linkStyle);
getUsedStyleList(linkStyle, usedStyleList);
}
String nextStyleID = style.getNextStyleID();
XWPFStyle nextStyle = getStyle(nextStyleID);
if ((nextStyle != null) && (!usedStyleList.contains(nextStyle))) {
usedStyleList.add(linkStyle);
getUsedStyleList(linkStyle, usedStyleList);
}
return usedStyleList;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* get the styles which are related to the parameter style and their relatives
* this method can be used to copy all styles from one document to another document
*
* @param style
* @return a list of all styles which were used by this method
*/
public List<XWPFStyle> getUsedStyleList(XWPFStyle style) {
List<XWPFStyle> usedStyleList = new ArrayList<>();
usedStyleList.add(style);
return getUsedStyleList(style, usedStyleList);
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* get the styles which are related to the parameter style and their relatives
* this method can be used to copy all styles from one document to another document
* @param style
* @return a list of all styles which were used by this method
*/
public List<XWPFStyle> getUsedStyleList(XWPFStyle style){
List<XWPFStyle> usedStyleList = new ArrayList<XWPFStyle>();
usedStyleList.add(style);
return getUsedStyleList(style, usedStyleList);
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* get the styles which are related to parameter style
* @param style
* @return all Styles of the parameterList
*/
private List<XWPFStyle> getUsedStyleList(XWPFStyle style, List<XWPFStyle> usedStyleList){
String basisStyleID = style.getBasisStyleID();
XWPFStyle basisStyle = getStyle(basisStyleID);
if((basisStyle!=null)&&(!usedStyleList.contains(basisStyle))){
usedStyleList.add(basisStyle);
getUsedStyleList(basisStyle, usedStyleList);
}
String linkStyleID = style.getLinkStyleID();
XWPFStyle linkStyle = getStyle(linkStyleID);
if((linkStyle!=null)&&(!usedStyleList.contains(linkStyle))){
usedStyleList.add(linkStyle);
getUsedStyleList(linkStyle, usedStyleList);
}
String nextStyleID = style.getNextStyleID();
XWPFStyle nextStyle = getStyle(nextStyleID);
if((nextStyle!=null)&&(!usedStyleList.contains(nextStyle))){
usedStyleList.add(linkStyle);
getUsedStyleList(linkStyle, usedStyleList);
}
return usedStyleList;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* get the styles which are related to parameter style
*
* @param style
* @return all Styles of the parameterList
*/
private List<XWPFStyle> getUsedStyleList(XWPFStyle style, List<XWPFStyle> usedStyleList) {
String basisStyleID = style.getBasisStyleID();
XWPFStyle basisStyle = getStyle(basisStyleID);
if ((basisStyle != null) && (!usedStyleList.contains(basisStyle))) {
usedStyleList.add(basisStyle);
getUsedStyleList(basisStyle, usedStyleList);
}
String linkStyleID = style.getLinkStyleID();
XWPFStyle linkStyle = getStyle(linkStyleID);
if ((linkStyle != null) && (!usedStyleList.contains(linkStyle))) {
usedStyleList.add(linkStyle);
getUsedStyleList(linkStyle, usedStyleList);
}
String nextStyleID = style.getNextStyleID();
XWPFStyle nextStyle = getStyle(nextStyleID);
if ((nextStyle != null) && (!usedStyleList.contains(nextStyle))) {
usedStyleList.add(linkStyle);
getUsedStyleList(linkStyle, usedStyleList);
}
return usedStyleList;
}
内容来源于网络,如有侵权,请联系作者删除!