Search in sources :

Example 6 with Type12

use of org.apache.poi.hpbf.model.qcbits.QCPLCBit.Type12 in project poi by apache.

the class TestQuillContents method testNoHyperlinks.

@Test
public void testNoHyperlinks() throws IOException {
    HPBFDocument doc = new HPBFDocument(_samples.openResourceAsStream("SampleNewsletter.pub"));
    QuillContents qc = doc.getQuillContents();
    assertEquals(20, qc.getBits().length);
    Type12 plc18 = (Type12) qc.getBits()[18];
    assertEquals(1, plc18.getNumberOfPLCs());
    assertEquals(0, plc18.getNumberOfHyperlinks());
    assertEquals(0, plc18.getTextStartAt(0));
    assertEquals(601, plc18.getAllTextEndAt());
    doc.close();
}
Also used : HPBFDocument(org.apache.poi.hpbf.HPBFDocument) Type12(org.apache.poi.hpbf.model.qcbits.QCPLCBit.Type12) Test(org.junit.Test)

Aggregations

Type12 (org.apache.poi.hpbf.model.qcbits.QCPLCBit.Type12)6 HPBFDocument (org.apache.poi.hpbf.HPBFDocument)5 Test (org.junit.Test)5 QCBit (org.apache.poi.hpbf.model.qcbits.QCBit)1 Type0 (org.apache.poi.hpbf.model.qcbits.QCPLCBit.Type0)1 Type4 (org.apache.poi.hpbf.model.qcbits.QCPLCBit.Type4)1 Type8 (org.apache.poi.hpbf.model.qcbits.QCPLCBit.Type8)1 QCTextBit (org.apache.poi.hpbf.model.qcbits.QCTextBit)1