Package org.apache.poi.hwpf.model

Examples of org.apache.poi.hwpf.model.TabDescriptor


    int addSize = grpprl[offset++];
    int start = offset;
    for (int x = 0; x < addSize; x++)
    {
      Integer key = Integer.valueOf(LittleEndian.getShort(grpprl, offset));
      TabDescriptor val = new TabDescriptor( grpprl, start + ((TabDescriptor.getSize() * addSize) + x) );
      tabMap.put(key, val);
      offset += LittleEndian.SHORT_SIZE;
    }

    tabPositions = new int[tabMap.size()];
    tabDescriptors = new TabDescriptor[tabPositions.length];
   
    List<Integer> list = new ArrayList<Integer>(tabMap.keySet());
    Collections.sort(list);

    for (int x = 0; x < tabPositions.length; x++)
    {
      Integer key = list.get(x);
      tabPositions[x] = key.intValue();
      if (tabMap.containsKey( key ))
          tabDescriptors[x] = tabMap.get(key);
      else
          tabDescriptors[x] = new TabDescriptor();
    }

    pap.setRgdxaTab(tabPositions);
    pap.setRgtbd(tabDescriptors);
  }
View Full Code Here


    int addSize = grpprl[offset++];
    int start = offset;
    for (int x = 0; x < addSize; x++)
    {
      Integer key = Integer.valueOf(LittleEndian.getShort(grpprl, offset));
      TabDescriptor val = new TabDescriptor( grpprl, start + ((TabDescriptor.getSize() * addSize) + x) );
      tabMap.put(key, val);
      offset += LittleEndian.SHORT_SIZE;
    }

    tabPositions = new int[tabMap.size()];
    tabDescriptors = new TabDescriptor[tabPositions.length];
   
    List<Integer> list = new ArrayList<Integer>(tabMap.keySet());
    Collections.sort(list);

    for (int x = 0; x < tabPositions.length; x++)
    {
      Integer key = list.get(x);
      tabPositions[x] = key.intValue();
      if (tabMap.containsKey( key ))
          tabDescriptors[x] = tabMap.get(key);
      else
          tabDescriptors[x] = new TabDescriptor();
    }

    pap.setRgdxaTab(tabPositions);
    pap.setRgtbd(tabDescriptors);
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.hwpf.model.TabDescriptor

Copyright © 2018 www.massapicom. 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.