类 Welement
java.lang.Object
org.anyline.office.docx.entity.Welement
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明List<org.dom4j.Element>所有书签org.dom4j.ElementgetDoc()org.dom4j.ElementgetSrc()getText()查找直接子级t标签文本,tc中可能有多个 t标签,可以调用getTextList或getText返回所有t标签文本(不限层级)获取每个t标签中的文本,注意经常会发生word自己把文字拆成多个t标签, 可以调用getTexts()返回一个完整文本getTexts()合并所有t标签文本成一个文本返回,如果要分开返回可以调用getTextListhtml()html(int lvl) html(org.anyline.handler.Uploader uploader) html(org.anyline.handler.Uploader uploader, int lvl) protected int计算下标List<org.dom4j.Element>placeholders(boolean element) 占位符所在元素(w:t标签)List<org.dom4j.Element>placeholders(boolean element, String regex) placeholders(String regex) 所有${key}格式的占位符voidreload()void删除行内文本内容void替换限制范围内占位符voidvoidsetSrc(org.dom4j.Element src) styles()styles(StringBuilder builder) protected voidt(StringBuilder builder, int lvl)
-
字段详细资料
-
root
-
src
protected org.dom4j.Element src
-
-
构造器详细资料
-
Welement
public Welement()
-
-
方法详细资料
-
reload
public void reload() -
replace
替换限制范围内占位符- 参数:
replaces- replaces
-
removeContent
public void removeContent()删除行内文本内容 -
getDoc
-
setDoc
-
getSrc
public org.dom4j.Element getSrc() -
setSrc
public void setSrc(org.dom4j.Element src) -
bookmarks
所有书签- 返回:
- list
-
placeholders
-
placeholders
占位符所在元素(w:t标签)- 参数:
element- 是否返回占位符所在元素- 返回:
- List
-
placeholders
-
placeholders
所有${key}格式的占位符- 参数:
regex- 正则- 返回:
- list 不包括前后缀标识
-
getTextList
获取每个t标签中的文本,注意经常会发生word自己把文字拆成多个t标签, 可以调用getTexts()返回一个完整文本- 返回:
- List
-
getTexts
合并所有t标签文本成一个文本返回,如果要分开返回可以调用getTextList- 返回:
- String
-
getText
查找直接子级t标签文本,tc中可能有多个 t标签,可以调用getTextList或getText返回所有t标签文本(不限层级)- 返回:
- String
-
index
计算下标- 参数:
index- 下标 从0开始 -1表示最后一行 -2表示倒数第2行size- 总行数- 返回:
- 最终下标
-
child
-
t
-
styles
-
styles
-
color
-
html
-
html
-
html
-
html
-