public class ListTest {
public static void main(String[] args) {
String filename = "/some/path/to/ListTest.doc";
try {
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filename));
HWPFDocument doc = new HWPFDocument(fs);
//Get a table of all the lists in this document
ListTables listtables = doc.getListTables();
Paragraph para;
Range range = doc.getRange();
for(int x=0; x<range.numParagraphs(); x++) {
para = range.getParagraph(x);
//When non-zero, (1-based) index into the pllfo
//identifying the list to which the paragraph belongs
if(para.getIlfo()!=0) {
//Get the list this paragraph belongs to
ListData listdata = listtables.getListData(para.getIlfo());
//Now get all the levels for this list
ListLevel[] listlevel = listdata.getLevels();
//Find the list level info for our paragraph
ListLevel level = listlevel[para.getIlvl()];
System.out.print("Text: \"" + para.text() + "\"");
//list level for this paragraph
System.out.print("\tListLevel: " + para.getIlvl());
//Additional text associated with list symbols
System.out.print("\tgetNumberText: \"" + level.getNumberText() + "\"");
//Format value for the style of list symbols
System.out.println("\tgetNumberFormat: " + level.getNumberFormat());
} else {
System.out.println();
}
}
} catch(Exception e) {
e.printStackTrace();
}
}
}
NFC值编号方案
15单字节字符
16汉字编号3(dbnum3)。
17汉字编号4(dbnum4)。
18圆圈编号(circlenum)。
19双字节阿拉伯编号
20 46语音双字节片假名字符(AIUEO dbchar)。
21 46个拼音双字节片假名字符(iroha dbchar)。
22阿拉伯语与领先的零(01,02,03,...,10,11)
23子弹(没有数在所有)
24韩国编号2(ganada)。
25韩国编号1(chosung)。
26中国编号1(gb1)。
27中文编号2(gb2)。
28中国编号3(gb3)。
29中国编号4(gb4)。
30中国星座编号1
31中国星座编号2
32中国星座编号3
33台湾双字节编号1
34台湾双字节编号2
35台湾双字节编号3
36台湾双字节编号4
37中国双字节编号1
38中国双字节编号2
39中国双字节编号3
40中国双字节编号4
41韩文双字节编号1
42朝鲜语双字节编号2
43朝鲜语双字节编号3
44朝鲜语双字节编号4
45希伯来语非标准十进制
46阿拉伯阿利夫巴塔赫
47希伯来文圣经标准
48阿拉伯文Abjad风格
49个印地文元音
50印地文辅音
51印地文编号
52印地文描述(红雀)
53泰信
54泰号码
55泰文描述(红衣主教
56越南描述(主教)
57页码格式 - # -
58小写俄文字母