Search in sources :

Example 1 with NilPICFAndBinData

use of org.apache.poi.hwpf.model.NilPICFAndBinData in project poi by apache.

the class CharacterRun method getDropDownListDefaultItemIndex.

public Integer getDropDownListDefaultItemIndex() {
    if (getDocument() instanceof HWPFDocument) {
        char c = _text.charAt(_start);
        if (c == 0x01) {
            NilPICFAndBinData data = new NilPICFAndBinData(((HWPFDocument) getDocument()).getDataStream(), getPicOffset());
            FFData ffData = new FFData(data.getBinData(), 0);
            return Integer.valueOf(ffData.getDefaultDropDownItemIndex());
        }
    }
    return null;
}
Also used : HWPFDocument(org.apache.poi.hwpf.HWPFDocument) NilPICFAndBinData(org.apache.poi.hwpf.model.NilPICFAndBinData) FFData(org.apache.poi.hwpf.model.FFData)

Example 2 with NilPICFAndBinData

use of org.apache.poi.hwpf.model.NilPICFAndBinData in project poi by apache.

the class CharacterRun method getDropDownListValues.

public String[] getDropDownListValues() {
    if (getDocument() instanceof HWPFDocument) {
        char c = _text.charAt(_start);
        if (c == 0x01) {
            NilPICFAndBinData data = new NilPICFAndBinData(((HWPFDocument) getDocument()).getDataStream(), getPicOffset());
            FFData ffData = new FFData(data.getBinData(), 0);
            String[] values = ffData.getDropList();
            return values;
        }
    }
    return null;
}
Also used : HWPFDocument(org.apache.poi.hwpf.HWPFDocument) NilPICFAndBinData(org.apache.poi.hwpf.model.NilPICFAndBinData) FFData(org.apache.poi.hwpf.model.FFData)

Aggregations

HWPFDocument (org.apache.poi.hwpf.HWPFDocument)2 FFData (org.apache.poi.hwpf.model.FFData)2 NilPICFAndBinData (org.apache.poi.hwpf.model.NilPICFAndBinData)2