Package org.apache.poi.hslf.record

Examples of org.apache.poi.hslf.record.StyleTextPropAtom.writeOut()


        TextProp tpc = tpcc.addWithName("font.color");
        tpc.setValue(0xFE0033FF);

        // Should now be the same as data_a
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        stpa.writeOut(baos);
        byte[] b = baos.toByteArray();

        assertEquals(data_a.length, b.length);
        for(int i=0; i<data_a.length; i++) {
            assertEquals(data_a[i],b[i]);
View Full Code Here


    protected void doReadWrite(byte[] data, int textlen) throws Exception {
        StyleTextPropAtom stpb = new StyleTextPropAtom(data, 0,data.length);
        if(textlen != -1) stpb.setParentTextSize(textlen);

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        stpb.writeOut(out);
        byte[] bytes = out.toByteArray();

        assertEquals(data.length, bytes.length);
        try {
            assertTrue(Arrays.equals(data, bytes));
View Full Code Here

    TextProp tpc = tpcc.addWithName("font.color");
    tpc.setValue(0xFE0033FF);
   
    // Should now be the same as data_a
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    stpa.writeOut(baos);
    byte[] b = baos.toByteArray();

    assertEquals(data_a.length, b.length);
    for(int i=0; i<data_a.length; i++) {
      assertEquals(data_a[i],b[i]);
View Full Code Here

  }

  public void testWriteA() throws Exception {
    StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    stpa.writeOut(baos);
    byte[] b = baos.toByteArray();

    assertEquals(data_a.length, b.length);
    for(int i=0; i<data_a.length; i++) {
      assertEquals(data_a[i],b[i]);
View Full Code Here

  public void testLoadWriteA() throws Exception {
    StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length);
    stpa.setParentTextSize(data_a_text_len);

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    stpa.writeOut(baos);
    byte[] b = baos.toByteArray();

    assertEquals(data_a.length, b.length);
    for(int i=0; i<data_a.length; i++) {
      assertEquals(data_a[i],b[i]);
View Full Code Here


  public void testWriteB() throws Exception {
    StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    stpb.writeOut(baos);
    byte[] b = baos.toByteArray();

    assertEquals(data_b.length, b.length);
    for(int i=0; i<data_b.length; i++) {
      assertEquals(data_b[i],b[i]);
View Full Code Here

  public void testLoadWriteB() throws Exception {
    StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
    stpb.setParentTextSize(data_b_text_len);

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    stpb.writeOut(baos);
    byte[] b = baos.toByteArray();

    assertEquals(data_b.length, b.length);
    for(int i=0; i<data_b.length; i++) {
      //System.out.println(i + "\t" + b[i] + "\t" + data_b[i] + "\t" + Integer.toHexString(b[i]) );
View Full Code Here

                       0x00 , 0x00 , 0x01 , 0x00 , 0x00 , 0x00 , 0x0F , 0x00
        };
        StyleTextPropAtom stpa = new StyleTextPropAtom(data,0,data.length);
        stpa.setParentTextSize(length);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        stpa.writeOut(baos);
        byte[] b = baos.toByteArray();

        assertEquals(data.length, b.length);
        for(int i=0; i<data.length; i++) {
            assertEquals(data[i],b[i]);
View Full Code Here

    TextProp tpc = tpcc.addWithName("font.color");
    tpc.setValue(0xFE0033FF);
   
    // Should now be the same as data_a
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    stpa.writeOut(baos);
    byte[] b = baos.toByteArray();

    assertEquals(data_a.length, b.length);
    for(int i=0; i<data_a.length; i++) {
      assertEquals(data_a[i],b[i]);
View Full Code Here

  }

  public void testWriteA() throws Exception {
    StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    stpa.writeOut(baos);
    byte[] b = baos.toByteArray();

    assertEquals(data_a.length, b.length);
    for(int i=0; i<data_a.length; i++) {
      assertEquals(data_a[i],b[i]);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.