FileDocCategorySizeDatePackage
ListFormatOverride.javaAPI DocApache Poi 3.0.13348Mon Jan 01 18:55:34 GMT 2007org.apache.poi.hwpf.model

ListFormatOverride

public class ListFormatOverride extends Object

Fields Summary
int
_lsid
int
_reserved1
int
_reserved2
byte
_clfolvl
byte[]
_reserved3
ListFormatOverrideLevel[]
_levelOverrides
Constructors Summary
public ListFormatOverride(int lsid)


    
  
    _lsid = lsid;
    _levelOverrides = new ListFormatOverrideLevel[0];
  
public ListFormatOverride(byte[] buf, int offset)

    _lsid = LittleEndian.getInt(buf, offset);
    offset += LittleEndian.INT_SIZE;
    _reserved1 = LittleEndian.getInt(buf, offset);
    offset += LittleEndian.INT_SIZE;
    _reserved2 = LittleEndian.getInt(buf, offset);
    offset += LittleEndian.INT_SIZE;
    _clfolvl = buf[offset++];
    System.arraycopy(buf, offset, _reserved3, 0, _reserved3.length);
    _levelOverrides = new ListFormatOverrideLevel[_clfolvl];
  
Methods Summary
public booleanequals(java.lang.Object obj)

    if (obj == null)
    {
      return false;
    }

    ListFormatOverride lfo = (ListFormatOverride)obj;
    return lfo._clfolvl == _clfolvl && lfo._lsid == _lsid &&
      lfo._reserved1 == _reserved1 && lfo._reserved2 == _reserved2 &&
      Arrays.equals(lfo._reserved3, _reserved3) &&
      Arrays.equals(lfo._levelOverrides, _levelOverrides);
  
public org.apache.poi.hwpf.model.ListFormatOverrideLevel[]getLevelOverrides()

    return _levelOverrides;
  
public intgetLsid()

    return _lsid;
  
public org.apache.poi.hwpf.model.ListFormatOverrideLevelgetOverrideLevel(int level)


    ListFormatOverrideLevel retLevel = null;

    for(int x = 0; x < _levelOverrides.length; x++)
    {
      if (_levelOverrides[x].getLevelNum() == level)
      {
        retLevel = _levelOverrides[x];
      }
    }
    return retLevel;
  
public intnumOverrides()

    return _clfolvl;
  
voidsetLsid(int lsid)

    _lsid = lsid;
  
public voidsetOverride(int index, org.apache.poi.hwpf.model.ListFormatOverrideLevel lfolvl)

    _levelOverrides[index] = lfolvl;
  
public byte[]toByteArray()

    byte[] buf = new byte[16];
    int offset = 0;
    LittleEndian.putInt(buf, offset, _lsid);
    offset += LittleEndian.INT_SIZE;
    LittleEndian.putInt(buf, offset, _reserved1);
    offset += LittleEndian.INT_SIZE;
    LittleEndian.putInt(buf, offset, _reserved2);
    offset += LittleEndian.INT_SIZE;
    buf[offset++] = _clfolvl;
    System.arraycopy(_reserved3, 0, buf, offset, 3);

    return buf;