Lines 64-69
Link Here
|
64 |
* |
64 |
* |
65 |
* REFERENCE: PG 317 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P> |
65 |
* REFERENCE: PG 317 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P> |
66 |
* @author Andrew C. Oliver (acoliver at apache dot org) |
66 |
* @author Andrew C. Oliver (acoliver at apache dot org) |
|
|
67 |
* @author Shawn M. Laubach (shawnlaubach at cox dot net) |
67 |
* @version 2.0-pre |
68 |
* @version 2.0-pre |
68 |
*/ |
69 |
*/ |
69 |
|
70 |
|
Lines 72-78
Link Here
|
72 |
{ |
73 |
{ |
73 |
public final static short sid = 0x41e; |
74 |
public final static short sid = 0x41e; |
74 |
private short field_1_index_code; |
75 |
private short field_1_index_code; |
75 |
private byte field_2_formatstring_len; |
76 |
private short field_2_formatstring_len; |
76 |
private short field_3_unicode_len; // unicode string length |
77 |
private short field_3_unicode_len; // unicode string length |
77 |
private boolean field_3_unicode_flag; // it is not undocumented - it is unicode flag |
78 |
private boolean field_3_unicode_flag; // it is not undocumented - it is unicode flag |
78 |
private String field_4_formatstring; |
79 |
private String field_4_formatstring; |
Lines 121-126
Link Here
|
121 |
field_1_index_code = LittleEndian.getShort(data, 0 + offset); |
122 |
field_1_index_code = LittleEndian.getShort(data, 0 + offset); |
122 |
// field_2_formatstring_len = data[ 2 + offset ]; |
123 |
// field_2_formatstring_len = data[ 2 + offset ]; |
123 |
field_3_unicode_len = LittleEndian.getShort( data, 2 + offset ); |
124 |
field_3_unicode_len = LittleEndian.getShort( data, 2 + offset ); |
|
|
125 |
field_2_formatstring_len = field_3_unicode_len; |
124 |
field_3_unicode_flag = ( data[ 4 + offset ] & (byte)0x01 ) != 0; |
126 |
field_3_unicode_flag = ( data[ 4 + offset ] & (byte)0x01 ) != 0; |
125 |
|
127 |
|
126 |
|
128 |
|
Lines 156-161
Link Here
|
156 |
public void setFormatStringLength(byte len) |
158 |
public void setFormatStringLength(byte len) |
157 |
{ |
159 |
{ |
158 |
field_2_formatstring_len = len; |
160 |
field_2_formatstring_len = len; |
|
|
161 |
field_3_unicode_len = len; |
162 |
} |
163 |
|
164 |
/** |
165 |
* set whether the string is unicode |
166 |
* |
167 |
* @param unicode flag for whether string is unicode |
168 |
*/ |
169 |
|
170 |
public void setUnicodeFlag(boolean unicode) { |
171 |
field_3_unicode_flag = unicode; |
159 |
} |
172 |
} |
160 |
|
173 |
|
161 |
/** |
174 |
/** |
Lines 189-198
Link Here
|
189 |
* @see #getFormatString() |
202 |
* @see #getFormatString() |
190 |
*/ |
203 |
*/ |
191 |
|
204 |
|
192 |
public byte getFormatStringLength() |
205 |
public short getFormatStringLength() |
193 |
{ |
206 |
{ |
194 |
return field_2_formatstring_len; |
207 |
return field_3_unicode_flag ? field_3_unicode_len : field_2_formatstring_len; |
195 |
} |
208 |
} |
|
|
209 |
|
210 |
/** |
211 |
* get whether the string is unicode |
212 |
* |
213 |
* @return flag for whether string is unicode |
214 |
*/ |
215 |
|
216 |
public boolean getUnicodeFlag() { |
217 |
return field_3_unicode_flag; |
218 |
} |
196 |
|
219 |
|
197 |
/** |
220 |
/** |
198 |
* get the format string |
221 |
* get the format string |