Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /* ====================================================================
     Licensed to the Apache Software Foundation (ASF) under one or more
     contributor license agreements.  See the NOTICE file distributed with
     this work for additional information regarding copyright ownership.
     The ASF licenses this file to You under the Apache License, Version 2.0
     (the "License"); you may not use this file except in compliance with
     the License.  You may obtain a copy of the License at
  
         http://www.apache.org/licenses/LICENSE-2.0
 
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
 package org.apache.poi.hwpf.model.types;
 
 
The LSTF structure contains formatting properties that apply to an entire list.

Class and fields descriptions are quoted from Microsoft Office Word 97-2007 Binary File Format and [MS-DOC] - v20110608 Word (.doc) Binary File Format

NOTE: This source is automatically generated please do not modify this file. Either subclass or remove the record in src/types/definitions.

This class is internal. It content or properties may change without notice due to changes in our knowledge of internal Microsoft Word binary structures.

Author(s):
Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format Specification [*.doc] and [MS-DOC] - v20110608 Word (.doc) Binary File Format
 
 public abstract class LSTFAbstractType
 {
 
     protected int field_1_lsid;
     protected int field_2_tplc;
     protected short[] field_3_rgistdPara;
     protected byte field_4_flags;
     /**/private static final BitField fSimpleList = new BitField(0x01);
     /**/private static final BitField unused1 = new BitField(0x02);
     /**/private static final BitField fAutoNum = new BitField(0x04);
     /**/private static final BitField unused2 = new BitField(0x08);
     /**/private static final BitField fHybrid = new BitField(0x10);
     /**/private static final BitField reserved1 = new BitField(0xE0);
     protected Grfhic field_5_grfhic;
 
     protected LSTFAbstractType()
     {
         this. = new short[0];
         this. = new Grfhic();
     }
 
     protected void fillFieldsbyte[] dataint offset )
     {
                            = LittleEndian.getIntdata, 0x0 + offset );
                            = LittleEndian.getIntdata, 0x4 + offset );
                      = LittleEndian.getShortArraydata, 0x8 + offset, 18 );
                           = data[ 0x1a + offset ];
                          = new Grfhicdata, 0x1b + offset );
     }
 
     public void serializebyte[] dataint offset )
     {
         LittleEndian.putIntdata, 0x0 + offset );
         LittleEndian.putIntdata, 0x4 + offset );
         LittleEndian.putShortArraydata, 0x8 + offset );
         data[ 0x1a + offset ] = ;
         .serializedata, 0x1b + offset );
     }
 
     public byte[] serialize()
     {
         final byte[] result = new bytegetSize() ];
         serializeresult, 0 );
         return result;
     }

    
Size of record
 
     public static int getSize()
     {
         return 0 + 4 + 4 + 18 + 1 + 1;
     }
 
     @Override
     public boolean equalsObject obj )
     {
        if ( this == obj )
            return true;
        if ( obj == null )
            return false;
        if ( getClass() != obj.getClass() )
            return false;
        LSTFAbstractType other = (LSTFAbstractTypeobj;
        if (  != other.field_1_lsid )
            return false;
        if (  != other.field_2_tplc )
            return false;
        if ( !Arrays.equalsother.field_3_rgistdPara ) )
            return false;
        if (  != other.field_4_flags )
            return false;
        if (  == null )
        {
            if ( other.field_5_grfhic != null )
                return false;
        }
        else if ( !.equalsother.field_5_grfhic ) )
            return false;
        return true;
    }
    @Override
    public int hashCode()
    {
        final int prime = 31;
        int result = 1;
        result = prime * result + ;
        result = prime * result + ;
        result = prime * result + Arrays.hashCode );
        result = prime * result + ;
        result = prime * result + .hashCode();
        return result;
    }
    public String toString()
    {
        StringBuilder builder = new StringBuilder();
        builder.append("[LSTF]\n");
        builder.append("    .lsid                 = ");
        builder.append(" (").append(getLsid()).append(" )\n");
        builder.append("    .tplc                 = ");
        builder.append(" (").append(getTplc()).append(" )\n");
        builder.append("    .rgistdPara           = ");
        builder.append(" (").append(getRgistdPara()).append(" )\n");
        builder.append("    .flags                = ");
        builder.append(" (").append(getFlags()).append(" )\n");
        builder.append("         .fSimpleList              = ").append(isFSimpleList()).append('\n');
        builder.append("         .unused1                  = ").append(isUnused1()).append('\n');
        builder.append("         .fAutoNum                 = ").append(isFAutoNum()).append('\n');
        builder.append("         .unused2                  = ").append(isUnused2()).append('\n');
        builder.append("         .fHybrid                  = ").append(isFHybrid()).append('\n');
        builder.append("         .reserved1                = ").append(getReserved1()).append('\n');
        builder.append("    .grfhic               = ");
        builder.append(" (").append(getGrfhic()).append(" )\n");
        builder.append("[/LSTF]\n");
        return builder.toString();
    }

    
A signed integer that specifies the list identifier. This MUST be unique for each LSTF. This value MUST not be 0xFFFFFFFF.
    @Internal
    public int getLsid()
    {
        return ;
    }

    
