Package org.apache.poi.hwpf.model.types
Class FFDataBaseAbstractType
java.lang.Object
org.apache.poi.hwpf.model.types.FFDataBaseAbstractType
- Direct Known Subclasses:
FFDataBase
The FFData structure specifies form field data for a text
box, check box, or drop-down list box.
Class and fields descriptions are quoted from [MS-DOC] -- v20121003 Word (.doc) Binary File Format; Copyright (c) 2012 Microsoft Corporation; Release: October 8, 2012
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:
- Sergey Vladimirov; according to [MS-DOC] -- v20121003 Word (.doc) Binary File Format; Copyright (c) 2012 Microsoft Corporation; Release: October 8, 2012
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected long
protected short
protected int
protected int
static final byte
Specifies that the form field is a checkbox.static final byte
Specifies that the form field is a dropdown list box.static final byte
Specifies that the form field is a textbox.protected static final byte
Specifies that the textbox value is calculated from an expression.static final byte
Specifies that the textbox value is the current date.static final byte
Specifies that the textbox value is the current time.static final byte
Specifies that the textbox value is a date or time.static final byte
Specifies that the textbox value is a number.static final byte
Specifies that the textbox value is regular text. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected void
fillFields
(byte[] data, int offset) short
getBits()
An FFDataBits that specifies the type and state of this form field.int
getCch()
An unsigned integer that specifies the maximum length, in characters, of the value of the textbox.int
getHps()
An unsigned integer.byte
getIRes()
An unsigned integer.byte
getIType()
An unsigned integer that specifies the type of the form field.byte
An unsigned integer that specifies the type of the textbox.static int
getSize()
Size of recordlong
An unsigned integer that MUST be 0xFFFFFFFF.int
hashCode()
boolean
A bit that specifies that the form field has a list box.boolean
A bit that specifies whether the form field has custom help text in FFData.xstzHelpText.boolean
A bit that specifies whether the form field has custom status bar text in FFData.xstzStatText.boolean
isFProt()
A bit that specifies whether the form field is protected and its value cannot be changed.boolean
A bit that specifies whether the value of the field is automatically calculated after the field is modified.boolean
isISize()
A bit that specifies whether the size of a checkbox is automatically determined by the text size where the checkbox is located.byte[]
void
serialize
(byte[] data, int offset) void
setBits
(short field_2_bits) An FFDataBits that specifies the type and state of this form field.void
setCch
(int field_3_cch) An unsigned integer that specifies the maximum length, in characters, of the value of the textbox.void
setFHasListBox
(boolean value) Sets the fHasListBox field value.void
setFOwnHelp
(boolean value) Sets the fOwnHelp field value.void
setFOwnStat
(boolean value) Sets the fOwnStat field value.void
setFProt
(boolean value) Sets the fProt field value.void
setFRecalc
(boolean value) Sets the fRecalc field value.void
setHps
(int field_4_hps) An unsigned integer.void
setIRes
(byte value) Sets the iRes field value.void
setISize
(boolean value) Sets the iSize field value.void
setIType
(byte value) Sets the iType field value.void
setITypeTxt
(byte value) Sets the iTypeTxt field value.void
setVersion
(long field_1_version) An unsigned integer that MUST be 0xFFFFFFFF.toString()
-
Field Details
-
field_1_version
protected long field_1_version -
field_2_bits
protected short field_2_bits -
ITYPE_TEXT
public static final byte ITYPE_TEXTSpecifies that the form field is a textbox.- See Also:
-
ITYPE_CHCK
public static final byte ITYPE_CHCKSpecifies that the form field is a checkbox.- See Also:
-
ITYPE_DROP
public static final byte ITYPE_DROPSpecifies that the form field is a dropdown list box.- See Also:
-
ITYPETXT_REG
public static final byte ITYPETXT_REGSpecifies that the textbox value is regular text.- See Also:
-
ITYPETXT_NUM
public static final byte ITYPETXT_NUMSpecifies that the textbox value is a number.- See Also:
-
ITYPETXT_DATE
public static final byte ITYPETXT_DATESpecifies that the textbox value is a date or time.- See Also:
-
ITYPETXT_CURDATE
public static final byte ITYPETXT_CURDATESpecifies that the textbox value is the current date.- See Also:
-
ITYPETXT_CURTIME
public static final byte ITYPETXT_CURTIMESpecifies that the textbox value is the current time.- See Also:
-
ITYPETXT_CALC
protected static final byte ITYPETXT_CALCSpecifies that the textbox value is calculated from an expression. The expression is given by FFData.xstzTextDef.- See Also:
-
field_3_cch
protected int field_3_cch -
field_4_hps
protected int field_4_hps
-
-
Constructor Details
-
FFDataBaseAbstractType
protected FFDataBaseAbstractType()
-
-
Method Details
-
fillFields
protected void fillFields(byte[] data, int offset) -
serialize
public void serialize(byte[] data, int offset) -
serialize
public byte[] serialize() -
getSize
public static int getSize()Size of record -
equals
-
hashCode
public int hashCode() -
toString
-
getVersion
An unsigned integer that MUST be 0xFFFFFFFF. -
setVersion
An unsigned integer that MUST be 0xFFFFFFFF. -
getBits
An FFDataBits that specifies the type and state of this form field. -
setBits
An FFDataBits that specifies the type and state of this form field. -
getCch
An unsigned integer that specifies the maximum length, in characters, of the value of the textbox. This value MUST NOT exceed 32767. A value of 0 means there is no maximum length of the value of the textbox. If bits.iType is not iTypeText (0), this value MUST be 0.. -
setCch
An unsigned integer that specifies the maximum length, in characters, of the value of the textbox. This value MUST NOT exceed 32767. A value of 0 means there is no maximum length of the value of the textbox. If bits.iType is not iTypeText (0), this value MUST be 0.. -
getHps
An unsigned integer. If bits.iType is iTypeChck (1), hps specifies the size, in half-points, of the checkbox and MUST be between 2 and 3168, inclusive. If bits.iType is not iTypeChck (1), hps is undefined and MUST be ignored.. -
setHps
An unsigned integer. If bits.iType is iTypeChck (1), hps specifies the size, in half-points, of the checkbox and MUST be between 2 and 3168, inclusive. If bits.iType is not iTypeChck (1), hps is undefined and MUST be ignored.. -
setIType
Sets the iType field value. An unsigned integer that specifies the type of the form field. -
getIType
An unsigned integer that specifies the type of the form field.- Returns:
- the iType field value.
-
setIRes
Sets the iRes field value. An unsigned integer. If iType is iTypeText (0), then iRes MUST be 0. If iType is iTypeChck (1), iRes specifies the state of the checkbox and MUST be 0 (unchecked), 1 (checked), or 25 (undefined). Undefined checkboxes are treated as unchecked. If iType is iTypeDrop (2), iRes specifies the current selected list box item. A value of 25 specifies the selection is undefined. Otherwise, iRes is a zero-based index into FFData.hsttbDropList. -
getIRes
An unsigned integer. If iType is iTypeText (0), then iRes MUST be 0. If iType is iTypeChck (1), iRes specifies the state of the checkbox and MUST be 0 (unchecked), 1 (checked), or 25 (undefined). Undefined checkboxes are treated as unchecked. If iType is iTypeDrop (2), iRes specifies the current selected list box item. A value of 25 specifies the selection is undefined. Otherwise, iRes is a zero-based index into FFData.hsttbDropList.- Returns:
- the iRes field value.
-
setFOwnHelp
Sets the fOwnHelp field value. A bit that specifies whether the form field has custom help text in FFData.xstzHelpText. If fOwnHelp is 0, FFData.xstzHelpText contains an empty or auto-generated string. -
isFOwnHelp
A bit that specifies whether the form field has custom help text in FFData.xstzHelpText. If fOwnHelp is 0, FFData.xstzHelpText contains an empty or auto-generated string.- Returns:
- the fOwnHelp field value.
-
setFOwnStat
Sets the fOwnStat field value. A bit that specifies whether the form field has custom status bar text in FFData.xstzStatText. If fOwnStat is 0, FFData.xstzStatText contains an empty or auto-generated string. -
isFOwnStat
A bit that specifies whether the form field has custom status bar text in FFData.xstzStatText. If fOwnStat is 0, FFData.xstzStatText contains an empty or auto-generated string.- Returns:
- the fOwnStat field value.
-
setFProt
Sets the fProt field value. A bit that specifies whether the form field is protected and its value cannot be changed. -
isFProt
A bit that specifies whether the form field is protected and its value cannot be changed.- Returns:
- the fProt field value.
-
setISize
Sets the iSize field value. A bit that specifies whether the size of a checkbox is automatically determined by the text size where the checkbox is located. This value MUST be 0 if iType is not iTypeChck (1). -
isISize
A bit that specifies whether the size of a checkbox is automatically determined by the text size where the checkbox is located. This value MUST be 0 if iType is not iTypeChck (1).- Returns:
- the iSize field value.
-
setITypeTxt
Sets the iTypeTxt field value. An unsigned integer that specifies the type of the textbox. If iType is not iTypeText (0), iTypeTxt MUST be 0 and MUST be ignored. -
getITypeTxt
An unsigned integer that specifies the type of the textbox. If iType is not iTypeText (0), iTypeTxt MUST be 0 and MUST be ignored.- Returns:
- the iTypeTxt field value.
-
setFRecalc
Sets the fRecalc field value. A bit that specifies whether the value of the field is automatically calculated after the field is modified. -
isFRecalc
A bit that specifies whether the value of the field is automatically calculated after the field is modified.- Returns:
- the fRecalc field value.
-
setFHasListBox
Sets the fHasListBox field value. A bit that specifies that the form field has a list box. This value MUST be 1 if iType is iTypeDrop (2). Otherwise, this value MUST be 0. -
isFHasListBox
A bit that specifies that the form field has a list box. This value MUST be 1 if iType is iTypeDrop (2). Otherwise, this value MUST be 0.- Returns:
- the fHasListBox field value.
-