1    
2    /* ====================================================================
3     * The Apache Software License, Version 1.1
4     *
5     * Copyright (c) 2002 The Apache Software Foundation.  All rights
6     * reserved.
7     *
8     * Redistribution and use in source and binary forms, with or without
9     * modification, are permitted provided that the following conditions
10    * are met:
11    *
12    * 1. Redistributions of source code must retain the above copyright
13    *    notice, this list of conditions and the following disclaimer.
14    *
15    * 2. Redistributions in binary form must reproduce the above copyright
16    *    notice, this list of conditions and the following disclaimer in
17    *    the documentation and/or other materials provided with the
18    *    distribution.
19    *
20    * 3. The end-user documentation included with the redistribution,
21    *    if any, must include the following acknowledgment:
22    *       "This product includes software developed by the
23    *        Apache Software Foundation (http://www.apache.org/)."
24    *    Alternately, this acknowledgment may appear in the software itself,
25    *    if and wherever such third-party acknowledgments normally appear.
26    *
27    * 4. The names "Apache" and "Apache Software Foundation" and
28    *    "Apache POI" must not be used to endorse or promote products
29    *    derived from this software without prior written permission. For
30    *    written permission, please contact apache@apache.org.
31    *
32    * 5. Products derived from this software may not be called "Apache",
33    *    "Apache POI", nor may "Apache" appear in their name, without
34    *    prior written permission of the Apache Software Foundation.
35    *
36    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39    * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40    * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42    * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43    * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44    * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45    * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46    * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47    * SUCH DAMAGE.
48    * ====================================================================
49    *
50    * This software consists of voluntary contributions made by many
51    * individuals on behalf of the Apache Software Foundation.  For more
52    * information on the Apache Software Foundation, please see
53    * <http://www.apache.org/>.
54    */
55   
56   package org.apache.poi.hssf.record;
57   
58   import org.apache.poi.util.BitField;
59   import org.apache.poi.util.LittleEndian;
60   
61   /**
62    * Title:        Extended Format Record
63    * Description:  Probably one of the more complex records.  There are two breeds:
64    *               Style and Cell.
65    *<P>
66    *               It should be noted that fields in the extended format record are
67    *               somewhat arbitrary.  Almost all of the fields are bit-level, but
68    *               we name them as best as possible by functional group.  In some
69    *               places this is better than others.
70    *<P>
71    *
72    * REFERENCE:  PG 426 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P>
73    * @author Andrew C. Oliver (acoliver at apache dot org)
74    * @version 2.0-pre
75    */
76   
77   public class ExtendedFormatRecord
78       extends Record
79   {
80       public final static short     sid                 = 0xE0;
81   
82       // null constant
83       public final static short     NULL                = (short)0xfff0;
84   
85       // xf type
86       public final static short     XF_STYLE            = 1;
87       public final static short     XF_CELL             = 0;
88   
89       // borders
90       public final static short     NONE                = 0x0;
91       public final static short     THIN                = 0x1;
92       public final static short     MEDIUM              = 0x2;
93       public final static short     DASHED              = 0x3;
94       public final static short     DOTTED              = 0x4;
95       public final static short     THICK               = 0x5;
96       public final static short     DOUBLE              = 0x6;
97       public final static short     HAIR                = 0x7;
98       public final static short     MEDIUM_DASHED       = 0x8;
99       public final static short     DASH_DOT            = 0x9;
100      public final static short     MEDIUM_DASH_DOT     = 0xA;
101      public final static short     DASH_DOT_DOT        = 0xB;
102      public final static short     MEDIUM_DASH_DOT_DOT = 0xC;
103      public final static short     SLANTED_DASH_DOT    = 0xD;
104  
105      // alignment
106      public final static short     GENERAL             = 0x0;
107      public final static short     LEFT                = 0x1;
108      public final static short     CENTER              = 0x2;
109      public final static short     RIGHT               = 0x3;
110      public final static short     FILL                = 0x4;
111      public final static short     JUSTIFY             = 0x5;
112      public final static short     CENTER_SELECTION    = 0x6;
113  
114      // vertical alignment
115      public final static short     VERTICAL_TOP        = 0x0;
116      public final static short     VERTICAL_CENTER     = 0x1;
117      public final static short     VERTICAL_BOTTOM     = 0x2;
118      public final static short     VERTICAL_JUSTIFY    = 0x3;
119  
120      // fill
121      public final static short     NO_FILL             = 0  ;
122      public final static short     SOLID_FILL          = 1  ;
123      public final static short     FINE_DOTS           = 2  ;
124      public final static short     ALT_BARS            = 3  ;
125      public final static short     SPARSE_DOTS         = 4  ;
126      public final static short     THICK_HORZ_BANDS    = 5  ;
127      public final static short     THICK_VERT_BANDS    = 6  ;
128      public final static short     THICK_BACKWARD_DIAG = 7  ;
129      public final static short     THICK_FORWARD_DIAG  = 8  ;
130      public final static short     BIG_SPOTS           = 9  ;
131      public final static short     BRICKS              = 10 ;
132      public final static short     THIN_HORZ_BANDS     = 11 ;
133      public final static short     THIN_VERT_BANDS     = 12 ;
134      public final static short     THIN_BACKWARD_DIAG  = 13 ;
135      public final static short     THIN_FORWARD_DIAG   = 14 ;
136      public final static short     SQUARES             = 15 ;
137      public final static short     DIAMONDS            = 16 ;
138  
139      // fields in BOTH style and Cell XF records
140      private short                 field_1_font_index;             // not bit-mapped
141      private short                 field_2_format_index;           // not bit-mapped
142  
143      // field_3_cell_options bit map
144      static final private BitField _locked       = new BitField(0x0001);
145      static final private BitField _hidden       = new BitField(0x0002);
146      static final private BitField _xf_type      = new BitField(0x0004);
147      static final private BitField _123_prefix   = new BitField(0x0008);
148      static final private BitField _parent_index = new BitField(0xFFF0);
149      private short                 field_3_cell_options;
150  
151      // field_4_alignment_options bit map
152      static final private BitField _alignment          = new BitField(0x0007);
153      static final private BitField _wrap_text          = new BitField(0x0008);
154      static final private BitField _vertical_alignment = new BitField(0x0070);
155      static final private BitField _justify_last       = new BitField(0x0080);
156      static final private BitField _rotation           = new BitField(0xFF00);
157      private short                 field_4_alignment_options;
158  
159      // field_5_indention_options
160      static final private BitField _indent                         =
161          new BitField(0x000F);
162      static final private BitField _shrink_to_fit                  =
163          new BitField(0x0010);
164      static final private BitField _merge_cells                    =
165          new BitField(0x0020);
166      static final private BitField _reading_order                  =
167          new BitField(0x00C0);
168  
169      // apparently bits 8 and 9 are unused
170      static final private BitField _indent_not_parent_format       =
171          new BitField(0x0400);
172      static final private BitField _indent_not_parent_font         =
173          new BitField(0x0800);
174      static final private BitField _indent_not_parent_alignment    =
175          new BitField(0x1000);
176      static final private BitField _indent_not_parent_border       =
177          new BitField(0x2000);
178      static final private BitField _indent_not_parent_pattern      =
179          new BitField(0x4000);
180      static final private BitField _indent_not_parent_cell_options =
181          new BitField(0x8000);
182      private short                 field_5_indention_options;
183  
184      // field_6_border_options bit map
185      static final private BitField _border_left   = new BitField(0x000F);
186      static final private BitField _border_right  = new BitField(0x00F0);
187      static final private BitField _border_top    = new BitField(0x0F00);
188      static final private BitField _border_bottom = new BitField(0xF000);
189      private short                 field_6_border_options;
190  
191      // all three of the following attributes are palette options
192      // field_7_palette_options bit map
193      static final private BitField _left_border_palette_idx  =
194          new BitField(0x007F);
195      static final private BitField _right_border_palette_idx =
196          new BitField(0x3F80);
197      static final private BitField _diag                     =
198          new BitField(0xC000);
199      private short                 field_7_palette_options;
200  
201      // field_8_adtl_palette_options bit map
202      static final private BitField _top_border_palette_idx    =
203          new BitField(0x0000007F);
204      static final private BitField _bottom_border_palette_idx =
205          new BitField(0x00003F80);
206      static final private BitField _adtl_diag                 =
207          new BitField(0x001fc000);
208      static final private BitField _adtl_diag_line_style      =
209          new BitField(0x01e00000);
210  
211      // apparently bit 25 is unused
212      static final private BitField _adtl_fill_pattern         =
213          new BitField(0xfc000000);
214      private int                   field_8_adtl_palette_options;   // additional to avoid 2
215  
216      // field_9_fill_palette_options bit map
217      static final private BitField _fill_foreground = new BitField(0x007F);
218      static final private BitField _fill_background = new BitField(0x3f80);
219  
220      // apparently bits 15 and 14 are unused
221      private short                 field_9_fill_palette_options;
222  
223      /**
224       * Constructor ExtendedFormatRecord
225       *
226       *
227       */
228  
229      public ExtendedFormatRecord()
230      {
231      }
232  
233      /**
234       * Constructs an ExtendedFormat record and sets its fields appropriately.
235       *
236       * @param id     id must be 0xE0 or an exception will be throw upon validation
237       * @param size  the size of the data area of the record
238       * @param data  data of the record (should not contain sid/len)
239       */
240  
241      public ExtendedFormatRecord(short id, short size, byte [] data)
242      {
243          super(id, size, data);
244      }
245  
246      /**
247       * Constructs an ExtendedFormat record and sets its fields appropriately.
248       *
249       * @param id     id must be 0xE0 or an exception will be throw upon validation
250       * @param size  the size of the data area of the record
251       * @param data  data of the record (should not contain sid/len)
252       * @param offset of the record's data
253       */
254      public ExtendedFormatRecord(short id, short size, byte [] data,
255                                  int offset)
256      {
257          super(id, size, data, offset);
258      }
259  
260      protected void validateSid(short id)
261      {
262          if (id != sid)
263          {
264              throw new RecordFormatException("NOT A EXTENDED FORMAT RECORD");
265          }
266      }
267  
268      protected void fillFields(byte [] data, short size, int offset)
269      {
270          field_1_font_index           = LittleEndian.getShort(data,
271                  0 + offset);
272          field_2_format_index         = LittleEndian.getShort(data,
273                  2 + offset);
274          field_3_cell_options         = LittleEndian.getShort(data,
275                  4 + offset);
276          field_4_alignment_options    = LittleEndian.getShort(data,
277                  6 + offset);
278          field_5_indention_options    = LittleEndian.getShort(data,
279                  8 + offset);
280          field_6_border_options       = LittleEndian.getShort(data,
281                  10 + offset);
282          field_7_palette_options      = LittleEndian.getShort(data,
283                  12 + offset);
284          field_8_adtl_palette_options = LittleEndian.getInt(data, 14 + offset);
285          field_9_fill_palette_options = LittleEndian.getShort(data,
286                  18 + offset);
287      }
288  
289      /**
290       * set the index to the FONT record (which font to use 0 based)
291       *
292       *
293       * @param index to the font
294       * @see org.apache.poi.hssf.record.FontRecord
295       */
296  
297      public void setFontIndex(short index)
298      {
299          field_1_font_index = index;
300      }
301  
302      /**
303       *  set the index to the Format record (which FORMAT to use 0-based)
304       *
305       *
306       * @param index to the format record
307       * @see org.apache.poi.hssf.record.FormatRecord
308       */
309  
310      public void setFormatIndex(short index)
311      {
312          field_2_format_index = index;
313      }
314  
315      /**
316       * sets the options bitmask - you can also use corresponding option bit setters
317       * (see other methods that reference this one)
318       *
319       *
320       * @param options bitmask to set
321       *
322       */
323  
324      public void setCellOptions(short options)
325      {
326          field_3_cell_options = options;
327      }
328  
329      // These are the bit fields in cell options
330  
331      /**
332       * set whether the cell is locked or not
333       *
334       *
335       * @param locked - if the cell is locked
336       * @see #setCellOptions(short)
337       */
338  
339      public void setLocked(boolean locked)
340      {
341          field_3_cell_options = _locked.setShortBoolean(field_3_cell_options,
342                  locked);
343      }
344  
345      /**
346       * set whether the cell is hidden or not
347       *
348       *
349       * @param hidden - if the cell is hidden
350       * @see #setCellOptions(short)
351       */
352  
353      public void setHidden(boolean hidden)
354      {
355          field_3_cell_options = _hidden.setShortBoolean(field_3_cell_options,
356                  hidden);
357      }
358  
359      /**
360       * set whether the cell is a cell or style XFRecord
361       *
362       *
363       * @param type - cell or style (0/1)
364       * @see #XF_STYLE
365       * @see #XF_CELL
366       * @see #setCellOptions(short)
367       */
368  
369      public void setXFType(short type)
370      {
371          field_3_cell_options = _xf_type.setShortValue(field_3_cell_options,
372                  type);
373      }
374  
375      /**
376       * set some old holdover from lotus 123.  Who cares, its all over for Lotus.
377       * RIP Lotus.
378       *
379       * @param prefix - the lotus thing to set.
380       * @see #setCellOptions(short)
381       */
382  
383      public void set123Prefix(boolean prefix)
384      {
385          field_3_cell_options =
386              _123_prefix.setShortBoolean(field_3_cell_options, prefix);
387      }
388  
389      // present in both but NULL except in cell records
390  
391      /**
392       * for cell XF types this is the parent style (usually 0/normal).  For
393       * style this should be NULL.
394       *
395       * @param parent  index of parent XF
396       * @see #NULL
397       * @see #setCellOptions(short)
398       */
399  
400      public void setParentIndex(short parent)
401      {
402          field_3_cell_options =
403              _parent_index.setShortValue(field_3_cell_options, parent);
404      }
405  
406      // end bitfields in cell options
407  
408      /**
409       * set the alignment options bitmask.  See corresponding bitsetter methods
410       * that reference this one.
411       *
412       *
413       * @param options     - the bitmask to set
414       */
415  
416      public void setAlignmentOptions(short options)
417      {
418          field_4_alignment_options = options;
419      }
420  
421      /**
422       * set the horizontal alignment of the cell.
423       *
424       *
425       * @param align - how to align the cell (see constants)
426       * @see #GENERAL
427       * @see #LEFT
428       * @see #CENTER
429       * @see #RIGHT
430       * @see #FILL
431       * @see #JUSTIFY
432       * @see #CENTER_SELECTION
433       * @see #setAlignmentOptions(short)
434       */
435  
436      public void setAlignment(short align)
437      {
438          field_4_alignment_options =
439              _alignment.setShortValue(field_4_alignment_options, align);
440      }
441  
442      /**
443       * set whether to wrap the text in the cell
444       *
445       *
446       * @param wrapped - whether or not to wrap the cell text
447       * @see #setAlignmentOptions(short)
448       */
449  
450      public void setWrapText(boolean wrapped)
451      {
452          field_4_alignment_options =
453              _wrap_text.setShortBoolean(field_4_alignment_options, wrapped);
454      }
455  
456      /**
457       * set the vertical alignment of text in the cell
458       *
459       *
460       * @param align     where to align the text
461       * @see #VERTICAL_TOP
462       * @see #VERTICAL_CENTER
463       * @see #VERTICAL_BOTTOM
464       * @see #VERTICAL_JUSTIFY
465       *
466       * @see #setAlignmentOptions(short)
467       */
468  
469      public void setVerticalAlignment(short align)
470      {
471          field_4_alignment_options =
472              _vertical_alignment.setShortValue(field_4_alignment_options,
473                                                align);
474      }
475  
476      /**
477       * Dunno.  Docs just say this is for far east versions..  (I'm guessing it
478       * justifies for right-to-left read languages)
479       *
480       *
481       * @param justify
482       * @see #setAlignmentOptions(short)
483       */
484  
485      public void setJustifyLast(short justify)
486      {   // for far east languages supported only for format always 0 for US
487          field_4_alignment_options =
488              _justify_last.setShortValue(field_4_alignment_options, justify);
489      }
490  
491      /**
492       * set the degree of rotation.  (I've not actually seen this used anywhere)
493       *
494       *
495       * @param rotation the degree of rotation
496       * @see #setAlignmentOptions(short)
497       */
498  
499      public void setRotation(short rotation)
500      {
501          field_4_alignment_options =
502              _rotation.setShortValue(field_4_alignment_options, rotation);
503      }
504  
505      /**
506       * set the indent options bitmask  (see corresponding bitmask setters that reference
507       * this field)
508       *
509       *
510       * @param options bitmask to set.
511       *
512       */
513  
514      public void setIndentionOptions(short options)
515      {
516          field_5_indention_options = options;
517      }
518  
519      // set bitfields for indention options
520  
521      /**
522       * set indention (not sure of the units, think its spaces)
523       *
524       * @param indent - how far to indent the cell
525       * @see #setIndentionOptions(short)
526       */
527  
528      public void setIndent(short indent)
529      {
530          field_5_indention_options =
531              _indent.setShortValue(field_5_indention_options, indent);
532      }
533  
534      /**
535       * set whether to shrink the text to fit
536       *
537       *
538       * @param shrink - shrink to fit or not
539       * @see #setIndentionOptions(short)
540       */
541  
542      public void setShrinkToFit(boolean shrink)
543      {
544          field_5_indention_options =
545              _shrink_to_fit.setShortBoolean(field_5_indention_options, shrink);
546      }
547  
548      /**
549       * set whether to merge cells
550       *
551       *
552       * @param merge - merge cells or not
553       * @see #setIndentionOptions(short)
554       */
555  
556      public void setMergeCells(boolean merge)
557      {
558          field_5_indention_options =
559              _merge_cells.setShortBoolean(field_5_indention_options, merge);
560      }
561  
562      /**
563       * set the reading order for far east versions (0 - Context, 1 - Left to right,
564       * 2 - right to left) - We could use some help with support for the far east.
565       *
566       * @param order - the reading order (0,1,2)
567       * @see #setIndentionOptions(short)
568       */
569  
570      public void setReadingOrder(short order)
571      {   // only for far east  always 0 in US
572          field_5_indention_options =
573              _reading_order.setShortValue(field_5_indention_options, order);
574      }
575  
576      /**
577       * set whether or not to use the format in this XF instead of the parent XF.
578       *
579       *
580       * @param parent - true if this XF has a different format value than its parent,
581       *                 false otherwise.
582       * @see #setIndentionOptions(short)
583       */
584  
585      public void setIndentNotParentFormat(boolean parent)
586      {
587          field_5_indention_options =
588              _indent_not_parent_format
589                  .setShortBoolean(field_5_indention_options, parent);
590      }
591  
592      /**
593       * set whether or not to use the font in this XF instead of the parent XF.
594       *
595       *
596       * @param font   - true if this XF has a different font value than its parent,
597       *                 false otherwise.
598       * @see #setIndentionOptions(short)
599       */
600  
601      public void setIndentNotParentFont(boolean font)
602      {
603          field_5_indention_options =
604              _indent_not_parent_font.setShortBoolean(field_5_indention_options,
605                                                      font);
606      }
607  
608      /**
609       * set whether or not to use the alignment in this XF instead of the parent XF.
610       *
611       *
612       * @param alignment true if this XF has a different alignment value than its parent,
613       *                  false otherwise.
614       * @see #setIndentionOptions(short)
615       */
616  
617      public void setIndentNotParentAlignment(boolean alignment)
618      {
619          field_5_indention_options =
620              _indent_not_parent_alignment
621                  .setShortBoolean(field_5_indention_options, alignment);
622      }
623  
624      /**
625       * set whether or not to use the border in this XF instead of the parent XF.
626       *
627       *
628       * @param border - true if this XF has a different border value than its parent,
629       *                 false otherwise.
630       * @see #setIndentionOptions(short)
631       */
632  
633      public void setIndentNotParentBorder(boolean border)
634      {
635          field_5_indention_options =
636              _indent_not_parent_border
637                  .setShortBoolean(field_5_indention_options, border);
638      }
639  
640      /**
641       * set whether or not to use the pattern in this XF instead of the parent XF.
642       * (foregrount/background)
643       *
644       * @param pattern- true if this XF has a different pattern value than its parent,
645       *                 false otherwise.
646       * @see #setIndentionOptions(short)
647       */
648  
649      public void setIndentNotParentPattern(boolean pattern)
650      {
651          field_5_indention_options =
652              _indent_not_parent_pattern
653                  .setShortBoolean(field_5_indention_options, pattern);
654      }
655  
656      /**
657       * set whether or not to use the locking/hidden in this XF instead of the parent XF.
658       *
659       *
660       * @param options- true if this XF has a different locking or hidden value than its parent,
661       *                 false otherwise.
662       * @see #setIndentionOptions(short)
663       */
664  
665      public void setIndentNotParentCellOptions(boolean options)
666      {
667          field_5_indention_options =
668              _indent_not_parent_cell_options
669                  .setShortBoolean(field_5_indention_options, options);
670      }
671  
672      // end indention options bitmask sets
673  
674      /**
675       * set the border options bitmask (see the corresponding bitsetter methods
676       * that reference back to this one)
677       *
678       * @param options - the bit mask to set
679       *
680       */
681  
682      public void setBorderOptions(short options)
683      {
684          field_6_border_options = options;
685      }
686  
687      // border options bitfields
688  
689      /**
690       * set the borderline style for the left border
691       *
692       *
693       * @param border - type of border for the left side of the cell
694       * @see     #NONE
695       * @see     #THIN
696       * @see     #MEDIUM
697       * @see     #DASHED
698       * @see     #DOTTED
699       * @see     #THICK
700       * @see     #DOUBLE
701       * @see     #HAIR
702       * @see     #MEDIUM_DASHED
703       * @see     #DASH_DOT
704       * @see     #MEDIUM_DASH_DOT
705       * @see     #DASH_DOT_DOT
706       * @see     #MEDIUM_DASH_DOT_DOT
707       * @see     #SLANTED_DASH_DOT
708       * @see #setBorderOptions(short)
709       */
710  
711      public void setBorderLeft(short border)
712      {
713          field_6_border_options =
714              _border_left.setShortValue(field_6_border_options, border);
715      }
716  
717      /**
718       * set the border line style for the right border
719       *
720       *
721       * @param border - type of border for the right side of the cell
722       * @see     #NONE
723       * @see     #THIN
724       * @see     #MEDIUM
725       * @see     #DASHED
726       * @see     #DOTTED
727       * @see     #THICK
728       * @see     #DOUBLE
729       * @see     #HAIR
730       * @see     #MEDIUM_DASHED
731       * @see     #DASH_DOT
732       * @see     #MEDIUM_DASH_DOT
733       * @see     #DASH_DOT_DOT
734       * @see     #MEDIUM_DASH_DOT_DOT
735       * @see     #SLANTED_DASH_DOT
736       * @see #setBorderOptions(short)
737       */
738  
739      public void setBorderRight(short border)
740      {
741          field_6_border_options =
742              _border_right.setShortValue(field_6_border_options, border);
743      }
744  
745      /**
746       * set the border line style for the top border
747       *
748       *
749       * @param border - type of border for the top of the cell
750       * @see     #NONE
751       * @see     #THIN
752       * @see     #MEDIUM
753       * @see     #DASHED
754       * @see     #DOTTED
755       * @see     #THICK
756       * @see     #DOUBLE
757       * @see     #HAIR
758       * @see     #MEDIUM_DASHED
759       * @see     #DASH_DOT
760       * @see     #MEDIUM_DASH_DOT
761       * @see     #DASH_DOT_DOT
762       * @see     #MEDIUM_DASH_DOT_DOT
763       * @see     #SLANTED_DASH_DOT
764       * @see #setBorderOptions(short)
765       */
766  
767      public void setBorderTop(short border)
768      {
769          field_6_border_options =
770              _border_top.setShortValue(field_6_border_options, border);
771      }
772  
773      /**
774       * set the border line style for the bottom border
775       *
776       *
777       * @param border - type of border for the bottom of the cell
778       * @see     #NONE
779       * @see     #THIN
780       * @see     #MEDIUM
781       * @see     #DASHED
782       * @see     #DOTTED
783       * @see     #THICK
784       * @see     #DOUBLE
785       * @see     #HAIR
786       * @see     #MEDIUM_DASHED
787       * @see     #DASH_DOT
788       * @see     #MEDIUM_DASH_DOT
789       * @see     #DASH_DOT_DOT
790       * @see     #MEDIUM_DASH_DOT_DOT
791       * @see     #SLANTED_DASH_DOT
792       * @see #setBorderOptions(short)
793       */
794  
795      public void setBorderBottom(short border)
796      {
797          field_6_border_options =
798              _border_bottom.setShortValue(field_6_border_options, border);
799      }
800  
801      // end border option bitfields
802  
803      /**
804       * set the palette options bitmask (see the individual bitsetter methods that
805       * reference this one)
806       *
807       *
808       * @param options - the bitmask to set
809       *
810       */
811  
812      public void setPaletteOptions(short options)
813      {
814          field_7_palette_options = options;
815      }
816  
817      // bitfields for palette options
818  
819      /**
820       * set the palette index for the left border color
821       *
822       *
823       * @param border - palette index
824       * @see #setPaletteOptions(short)
825       */
826  
827      public void setLeftBorderPaletteIdx(short border)
828      {
829          field_7_palette_options =
830              _left_border_palette_idx.setShortValue(field_7_palette_options,
831                                                     border);
832      }
833  
834      /**
835       * set the palette index for the right border color
836       *
837       *
838       * @param border - palette index
839       * @see #setPaletteOptions(short)
840       */
841  
842      public void setRightBorderPaletteIdx(short border)
843      {
844          field_7_palette_options =
845              _right_border_palette_idx.setShortValue(field_7_palette_options,
846                                                      border);
847      }
848  
849      // i've no idea.. possible values are 1 for down, 2 for up and 3 for both...0 for none..
850      // maybe a diagnal line?
851  
852      /**
853       * Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..
854       *
855       *
856       * @param diag - set whatever it is that this is.
857       * @see #setPaletteOptions(short)
858       */
859  
860      public void setDiag(short diag)
861      {
862          field_7_palette_options = _diag.setShortValue(field_7_palette_options,
863                  diag);
864      }
865  
866      // end of palette options
867  
868      /**
869       * set the additional palette options bitmask (see individual bitsetter methods
870       * that reference this method)
871       *
872       *
873       * @param options - bitmask to set
874       *
875       */
876  
877      public void setAdtlPaletteOptions(short options)
878      {
879          field_8_adtl_palette_options = options;
880      }
881  
882      // bitfields for additional palette options
883  
884      /**
885       * set the palette index for the top border
886       *
887       *
888       * @param border - palette index
889       * @see #setAdtlPaletteOptions(short)
890       */
891  
892      public void setTopBorderPaletteIdx(short border)
893      {
894          field_8_adtl_palette_options =
895              _top_border_palette_idx.setValue(field_8_adtl_palette_options,
896                                               border);
897      }
898  
899      /**
900       * set the palette index for the bottom border
901       *
902       *
903       * @param border - palette index
904       * @see #setAdtlPaletteOptions(short)
905       */
906  
907      public void setBottomBorderPaletteIdx(short border)
908      {
909          field_8_adtl_palette_options =
910              _bottom_border_palette_idx.setValue(field_8_adtl_palette_options,
911                                                  border);
912      }
913  
914      /**
915       * set for diagonal borders?  No idea (its a palette color for the other function
916       * we didn't know what was?)
917       *
918       *
919       * @param diag - the palette index?
920       * @see #setAdtlPaletteOptions(short)
921       */
922  
923      public void setAdtlDiag(short diag)
924      {
925          field_8_adtl_palette_options =
926              _adtl_diag.setValue(field_8_adtl_palette_options, diag);
927      }
928  
929      /**
930       * set the diagonal border line style?  Who the heck ever heard of a diagonal border?
931       *
932       *
933       * @param diag - the line style
934       * @see     #NONE
935       * @see     #THIN
936       * @see     #MEDIUM
937       * @see     #DASHED
938       * @see     #DOTTED
939       * @see     #THICK
940       * @see     #DOUBLE
941       * @see     #HAIR
942       * @see     #MEDIUM_DASHED
943       * @see     #DASH_DOT
944       * @see     #MEDIUM_DASH_DOT
945       * @see     #DASH_DOT_DOT
946       * @see     #MEDIUM_DASH_DOT_DOT
947       * @see     #SLANTED_DASH_DOT
948       * @see #setAdtlPaletteOptions(short)
949       */
950  
951      public void setAdtlDiagLineStyle(short diag)
952      {
953          field_8_adtl_palette_options =
954              _adtl_diag_line_style.setValue(field_8_adtl_palette_options,
955                                             diag);
956      }
957  
958      /**
959       * set the fill pattern
960       *
961       * @see #NO_FILL
962       * @see #SOLID_FILL
963       * @see #FINE_DOTS
964       * @see #ALT_BARS
965       * @see #SPARSE_DOTS
966       * @see #THICK_HORZ_BANDS
967       * @see #THICK_VERT_BANDS
968       * @see #THICK_BACKWARD_DIAG
969       * @see #THICK_FORWARD_DIAG
970       * @see #BIG_SPOTS
971       * @see #BRICKS
972       * @see #THIN_HORZ_BANDS
973       * @see #THIN_VERT_BANDS
974       * @see #THIN_BACKWARD_DIAG
975       * @see #THIN_FORWARD_DIAG
976       * @see #SQUARES
977       * @see #DIAMONDS
978       *
979       * @param fill - fill pattern??
980       * @see #setAdtlPaletteOptions(short)
981       */
982  
983      public void setAdtlFillPattern(short fill)
984      {
985          field_8_adtl_palette_options =
986              _adtl_fill_pattern.setValue(field_8_adtl_palette_options, fill);
987      }
988  
989      // end bitfields for additional palette options
990  
991      /**
992       * set the fill palette options bitmask (see
993       *
994       *
995       * @param options
996       *
997       */
998  
999      public void setFillPaletteOptions(short options)
1000     {
1001         field_9_fill_palette_options = options;
1002     }
1003 
1004     /**
1005      * set the foreground palette color index
1006      *
1007      *
1008      * @param color - palette index
1009      * @see #setFillPaletteOptions(short)
1010      */
1011 
1012     public void setFillForeground(short color)
1013     {
1014         field_9_fill_palette_options =
1015             _fill_foreground.setShortValue(field_9_fill_palette_options,
1016                                            color);
1017     }
1018 
1019     /**
1020      * set the background palette color index
1021      *
1022      *
1023      * @param color - palette index
1024      * @see #setFillPaletteOptions(short)
1025      */
1026 
1027     public void setFillBackground(short color)
1028     {
1029         field_9_fill_palette_options =
1030             _fill_background.setShortValue(field_9_fill_palette_options,
1031                                            color);
1032     }
1033 
1034     /**
1035      * get the index to the FONT record (which font to use 0 based)
1036      *
1037      *
1038      * @return index to the font
1039      * @see org.apache.poi.hssf.record.FontRecord
1040      */
1041 
1042     public short getFontIndex()
1043     {
1044         return field_1_font_index;
1045     }
1046 
1047     /**
1048      *  get the index to the Format record (which FORMAT to use 0-based)
1049      *
1050      *
1051      * @return index to the format record
1052      * @see org.apache.poi.hssf.record.FormatRecord
1053      */
1054 
1055     public short getFormatIndex()
1056     {
1057         return field_2_format_index;
1058     }
1059 
1060     /**
1061      * gets the options bitmask - you can also use corresponding option bit getters
1062      * (see other methods that reference this one)
1063      *
1064      *
1065      * @return options bitmask
1066      *
1067      */
1068 
1069     public short getCellOptions()
1070     {
1071         return field_3_cell_options;
1072     }
1073 
1074     // These are the bit fields in cell options
1075 
1076     /**
1077      * get whether the cell is locked or not
1078      *
1079      *
1080      * @return locked - if the cell is locked
1081      * @see #getCellOptions()
1082      */
1083 
1084     public boolean isLocked()
1085     {
1086         return _locked.isSet(field_3_cell_options);
1087     }
1088 
1089     /**
1090      * get whether the cell is hidden or not
1091      *
1092      *
1093      * @return hidden - if the cell is hidden
1094      * @see #getCellOptions()
1095      */
1096 
1097     public boolean isHidden()
1098     {
1099         return _hidden.isSet(field_3_cell_options);
1100     }
1101 
1102     /**
1103      * get whether the cell is a cell or style XFRecord
1104      *
1105      *
1106      * @return type - cell or style (0/1)
1107      * @see #XF_STYLE
1108      * @see #XF_CELL
1109      * @see #getCellOptions()
1110      */
1111 
1112     public short getXFType()
1113     {
1114         return _xf_type.getShortValue(field_3_cell_options);
1115     }
1116 
1117     /**
1118      * get some old holdover from lotus 123.  Who cares, its all over for Lotus.
1119      * RIP Lotus.
1120      *
1121      * @return prefix - the lotus thing
1122      * @see #getCellOptions()
1123      */
1124 
1125     public boolean get123Prefix()
1126     {
1127         return _123_prefix.isSet(field_3_cell_options);
1128     }
1129 
1130     /**
1131      * for cell XF types this is the parent style (usually 0/normal).  For
1132      * style this should be NULL.
1133      *
1134      * @return index of parent XF
1135      * @see #NULL
1136      * @see #getCellOptions()
1137      */
1138 
1139     public short getParentIndex()
1140     {
1141         return _parent_index.getShortValue(field_3_cell_options);
1142     }
1143 
1144     // end bitfields in cell options
1145 
1146     /**
1147      * get the alignment options bitmask.  See corresponding bitgetter methods
1148      * that reference this one.
1149      *
1150      *
1151      * @return options     - the bitmask
1152      */
1153 
1154     public short getAlignmentOptions()
1155     {
1156         return field_4_alignment_options;
1157     }
1158 
1159     // bitfields in alignment options
1160 
1161     /**
1162      * get the horizontal alignment of the cell.
1163      *
1164      *
1165      * @return align - how to align the cell (see constants)
1166      * @see #GENERAL
1167      * @see #LEFT
1168      * @see #CENTER
1169      * @see #RIGHT
1170      * @see #FILL
1171      * @see #JUSTIFY
1172      * @see #CENTER_SELECTION
1173      * @see #getAlignmentOptions()
1174      */
1175 
1176     public short getAlignment()
1177     {
1178         return _alignment.getShortValue(field_4_alignment_options);
1179     }
1180 
1181     /**
1182      * get whether to wrap the text in the cell
1183      *
1184      *
1185      * @return wrapped - whether or not to wrap the cell text
1186      * @see #getAlignmentOptions()
1187      */
1188 
1189     public boolean getWrapText()
1190     {
1191         return _wrap_text.isSet(field_4_alignment_options);
1192     }
1193 
1194     /**
1195      * get the vertical alignment of text in the cell
1196      *
1197      *
1198      * @return where to align the text
1199      * @see #VERTICAL_TOP
1200      * @see #VERTICAL_CENTER
1201      * @see #VERTICAL_BOTTOM
1202      * @see #VERTICAL_JUSTIFY
1203      *
1204      * @see #getAlignmentOptions()
1205      */
1206 
1207     public short getVerticalAlignment()
1208     {
1209         return _vertical_alignment.getShortValue(field_4_alignment_options);
1210     }
1211 
1212     /**
1213      * Dunno.  Docs just say this is for far east versions..  (I'm guessing it
1214      * justifies for right-to-left read languages)
1215      *
1216      *
1217      * @return justify
1218      * @see #getAlignmentOptions()
1219      */
1220 
1221     public short getJustifyLast()
1222     {   // for far east languages supported only for format always 0 for US
1223         return _justify_last.getShortValue(field_4_alignment_options);
1224     }
1225 
1226     /**
1227      * get the degree of rotation.  (I've not actually seen this used anywhere)
1228      *
1229      *
1230      * @return rotation - the degree of rotation
1231      * @see #getAlignmentOptions()
1232      */
1233 
1234     public short getRotation()
1235     {
1236         return _rotation.getShortValue(field_4_alignment_options);
1237     }
1238 
1239     // end alignment options bitfields
1240 
1241     /**
1242      * get the indent options bitmask  (see corresponding bit getters that reference
1243      * this field)
1244      *
1245      *
1246      * @return options bitmask
1247      *
1248      */
1249 
1250     public short getIndentionOptions()
1251     {
1252         return field_5_indention_options;
1253     }
1254 
1255     // bitfields for indention options
1256 
1257     /**
1258      * get indention (not sure of the units, think its spaces)
1259      *
1260      * @return indent - how far to indent the cell
1261      * @see #getIndentionOptions()
1262      */
1263 
1264     public short getIndent()
1265     {
1266         return _indent.getShortValue(field_5_indention_options);
1267     }
1268 
1269     /**
1270      * get whether to shrink the text to fit
1271      *
1272      *
1273      * @return shrink - shrink to fit or not
1274      * @see #getIndentionOptions()
1275      */
1276 
1277     public boolean getShrinkToFit()
1278     {
1279         return _shrink_to_fit.isSet(field_5_indention_options);
1280     }
1281 
1282     /**
1283      * get whether to merge cells
1284      *
1285      *
1286      * @return merge - merge cells or not
1287      * @see #getIndentionOptions()
1288      */
1289 
1290     public boolean getMergeCells()
1291     {
1292         return _merge_cells.isSet(field_5_indention_options);
1293     }
1294 
1295     /**
1296      * get the reading order for far east versions (0 - Context, 1 - Left to right,
1297      * 2 - right to left) - We could use some help with support for the far east.
1298      *
1299      * @return order - the reading order (0,1,2)
1300      * @see #getIndentionOptions()
1301      */
1302 
1303     public short getReadingOrder()
1304     {   // only for far east  always 0 in US
1305         return _reading_order.getShortValue(field_5_indention_options);
1306     }
1307 
1308     /**
1309      * get whether or not to use the format in this XF instead of the parent XF.
1310      *
1311      *
1312      * @return parent - true if this XF has a different format value than its parent,
1313      *                 false otherwise.
1314      * @see #getIndentionOptions()
1315      */
1316 
1317     public boolean isIndentNotParentFormat()
1318     {
1319         return _indent_not_parent_format.isSet(field_5_indention_options);
1320     }
1321 
1322     /**
1323      * get whether or not to use the font in this XF instead of the parent XF.
1324      *
1325      *
1326      * @return font   - true if this XF has a different font value than its parent,
1327      *                 false otherwise.
1328      * @see #getIndentionOptions()
1329      */
1330 
1331     public boolean isIndentNotParentFont()
1332     {
1333         return _indent_not_parent_font.isSet(field_5_indention_options);
1334     }
1335 
1336     /**
1337      * get whether or not to use the alignment in this XF instead of the parent XF.
1338      *
1339      *
1340      * @return alignment true if this XF has a different alignment value than its parent,
1341      *                  false otherwise.
1342      * @see #getIndentionOptions()
1343      */
1344 
1345     public boolean isIndentNotParentAlignment()
1346     {
1347         return _indent_not_parent_alignment.isSet(field_5_indention_options);
1348     }
1349 
1350     /**
1351      * get whether or not to use the border in this XF instead of the parent XF.
1352      *
1353      *
1354      * @return border - true if this XF has a different border value than its parent,
1355      *                 false otherwise.
1356      * @see #getIndentionOptions()
1357      */
1358 
1359     public boolean isIndentNotParentBorder()
1360     {
1361         return _indent_not_parent_border.isSet(field_5_indention_options);
1362     }
1363 
1364     /**
1365      * get whether or not to use the pattern in this XF instead of the parent XF.
1366      * (foregrount/background)
1367      *
1368      * @return pattern- true if this XF has a different pattern value than its parent,
1369      *                 false otherwise.
1370      * @see #getIndentionOptions()
1371      */
1372 
1373     public boolean isIndentNotParentPattern()
1374     {
1375         return _indent_not_parent_pattern.isSet(field_5_indention_options);
1376     }
1377 
1378     /**
1379      * get whether or not to use the locking/hidden in this XF instead of the parent XF.
1380      *
1381      *
1382      * @return options- true if this XF has a different locking or hidden value than its parent,
1383      *                 false otherwise.
1384      * @see #getIndentionOptions()
1385      */
1386 
1387     public boolean isIndentNotParentCellOptions()
1388     {
1389         return _indent_not_parent_cell_options
1390             .isSet(field_5_indention_options);
1391     }
1392 
1393     // end of bitfields for indention options
1394     // border options
1395 
1396     /**
1397      * get the border options bitmask (see the corresponding bit getter methods
1398      * that reference back to this one)
1399      *
1400      * @return options - the bit mask to set
1401      *
1402      */
1403 
1404     public short getBorderOptions()
1405     {
1406         return field_6_border_options;
1407     }
1408 
1409     // bitfields for border options
1410 
1411     /**
1412      * get the borderline style for the left border
1413      *
1414      *
1415      * @return border - type of border for the left side of the cell
1416      * @see     #NONE
1417      * @see     #THIN
1418      * @see     #MEDIUM
1419      * @see     #DASHED
1420      * @see     #DOTTED
1421      * @see     #THICK
1422      * @see     #DOUBLE
1423      * @see     #HAIR
1424      * @see     #MEDIUM_DASHED
1425      * @see     #DASH_DOT
1426      * @see     #MEDIUM_DASH_DOT
1427      * @see     #DASH_DOT_DOT
1428      * @see     #MEDIUM_DASH_DOT_DOT
1429      * @see     #SLANTED_DASH_DOT
1430      * @see #getBorderOptions()
1431      */
1432 
1433     public short getBorderLeft()
1434     {
1435         return _border_left.getShortValue(field_6_border_options);
1436     }
1437 
1438     /**
1439      * get the borderline style for the right border
1440      *
1441      *
1442      * @return  border - type of border for the right side of the cell
1443      * @see     #NONE
1444      * @see     #THIN
1445      * @see     #MEDIUM
1446      * @see     #DASHED
1447      * @see     #DOTTED
1448      * @see     #THICK
1449      * @see     #DOUBLE
1450      * @see     #HAIR
1451      * @see     #MEDIUM_DASHED
1452      * @see     #DASH_DOT
1453      * @see     #MEDIUM_DASH_DOT
1454      * @see     #DASH_DOT_DOT
1455      * @see     #MEDIUM_DASH_DOT_DOT
1456      * @see     #SLANTED_DASH_DOT
1457      * @see #getBorderOptions()
1458      */
1459 
1460     public short getBorderRight()
1461     {
1462         return _border_right.getShortValue(field_6_border_options);
1463     }
1464 
1465     /**
1466      * get the borderline style for the top border
1467      *
1468      *
1469      * @return border - type of border for the top of the cell
1470      * @see     #NONE
1471      * @see     #THIN
1472      * @see     #MEDIUM
1473      * @see     #DASHED
1474      * @see     #DOTTED
1475      * @see     #THICK
1476      * @see     #DOUBLE
1477      * @see     #HAIR
1478      * @see     #MEDIUM_DASHED
1479      * @see     #DASH_DOT
1480      * @see     #MEDIUM_DASH_DOT
1481      * @see     #DASH_DOT_DOT
1482      * @see     #MEDIUM_DASH_DOT_DOT
1483      * @see     #SLANTED_DASH_DOT
1484      * @see #getBorderOptions()
1485      */
1486 
1487     public short getBorderTop()
1488     {
1489         return _border_top.getShortValue(field_6_border_options);
1490     }
1491 
1492     /**
1493      * get the borderline style for the bottom border
1494      *
1495      *
1496      * @return border - type of border for the bottom of the cell
1497      * @see     #NONE
1498      * @see     #THIN
1499      * @see     #MEDIUM
1500      * @see     #DASHED
1501      * @see     #DOTTED
1502      * @see     #THICK
1503      * @see     #DOUBLE
1504      * @see     #HAIR
1505      * @see     #MEDIUM_DASHED
1506      * @see     #DASH_DOT
1507      * @see     #MEDIUM_DASH_DOT
1508      * @see     #DASH_DOT_DOT
1509      * @see     #MEDIUM_DASH_DOT_DOT
1510      * @see     #SLANTED_DASH_DOT
1511      * @see #getBorderOptions()
1512      */
1513 
1514     public short getBorderBottom()
1515     {
1516         return _border_bottom.getShortValue(field_6_border_options);
1517     }
1518 
1519     // record types -- palette options
1520 
1521     /**
1522      * get the palette options bitmask (see the individual bit getter methods that
1523      * reference this one)
1524      *
1525      *
1526      * @return options - the bitmask
1527      *
1528      */
1529 
1530     public short getPaletteOptions()
1531     {
1532         return field_7_palette_options;
1533     }
1534 
1535     // bitfields for palette options
1536 
1537     /**
1538      * get the palette index for the left border color
1539      *
1540      *
1541      * @return border - palette index
1542      * @see #getPaletteOptions()
1543      */
1544 
1545     public short getLeftBorderPaletteIdx()
1546     {
1547         return _left_border_palette_idx
1548             .getShortValue(field_7_palette_options);
1549     }
1550 
1551     /**
1552      * get the palette index for the right border color
1553      *
1554      *
1555      * @return border - palette index
1556      * @see #getPaletteOptions()
1557      */
1558 
1559     public short getRightBorderPaletteIdx()
1560     {
1561         return _right_border_palette_idx
1562             .getShortValue(field_7_palette_options);
1563     }
1564 
1565     // i've no idea.. possible values are 1 for down, 2 for up and 3 for both...0 for none..
1566     // maybe a diagnal line?
1567 
1568     /**
1569      * Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..
1570      *
1571      *
1572      * @return diag - whatever it is that this is.
1573      * @see #getPaletteOptions()
1574      */
1575 
1576     public short getDiag()
1577     {
1578         return _diag.getShortValue(field_7_palette_options);
1579     }
1580 
1581     // end of style palette options
1582     // additional palette options
1583 
1584     /**
1585      * get the additional palette options bitmask (see individual bit getter methods
1586      * that reference this method)
1587      *
1588      *
1589      * @return options - bitmask to set
1590      *
1591      */
1592 
1593     public int getAdtlPaletteOptions()
1594     {
1595         return field_8_adtl_palette_options;
1596     }
1597 
1598     // bitfields for additional palette options
1599 
1600     /**
1601      * get the palette index for the top border
1602      *
1603      *
1604      * @return border - palette index
1605      * @see #getAdtlPaletteOptions()
1606      */
1607 
1608     public short getTopBorderPaletteIdx()
1609     {
1610         return ( short ) _top_border_palette_idx
1611             .getValue(field_8_adtl_palette_options);
1612     }
1613 
1614     /**
1615      * get the palette index for the bottom border
1616      *
1617      *
1618      * @return border - palette index
1619      * @see #getAdtlPaletteOptions()
1620      */
1621 
1622     public short getBottomBorderPaletteIdx()
1623     {
1624         return ( short ) _bottom_border_palette_idx
1625             .getValue(field_8_adtl_palette_options);
1626     }
1627 
1628     /**
1629      * get for diagonal borders?  No idea (its a palette color for the other function
1630      * we didn't know what was?)
1631      *
1632      *
1633      * @return diag - the palette index?
1634      * @see #getAdtlPaletteOptions()
1635      */
1636 
1637     public short getAdtlDiag()
1638     {
1639         return ( short ) _adtl_diag.getValue(field_8_adtl_palette_options);
1640     }
1641 
1642     /**
1643      * get the diagonal border line style?  Who the heck ever heard of a diagonal border?
1644      *
1645      *
1646      * @return diag - the line style
1647      * @see     #NONE
1648      * @see     #THIN
1649      * @see     #MEDIUM
1650      * @see     #DASHED
1651      * @see     #DOTTED
1652      * @see     #THICK
1653      * @see     #DOUBLE
1654      * @see     #HAIR
1655      * @see     #MEDIUM_DASHED
1656      * @see     #DASH_DOT
1657      * @see     #MEDIUM_DASH_DOT
1658      * @see     #DASH_DOT_DOT
1659      * @see     #MEDIUM_DASH_DOT_DOT
1660      * @see     #SLANTED_DASH_DOT
1661      * @see #getAdtlPaletteOptions()
1662      */
1663 
1664     public short getAdtlDiagLineStyle()
1665     {
1666         return ( short ) _adtl_diag_line_style
1667             .getValue(field_8_adtl_palette_options);
1668     }
1669 
1670     /**
1671      * get the additional fill pattern
1672      *
1673      * @see #NO_FILL
1674      * @see #SOLID_FILL
1675      * @see #FINE_DOTS
1676      * @see #ALT_BARS
1677      * @see #SPARSE_DOTS
1678      * @see #THICK_HORZ_BANDS
1679      * @see #THICK_VERT_BANDS
1680      * @see #THICK_BACKWARD_DIAG
1681      * @see #THICK_FORWARD_DIAG
1682      * @see #BIG_SPOTS
1683      * @see #BRICKS
1684      * @see #THIN_HORZ_BANDS
1685      * @see #THIN_VERT_BANDS
1686      * @see #THIN_BACKWARD_DIAG
1687      * @see #THIN_FORWARD_DIAG
1688      * @see #SQUARES
1689      * @see #DIAMONDS
1690      *
1691      * @return fill - fill pattern??
1692      * @see #getAdtlPaletteOptions()
1693      */
1694 
1695     public short getAdtlFillPattern()
1696     {
1697         return ( short ) _adtl_fill_pattern
1698             .getValue(field_8_adtl_palette_options);
1699     }
1700 
1701     // end bitfields for additional palette options
1702     // fill palette options
1703 
1704     /**
1705      * get the fill palette options bitmask (see indivdual bit getters that
1706      * reference this method)
1707      *
1708      * @return options
1709      *
1710      */
1711 
1712     public short getFillPaletteOptions()
1713     {
1714         return field_9_fill_palette_options;
1715     }
1716 
1717     // bitfields for fill palette options
1718 
1719     /**
1720      * get the foreground palette color index
1721      *
1722      *
1723      * @return color - palette index
1724      * @see #getFillPaletteOptions()
1725      */
1726 
1727     public short getFillForeground()
1728     {
1729         return _fill_foreground.getShortValue(field_9_fill_palette_options);
1730     }
1731 
1732     /**
1733      * get the background palette color index
1734      *
1735      * @return color palette index
1736      * @see #getFillPaletteOptions()
1737      */
1738 
1739     public short getFillBackground()
1740     {
1741         return _fill_background.getShortValue(field_9_fill_palette_options);
1742     }
1743 
1744     public String toString()
1745     {
1746         StringBuffer buffer = new StringBuffer();
1747 
1748         buffer.append("[EXTENDEDFORMAT]\n");
1749         if (getXFType() == XF_STYLE)
1750         {
1751             buffer.append(" STYLE_RECORD_TYPE\n");
1752         }
1753         else if (getXFType() == XF_CELL)
1754         {
1755             buffer.append(" CELL_RECORD_TYPE\n");
1756         }
1757         buffer.append("    .fontindex       = ")
1758             .append(Integer.toHexString(getFontIndex())).append("\n");
1759         buffer.append("    .formatindex     = ")
1760             .append(Integer.toHexString(getFormatIndex())).append("\n");
1761         buffer.append("    .celloptions     = ")
1762             .append(Integer.toHexString(getCellOptions())).append("\n");
1763         buffer.append("          .islocked  = ").append(isLocked())
1764             .append("\n");
1765         buffer.append("          .ishidden  = ").append(isHidden())
1766             .append("\n");
1767         buffer.append("          .recordtype= ")
1768             .append(Integer.toHexString(getXFType())).append("\n");
1769         buffer.append("          .parentidx = ")
1770             .append(Integer.toHexString(getParentIndex())).append("\n");
1771         buffer.append("    .alignmentoptions= ")
1772             .append(Integer.toHexString(getAlignmentOptions())).append("\n");
1773         buffer.append("          .alignment = ").append(getAlignment())
1774             .append("\n");
1775         buffer.append("          .wraptext  = ").append(getWrapText())
1776             .append("\n");
1777         buffer.append("          .valignment= ")
1778             .append(Integer.toHexString(getVerticalAlignment())).append("\n");
1779         buffer.append("          .justlast  = ")
1780             .append(Integer.toHexString(getJustifyLast())).append("\n");
1781         buffer.append("          .rotation  = ")
1782             .append(Integer.toHexString(getRotation())).append("\n");
1783         buffer.append("    .indentionoptions= ")
1784             .append(Integer.toHexString(getIndentionOptions())).append("\n");
1785         buffer.append("          .indent    = ")
1786             .append(Integer.toHexString(getIndent())).append("\n");
1787         buffer.append("          .shrinktoft= ").append(getShrinkToFit())
1788             .append("\n");
1789         buffer.append("          .mergecells= ").append(getMergeCells())
1790             .append("\n");
1791         buffer.append("          .readngordr= ")
1792             .append(Integer.toHexString(getReadingOrder())).append("\n");
1793         buffer.append("          .formatflag= ")
1794             .append(isIndentNotParentFormat()).append("\n");
1795         buffer.append("          .fontflag  = ")
1796             .append(isIndentNotParentFont()).append("\n");
1797         buffer.append("          .prntalgnmt= ")
1798             .append(isIndentNotParentAlignment()).append("\n");
1799         buffer.append("          .borderflag= ")
1800             .append(isIndentNotParentBorder()).append("\n");
1801         buffer.append("          .paternflag= ")
1802             .append(isIndentNotParentPattern()).append("\n");
1803         buffer.append("          .celloption= ")
1804             .append(isIndentNotParentCellOptions()).append("\n");
1805         buffer.append("    .borderoptns     = ")
1806             .append(Integer.toHexString(getBorderOptions())).append("\n");
1807         buffer.append("          .lftln     = ")
1808             .append(Integer.toHexString(getBorderLeft())).append("\n");
1809         buffer.append("          .rgtln     = ")
1810             .append(Integer.toHexString(getBorderRight())).append("\n");
1811         buffer.append("          .topln     = ")
1812             .append(Integer.toHexString(getBorderTop())).append("\n");
1813         buffer.append("          .btmln     = ")
1814             .append(Integer.toHexString(getBorderBottom())).append("\n");
1815         buffer.append("    .paleteoptns     = ")
1816             .append(Integer.toHexString(getPaletteOptions())).append("\n");
1817         buffer.append("          .leftborder= ")
1818             .append(Integer.toHexString(getLeftBorderPaletteIdx()))
1819             .append("\n");
1820         buffer.append("          .rghtborder= ")
1821             .append(Integer.toHexString(getRightBorderPaletteIdx()))
1822             .append("\n");
1823         buffer.append("          .diag      = ")
1824             .append(Integer.toHexString(getDiag())).append("\n");
1825         buffer.append("    .paleteoptn2     = ")
1826             .append(Integer.toHexString(getAdtlPaletteOptions()))
1827             .append("\n");
1828         buffer.append("          .topborder = ")
1829             .append(Integer.toHexString(getTopBorderPaletteIdx()))
1830             .append("\n");
1831         buffer.append("          .botmborder= ")
1832             .append(Integer.toHexString(getBottomBorderPaletteIdx()))
1833             .append("\n");
1834         buffer.append("          .adtldiag  = ")
1835             .append(Integer.toHexString(getAdtlDiag())).append("\n");
1836         buffer.append("          .diaglnstyl= ")
1837             .append(Integer.toHexString(getAdtlDiagLineStyle())).append("\n");
1838         buffer.append("          .fillpattrn= ")
1839             .append(Integer.toHexString(getAdtlFillPattern())).append("\n");
1840         buffer.append("    .fillpaloptn     = ")
1841             .append(Integer.toHexString(getFillPaletteOptions()))
1842             .append("\n");
1843         buffer.append("          .foreground= ")
1844             .append(Integer.toHexString(getFillForeground())).append("\n");
1845         buffer.append("          .background= ")
1846             .append(Integer.toHexString(getFillBackground())).append("\n");
1847         buffer.append("[/EXTENDEDFORMAT]\n");
1848         return buffer.toString();
1849     }
1850 
1851     public int serialize(int offset, byte [] data)
1852     {
1853         LittleEndian.putShort(data, 0 + offset, sid);
1854         LittleEndian.putShort(data, 2 + offset,
1855                               ( short ) (20));   // 24 - 4(sid/len)
1856         LittleEndian.putShort(data, 4 + offset, getFontIndex());
1857         LittleEndian.putShort(data, 6 + offset, getFormatIndex());
1858         LittleEndian.putShort(data, 8 + offset, getCellOptions());
1859         LittleEndian.putShort(data, 10 + offset, getAlignmentOptions());
1860         LittleEndian.putShort(data, 12 + offset, getIndentionOptions());
1861         LittleEndian.putShort(data, 14 + offset, getBorderOptions());
1862         LittleEndian.putShort(data, 16 + offset, getPaletteOptions());
1863         LittleEndian.putInt(data, 18 + offset, getAdtlPaletteOptions());
1864         LittleEndian.putShort(data, 22 + offset, getFillPaletteOptions());
1865         return getRecordSize();
1866     }
1867 
1868     public int getRecordSize()
1869     {
1870         return 24;
1871     }
1872 
1873     public short getSid()
1874     {
1875         return this.sid;
1876     }
1877 }
1878 ??????????????????setShortBoolean??????????????????????????????????field_5_indention_options?????????????????????????????????????????????????????????????parent?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setIndentNotParentFont?????????field_5_indention_options?????????????_indent_not_parent_font?????????????????????????????????????setShortBoolean?????????????????????????????????????????????????????field_5_indention_options?????????????????????????????????????????????????????font?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setIndentNotParentAlignment?????????field_5_indention_options?????????????_indent_not_parent_alignment??????????????????setShortBoolean??????????????????????????????????field_5_indention_options?????????????????????????????????????????????????????????????alignment?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setIndentNotParentBorder?????????field_5_indention_options?????????????_indent_not_parent_border??????????????????setShortBoolean??????????????????????????????????field_5_indention_options?????????????????????????????????????????????????????????????border???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setIndentNotParentPattern?????????field_5_indention_options?????????????_indent_not_parent_pattern??????????????????setShortBoolean??????????????????????????????????field_5_indention_options?????????????????????????????????????????????????????????????pattern????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setIndentNotParentCellOptions?????????field_5_indention_options?????????????_indent_not_parent_cell_options??????????????????setShortBoolean??????????????????????????????????field_5_indention_options?????????????????????????????????????????????????????????????options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setBorderOptions?????????field_6_border_options??????????????????????????????????options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setBorderLeft?????????field_6_border_options?????????????_border_left??????????????????????????setShortValue????????????????????????????????????????field_6_border_options????????????????????????????????????????????????????????????????border???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setBorderRight?????????field_6_border_options?????????????_border_right???????????????????????????setShortValue?????????????????????????????????????????field_6_border_options?????????????????????????????????????????????????????????????????border??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setBorderTop?????????field_6_border_options?????????????_border_top?????????????????????????setShortValue???????????????????????????????????????field_6_border_options???????????????????????????????????????????????????????????????border????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setBorderBottom?????????field_6_border_options?????????????_border_bottom????????????????????????????setShortValue??????????????????????????????????????????field_6_border_options??????????????????????????????????????????????????????????????????border?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setPaletteOptions?????????field_7_palette_options???????????????????????????????????options??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setLeftBorderPaletteIdx?????????field_7_palette_options?????????????_left_border_palette_idx??????????????????????????????????????setShortValue????????????????????????????????????????????????????field_7_palette_options????????????????????????????????????????????????????border??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setRightBorderPaletteIdx?????????field_7_palette_options?????????????_right_border_palette_idx???????????????????????????????????????setShortValue?????????????????????????????????????????????????????field_7_palette_options?????????????????????????????????????????????????????border???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setDiag?????????field_7_palette_options???????????????????????????????????_diag?????????????????????????????????????????setShortValue???????????????????????????????????????????????????????field_7_palette_options?????????????????diag??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setAdtlPaletteOptions?????????field_8_adtl_palette_options????????????????????????????????????????options??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setTopBorderPaletteIdx?????????field_8_adtl_palette_options?????????????_top_border_palette_idx?????????????????????????????????????setValue??????????????????????????????????????????????field_8_adtl_palette_options??????????????????????????????????????????????border?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setBottomBorderPaletteIdx?????????field_8_adtl_palette_options?????????????_bottom_border_palette_idx????????????????????????????????????????setValue?????????????????????????????????????????????????field_8_adtl_palette_options?????????????????????????????????????????????????border????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setAdtlDiag?????????field_8_adtl_palette_options?????????????_adtl_diag????????????????????????setValue?????????????????????????????????field_8_adtl_palette_options???????????????????????????????????????????????????????????????diag???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setAdtlDiagLineStyle?????????field_8_adtl_palette_options?????????????_adtl_diag_line_style???????????????????????????????????setValue????????????????????????????????????????????field_8_adtl_palette_options????????????????????????????????????????????diag????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setAdtlFillPattern?????????field_8_adtl_palette_options?????????????_adtl_fill_pattern????????????????????????????????setValue?????????????????????????????????????????field_8_adtl_palette_options???????????????????????????????????????????????????????????????????????fill?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setFillPaletteOptions?????????field_9_fill_palette_options????????????????????????????????????????options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setFillForeground?????????field_9_fill_palette_options?????????????_fill_foreground??????????????????????????????setShortValue????????????????????????????????????????????field_9_fill_palette_options????????????????????????????????????????????color???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????setFillBackground?????????field_9_fill_palette_options?????????????_fill_background??????????????????????????????setShortValue????????????????????????????????????????????field_9_fill_palette_options????????????????????????????????????????????color???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getFontIndex????????????????field_1_font_index???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getFormatIndex????????????????field_2_format_index?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getCellOptions????????????????field_3_cell_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????isLocked????????????????_locked????????????????????????isSet??????????????????????????????field_3_cell_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????isHidden????????????????_hidden????????????????????????isSet??????????????????????????????field_3_cell_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getXFType????????????????_xf_type?????????????????????????getShortValue???????????????????????????????????????field_3_cell_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????get123Prefix????????????????_123_prefix????????????????????????????isSet??????????????????????????????????field_3_cell_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getParentIndex????????????????_parent_index??????????????????????????????getShortValue????????????????????????????????????????????field_3_cell_options?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getAlignmentOptions????????????????field_4_alignment_options??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getAlignment????????????????_alignment???????????????????????????getShortValue?????????????????????????????????????????field_4_alignment_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getWrapText????????????????_wrap_text???????????????????????????isSet?????????????????????????????????field_4_alignment_options?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getVerticalAlignment????????????????_vertical_alignment????????????????????????????????????getShortValue??????????????????????????????????????????????????field_4_alignment_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getJustifyLast????????????????????????????????????????????????????????????????????????????????????????????_justify_last??????????????????????????????getShortValue????????????????????????????????????????????field_4_alignment_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getRotation????????????????_rotation??????????????????????????getShortValue????????????????????????????????????????field_4_alignment_options?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getIndentionOptions????????????????field_5_indention_options?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getIndent????????????????_indent????????????????????????getShortValue??????????????????????????????????????field_5_indention_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getShrinkToFit????????????????_shrink_to_fit???????????????????????????????isSet?????????????????????????????????????field_5_indention_options?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getMergeCells????????????????_merge_cells?????????????????????????????isSet???????????????????????????????????field_5_indention_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getReadingOrder?????????????????????????????????????????????????????????????_reading_order???????????????????????????????getShortValue?????????????????????????????????????????????field_5_indention_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????isIndentNotParentFormat????????????????_indent_not_parent_format??????????????????????????????????????????isSet????????????????????????????????????????????????field_5_indention_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????isIndentNotParentFont????????????????_indent_not_parent_font????????????????????????????????????????isSet??????????????????????????????????????????????field_5_indention_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????isIndentNotParentAlignment????????????????_indent_not_parent_alignment?????????????????????????????????????????????isSet???????????????????????????????????????????????????field_5_indention_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????isIndentNotParentBorder????????????????_indent_not_parent_border??????????????????????????????????????????isSet????????????????????????????????????????????????field_5_indention_options??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????isIndentNotParentPattern????????????????_indent_not_parent_pattern???????????????????????????????????????????isSet?????????????????????????????????????????????????field_5_indention_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????isIndentNotParentCellOptions??????????????isSet????????????????_indent_not_parent_cell_options????????????????????field_5_indention_options?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getBorderOptions????????????????field_6_border_options?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getBorderLeft????????????????_border_left?????????????????????????????getShortValue???????????????????????????????????????????field_6_border_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getBorderRight????????????????_border_right??????????????????????????????getShortValue????????????????????????????????????????????field_6_border_options??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getBorderTop????????????????_border_top????????????????????????????getShortValue??????????????????????????????????????????field_6_border_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getBorderBottom????????????????_border_bottom???????????????????????????????getShortValue?????????????????????????????????????????????field_6_border_options?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getPaletteOptions????????????????field_7_palette_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getLeftBorderPaletteIdx??????????????getShortValue????????????????_left_border_palette_idx????????????????????????????field_7_palette_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getRightBorderPaletteIdx??????????????getShortValue????????????????_right_border_palette_idx????????????????????????????field_7_palette_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getDiag????????????????_diag??????????????????????getShortValue????????????????????????????????????field_7_palette_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getAdtlPaletteOptions????????????????field_8_adtl_palette_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getTopBorderPaletteIdx??????????????getValue??????????????????????????_top_border_palette_idx???????????????????????field_8_adtl_palette_options??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getBottomBorderPaletteIdx??????????????getValue??????????????????????????_bottom_border_palette_idx???????????????????????field_8_adtl_palette_options?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getAdtlDiag??????????????????????????_adtl_diag?????????????????????????????????????getValue??????????????????????????????????????????????field_8_adtl_palette_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getAdtlDiagLineStyle??????????????getValue??????????????????????????_adtl_diag_line_style???????????????????????field_8_adtl_palette_options????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getAdtlFillPattern??????????????getValue??????????????????????????_adtl_fill_pattern???????????????????????field_8_adtl_palette_options?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getFillPaletteOptions????????????????field_9_fill_palette_options??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getFillForeground????????????????_fill_foreground?????????????????????????????????getShortValue???????????????????????????????????????????????field_9_fill_palette_options???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????getFillBackground????????????????_fill_background?????????????????????????????????getShortValue???????????????????????????????????????????????field_9_fill_palette_options???????????????????toString?????????buffer?????????????getXFType????????????????????????????XF_STYLE?????????????buffer??????????????????getXFType?????????????????????????????????XF_CELL?????????????buffer?????????buffer?????????????????????????????????????????getFontIndex?????????buffer?????????????????????????????????????????getFormatIndex?????????buffer?????????????????????????????????????????getCellOptions?????????buffer?????????????????????????????????????????????????????????isLocked?????????buffer?????????????????????????????????????????????????????????isHidden?????????buffer?????????????????????????????????????????getXFType?????????buffer?????????????????????????????????????????getParentIndex?????????buffer?????????????????????????????????????????getAlignmentOptions?????????buffer?????????????????????????????????????????????????????????getAlignment?????????buffer?????????????????????????????????????????????????????????getWrapText?????????buffer?????????????????????????????????????????getVerticalAlignment?????????buffer?????????????????????????????????????????getJustifyLast?????????buffer?????????????????????????????????????????getRotation?????????buffer?????????????????????????????????????????getIndentionOptions?????????buffer?????????????????????????????????????????getIndent?????????buffer?????????????????????????????????????????????????????????getShrinkToFit?????????buffer?????????????????????????????????????????????????????????getMergeCells?????????buffer?????????????????????????????????????????getReadingOrder?????????buffer?????????????????????isIndentNotParentFormat?????????buffer?????????????????????isIndentNotParentFont?????????buffer?????????????????????isIndentNotParentAlignment?????????buffer?????????????????????isIndentNotParentBorder?????????buffer?????????????????????isIndentNotParentPattern?????????buffer?????????????????????isIndentNotParentCellOptions?????????buffer?????????????????????????????????????????getBorderOptions?????????buffer?????????????????????????????????????????getBorderLeft?????????buffer?????????????????????????????????????????getBorderRight?????????buffer?????????????????????????????????????????getBorderTop?????????buffer?????????????????????????????????????????getBorderBottom?????????buffer?????????????????????????????????????????getPaletteOptions?????????buffer?????????????????????????????????????????getLeftBorderPaletteIdx?????????buffer?????????????????????????????????????????getRightBorderPaletteIdx?????????buffer?????????????????????????????????????????getDiag?????????buffer?????????????????????????????????????????getAdtlPaletteOptions?????????buffer?????????????????????????????????????????getTopBorderPaletteIdx?????????buffer?????????????????????????????????????????getBottomBorderPaletteIdx?????????buffer?????????????????????????????????????????getAdtlDiag?????????buffer?????????????????????????????????????????getAdtlDiagLineStyle?????????buffer?????????????????????????????????????????getAdtlFillPattern?????????buffer?????????????????????????????????????????getFillPaletteOptions?????????buffer?????????????????????????????????????????getFillForeground?????????buffer?????????????????????????????????????????getFillBackground?????????buffer????????????????buffer????????????????serialize?????????LittleEndian??????????????????????putShort???????????????????????????????data?????????????????????????????????????????offset?????????????????????????????????????????????????sid?????????LittleEndian??????????????????????putShort???????????????????????????????data?????????????????????????????????????????offset?????????????????????????????????????????????????????????????????????????????LittleEndian??????????????????????putShort???????????????????????????????data?????????????????????????????????????????offset?????????????????????????????????????????????????getFontIndex?????????LittleEndian??????????????????????putShort???????????????????????????????data?????????????????????????????????????????offset?????????????????????????????????????????????????getFormatIndex?????????LittleEndian??????????????????????putShort???????????????????????????????data?????????????????????????????????????????offset?????????????????????????????????????????????????getCellOptions?????????LittleEndian??????????????????????putShort???????????????????????????????data??????????????????????????????????????????offset??????????????????????????????????????????????????getAlignmentOptions?????????LittleEndian??????????????????????putShort???????????????????????????????data??????????????????????????????????????????offset??????????????????????????????????????????????????getIndentionOptions?????????LittleEndian??????????????????????putShort???????????????????????????????data??????????????????????????????????????????offset??????????????????????????????????????????????????getBorderOptions?????????LittleEndian??????????????????????putShort???????????????????????????????data??????????????????????????????????????????offset??????????????????????????????????????????????????getPaletteOptions?????????LittleEndian??????????????????????putInt?????????????????????????????data????????????????????????????????????????offset????????????????????????????????????????????????getAdtlPaletteOptions?????????LittleEndian??????????????????????putShort???????????????????????????????data??????????????????????????????????????????offset??????????????????????????????????????????????????getFillPaletteOptions????????????????getRecordSize????????????????getRecordSize??????????????????getSid