A signed integer that specifies the list identifier. This MUST be unique for each LSTF. This value MUST not be 0xFFFFFFFF.
    @Internal
    public void setLsidint field_1_lsid )
    {
        this. = field_1_lsid;
    }

    
A Tplc that specifies a unique identifier for this LSTF that MAY be used for user interface purposes. If fHybrid is nonzero, this MUST be ignored.
    @Internal
    public int getTplc()
    {
        return ;
    }

    
A Tplc that specifies a unique identifier for this LSTF that MAY be used for user interface purposes. If fHybrid is nonzero, this MUST be ignored.
    @Internal
    public void setTplcint field_2_tplc )
    {
        this. = field_2_tplc;
    }

    
An array of nine 16-bit signed integers. Each element of rgistdPara specifies the ISTD of the style that is linked to the corresponding level in the list. If no style is linked to a given level, the value of the corresponding element of rgistdPara MUST be 0x0FFF.
    @Internal
    public short[] getRgistdPara()
    {
        return ;
    }

    
An array of nine 16-bit signed integers. Each element of rgistdPara specifies the ISTD of the style that is linked to the corresponding level in the list. If no style is linked to a given level, the value of the corresponding element of rgistdPara MUST be 0x0FFF.
    @Internal
    public void setRgistdParashort[] field_3_rgistdPara )
    {
        this. = field_3_rgistdPara;
    }

    
Get the flags field for the LSTF record.
    @Internal
    public byte getFlags()
    {
        return ;
    }

    
Set the flags field for the LSTF record.
    @Internal
    public void setFlagsbyte field_4_flags )
    {
        this. = field_4_flags;
    }

    
A grfhic that specifies the HTML incompatibilities of the list..
    @Internal
    public Grfhic getGrfhic()
    {
        return ;
    }

    
A grfhic that specifies the HTML incompatibilities of the list..
    @Internal
    public void setGrfhicGrfhic field_5_grfhic )
    {
        this. = field_5_grfhic;
    }

    
Sets the fSimpleList field value. A bit that, when set to 0x1, specifies that this LSTF represents a simple (one-level) list that has one corresponding LVL (see the fcPlfLst field of FibRgFcLcb97). Otherwise, this LSTF represents a multi-level list that has nine corresponding LVLs
    @Internal
    public void setFSimpleListboolean value )
    {
         = (byte).setBoolean(value);
    }

    
A bit that, when set to 0x1, specifies that this LSTF represents a simple (one-level) list that has one corresponding LVL (see the fcPlfLst field of FibRgFcLcb97). Otherwise, this LSTF represents a multi-level list that has nine corresponding LVLs

Returns:
the fSimpleList field value.
    @Internal
    public boolean isFSimpleList()
    {
        return .isSet();
    }

    
Sets the unused1 field value. This bit MUST be ignored
    @Internal
    public void setUnused1boolean value )
    {
         = (byte).setBoolean(value);
    }

    
This bit MUST be ignored

Deprecated:
This field should not be used according to specification
Returns:
the unused1 field value.
    @Internal
    @Deprecated
    public boolean isUnused1()
    {
        return .isSet();
    }

    
Sets the fAutoNum field value. A bit that specifies whether the list that this LSTF represents is used for the AUTONUMOUT, AUTONUMLGL, and AUTONUM fields (see AUTONUMOUT, AUTONUMLGL, and AUTONUM in flt)
    @Internal
    public void setFAutoNumboolean value )
    {
         = (byte).setBoolean(value);
    }

    
A bit that specifies whether the list that this LSTF represents is used for the AUTONUMOUT, AUTONUMLGL, and AUTONUM fields (see AUTONUMOUT, AUTONUMLGL, and AUTONUM in flt)

Returns:
the fAutoNum field value.
    @Internal
    public boolean isFAutoNum()
    {
        return .isSet();
    }

    
Sets the unused2 field value. This bit MUST be ignored
    @Internal
    public void setUnused2boolean value )
    {
         = (byte).setBoolean(value);
    }

    
This bit MUST be ignored

Deprecated:
This field should not be used according to specification
Returns:
the unused2 field value.
    @Internal
    @Deprecated
    public boolean isUnused2()
    {
        return .isSet();
    }

    
Sets the fHybrid field value. A bit that specifies whether the list this LSTF defines is a hybrid list
    @Internal
    public void setFHybridboolean value )
    {
         = (byte).setBoolean(value);
    }

    
A bit that specifies whether the list this LSTF defines is a hybrid list

Returns:
the fHybrid field value.
    @Internal
    public boolean isFHybrid()
    {
        return .isSet();
    }

    
Sets the reserved1 field value. This MUST be zero, and MUST be ignored.
    @Internal
    public void setReserved1byte value )
    {
         = (byte).setValue(value);
    }

    
This MUST be zero, and MUST be ignored.

Deprecated:
This field should not be used according to specification
Returns:
the reserved1 field value.
    @Internal
    @Deprecated
    public byte getReserved1()
    {
        return ( byte ).getValue();
    }
}  // END OF CLASS
New to GrepCode? Check out our FAQ X