本文整理了Java中org.apache.poi.xssf.usermodel.XSSFRichTextString.getThemesTable()
方法的一些代码示例,展示了XSSFRichTextString.getThemesTable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFRichTextString.getThemesTable()
方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFRichTextString
类名称:XSSFRichTextString
方法名:getThemesTable
暂无
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Return a copy of the font in use at a particular index.
*
* @param index The index.
* @return A copy of the font that's currently being applied at that
* index or null if no font is being applied or the
* index is out of range.
*/
public XSSFFont getFontAtIndex( int index ) {
final ThemesTable themes = getThemesTable();
int pos = 0;
//noinspection deprecation - for performance reasons!
for(CTRElt r : st.getRArray()){
final int length = r.getT().length();
if(index >= pos && index < pos + length) {
XSSFFont fnt = new XSSFFont(toCTFont(r.getRPr()));
fnt.setThemesTable(themes);
return fnt;
}
pos += length;
}
return null;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Gets a copy of the font used in a particular formatting run.
*
* @param index the index of the formatting run
* @return A copy of the font used or null if no formatting is applied to the specified text run.
*/
public XSSFFont getFontOfFormattingRun(int index) {
if(st.sizeOfRArray() == 0 || index >= st.sizeOfRArray()) {
return null;
}
CTRElt r = st.getRArray(index);
if(r.getRPr() != null) {
XSSFFont fnt = new XSSFFont(toCTFont(r.getRPr()));
fnt.setThemesTable(getThemesTable());
return fnt;
}
return null;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Return a copy of the font in use at a particular index.
*
* @param index The index.
* @return A copy of the font that's currently being applied at that
* index or null if no font is being applied or the
* index is out of range.
*/
public XSSFFont getFontAtIndex( int index ) {
final ThemesTable themes = getThemesTable();
int pos = 0;
//noinspection deprecation - for performance reasons!
for(CTRElt r : st.getRArray()){
final int length = r.getT().length();
if(index >= pos && index < pos + length) {
XSSFFont fnt = new XSSFFont(toCTFont(r.getRPr()));
fnt.setThemesTable(themes);
return fnt;
}
pos += length;
}
return null;
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Return a copy of the font in use at a particular index.
*
* @param index The index.
* @return A copy of the font that's currently being applied at that
* index or null if no font is being applied or the
* index is out of range.
*/
public XSSFFont getFontAtIndex( int index ) {
if(st.sizeOfRArray() == 0) return null;
int pos = 0;
for(int i = 0; i < st.sizeOfRArray(); i++){
CTRElt r = st.getRArray(i);
if(index >= pos && index < pos + r.getT().length()) {
XSSFFont fnt = new XSSFFont(toCTFont(r.getRPr()));
fnt.setThemesTable(getThemesTable());
return fnt;
}
pos += r.getT().length();
}
return null;
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Gets a copy of the font used in a particular formatting run.
*
* @param index the index of the formatting run
* @return A copy of the font used or null if no formatting is applied to the specified text run.
*/
public XSSFFont getFontOfFormattingRun(int index) {
if(st.sizeOfRArray() == 0) return null;
for(int i = 0; i < st.sizeOfRArray(); i++){
CTRElt r = st.getRArray(i);
if(i == index) {
XSSFFont fnt = new XSSFFont(toCTFont(r.getRPr()));
fnt.setThemesTable(getThemesTable());
return fnt;
}
}
return null;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Gets a copy of the font used in a particular formatting run.
*
* @param index the index of the formatting run
* @return A copy of the font used or null if no formatting is applied to the specified text run.
*/
public XSSFFont getFontOfFormattingRun(int index) {
if(st.sizeOfRArray() == 0 || index >= st.sizeOfRArray()) {
return null;
}
CTRElt r = st.getRArray(index);
if(r.getRPr() != null) {
XSSFFont fnt = new XSSFFont(toCTFont(r.getRPr()));
fnt.setThemesTable(getThemesTable());
return fnt;
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!