1 /
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
76
77 public class ExtendedFormatRecord
78 extends Record
79 {
80 public final static short sid = 0xE0;
81
82
83 public final static short NULL = (short)0xfff0;
84
85
86 public final static short XF_STYLE = 1;
87 public final static short XF_CELL = 0;
88
89
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
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
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
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
140 private short field_1_font_index;
141 private short field_2_format_index;
142
143
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
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
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
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
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
192
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
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
212 static final private BitField _adtl_fill_pattern =
213 new BitField(0xfc000000);
214 private int field_8_adtl_palette_options;
215
216
217 static final private BitField _fill_foreground = new BitField(0x007F);
218 static final private BitField _fill_background = new BitField(0x3f80);
219
220
221 private short field_9_fill_palette_options;
222
223
228
229 public ExtendedFormatRecord()
230 {
231 }
232
233
240
241 public ExtendedFormatRecord(short id, short size, byte [] data)
242 {
243 super(id, size, data);
244 }
245
246
254
255 public ExtendedFormatRecord(short id, short size, byte [] data,
256 int offset)
257 {
258 super(id, size, data, offset);
259 }
260
261 protected void validateSid(short id)
262 {
263 if (id != sid)
264 {
265 throw new RecordFormatException("NOT A EXTENDED FORMAT RECORD");
266 }
267 }
268
269 protected void fillFields(byte [] data, short size, int offset)
270 {
271 field_1_font_index = LittleEndian.getShort(data,
272 0 + offset);
273 field_2_format_index = LittleEndian.getShort(data,
274 2 + offset);
275 field_3_cell_options = LittleEndian.getShort(data,
276 4 + offset);
277 field_4_alignment_options = LittleEndian.getShort(data,
278 6 + offset);
279 field_5_indention_options = LittleEndian.getShort(data,
280 8 + offset);
281 field_6_border_options = LittleEndian.getShort(data,
282 10 + offset);
283 field_7_palette_options = LittleEndian.getShort(data,
284 12 + offset);
285 field_8_adtl_palette_options = LittleEndian.getInt(data, 14 + offset);
286 field_9_fill_palette_options = LittleEndian.getShort(data,
287 18 + offset);
288 }
289
290
297
298 public void setFontIndex(short index)
299 {
300 field_1_font_index = index;
301 }
302
303
310
311 public void setFormatIndex(short index)
312 {
313 field_2_format_index = index;
314 }
315
316
324
325 public void setCellOptions(short options)
326 {
327 field_3_cell_options = options;
328 }
329
330
331
332
339
340 public void setLocked(boolean locked)
341 {
342 field_3_cell_options = _locked.setShortBoolean(field_3_cell_options,
343 locked);
344 }
345
346
353
354 public void setHidden(boolean hidden)
355 {
356 field_3_cell_options = _hidden.setShortBoolean(field_3_cell_options,
357 hidden);
358 }
359
360
369
370 public void setXFType(short type)
371 {
372 field_3_cell_options = _xf_type.setShortValue(field_3_cell_options,
373 type);
374 }
375
376
383
384 public void set123Prefix(boolean prefix)
385 {
386 field_3_cell_options =
387 _123_prefix.setShortBoolean(field_3_cell_options, prefix);
388 }
389
390
391
392
400
401 public void setParentIndex(short parent)
402 {
403 field_3_cell_options =
404 _parent_index.setShortValue(field_3_cell_options, parent);
405 }
406
407
408
409
416
417 public void setAlignmentOptions(short options)
418 {
419 field_4_alignment_options = options;
420 }
421
422
436
437 public void setAlignment(short align)
438 {
439 field_4_alignment_options =
440 _alignment.setShortValue(field_4_alignment_options, align);
441 }
442
443
450
451 public void setWrapText(boolean wrapped)
452 {
453 field_4_alignment_options =
454 _wrap_text.setShortBoolean(field_4_alignment_options, wrapped);
455 }
456
457
469
470 public void setVerticalAlignment(short align)
471 {
472 field_4_alignment_options =
473 _vertical_alignment.setShortValue(field_4_alignment_options,
474 align);
475 }
476
477
485
486 public void setJustifyLast(short justify)
487 {
488 field_4_alignment_options =
489 _justify_last.setShortValue(field_4_alignment_options, justify);
490 }
491
492
499
500 public void setRotation(short rotation)
501 {
502 field_4_alignment_options =
503 _rotation.setShortValue(field_4_alignment_options, rotation);
504 }
505
506
514
515 public void setIndentionOptions(short options)
516 {
517 field_5_indention_options = options;
518 }
519
520
521
522
528
529 public void setIndent(short indent)
530 {
531 field_5_indention_options =
532 _indent.setShortValue(field_5_indention_options, indent);
533 }
534
535
542
543 public void setShrinkToFit(boolean shrink)
544 {
545 field_5_indention_options =
546 _shrink_to_fit.setShortBoolean(field_5_indention_options, shrink);
547 }
548
549
556
557 public void setMergeCells(boolean merge)
558 {
559 field_5_indention_options =
560 _merge_cells.setShortBoolean(field_5_indention_options, merge);
561 }
562
563
570
571 public void setReadingOrder(short order)
572 {
573 field_5_indention_options =
574 _reading_order.setShortValue(field_5_indention_options, order);
575 }
576
577
585
586 public void setIndentNotParentFormat(boolean parent)
587 {
588 field_5_indention_options =
589 _indent_not_parent_format
590 .setShortBoolean(field_5_indention_options, parent);
591 }
592
593 /**
594 * set whether or not to use the font in this XF instead of the parent XF.
595 *
596 *
597 * @param font - true if this XF has a different font value than its parent,
598 * false otherwise.
599 * @see #setIndentionOptions(short)
600 */
601
602 public void setIndentNotParentFont(boolean font)
603 {
604 field_5_indention_options =
605 _indent_not_parent_font.setShortBoolean(field_5_indention_options,
606 font);
607 }
608
609 /**
610 * set whether or not to use the alignment in this XF instead of the parent XF.
611 *
612 *
613 * @param alignment true if this XF has a different alignment value than its parent,
614 * false otherwise.
615 * @see #setIndentionOptions(short)
616 */
617
618 public void setIndentNotParentAlignment(boolean alignment)
619 {
620 field_5_indention_options =
621 _indent_not_parent_alignment
622 .setShortBoolean(field_5_indention_options, alignment);
623 }
624
625 /**
626 * set whether or not to use the border in this XF instead of the parent XF.
627 *
628 *
629 * @param border - true if this XF has a different border value than its parent,
630 * false otherwise.
631 * @see #setIndentionOptions(short)
632 */
633
634 public void setIndentNotParentBorder(boolean border)
635 {
636 field_5_indention_options =
637 _indent_not_parent_border
638 .setShortBoolean(field_5_indention_options, border);
639 }
640
641 /**
642 * set whether or not to use the pattern in this XF instead of the parent XF.
643 * (foregrount/background)
644 *
645 * @param pattern- true if this XF has a different pattern value than its parent,
646 * false otherwise.
647 * @see #setIndentionOptions(short)
648 */
649
650 public void setIndentNotParentPattern(boolean pattern)
651 {
652 field_5_indention_options =
653 _indent_not_parent_pattern
654 .setShortBoolean(field_5_indention_options, pattern);
655 }
656
657 /**
658 * set whether or not to use the locking/hidden in this XF instead of the parent XF.
659 *
660 *
661 * @param options- true if this XF has a different locking or hidden value than its parent,
662 * false otherwise.
663 * @see #setIndentionOptions(short)
664 */
665
666 public void setIndentNotParentCellOptions(boolean options)
667 {
668 field_5_indention_options =
669 _indent_not_parent_cell_options
670 .setShortBoolean(field_5_indention_options, options);
671 }
672
673 // end indention options bitmask sets
674
675 /**
676 * set the border options bitmask (see the corresponding bitsetter methods
677 * that reference back to this one)
678 *
679 * @param options - the bit mask to set
680 *
681 */
682
683 public void setBorderOptions(short options)
684 {
685 field_6_border_options = options;
686 }
687
688 // border options bitfields
689
690 /**
691 * set the borderline style for the left border
692 *
693 *
694 * @param border - type of border for the left side of the cell
695 * @see #NONE
696 * @see #THIN
697 * @see #MEDIUM
698 * @see #DASHED
699 * @see #DOTTED
700 * @see #THICK
701 * @see #DOUBLE
702 * @see #HAIR
703 * @see #MEDIUM_DASHED
704 * @see #DASH_DOT
705 * @see #MEDIUM_DASH_DOT
706 * @see #DASH_DOT_DOT
707 * @see #MEDIUM_DASH_DOT_DOT
708 * @see #SLANTED_DASH_DOT
709 * @see #setBorderOptions(short)
710 */
711
712 public void setBorderLeft(short border)
713 {
714 field_6_border_options =
715 _border_left.setShortValue(field_6_border_options, border);
716 }
717
718 /**
719 * set the border line style for the right border
720 *
721 *
722 * @param border - type of border for the right side of the cell
723 * @see #NONE
724 * @see #THIN
725 * @see #MEDIUM
726 * @see #DASHED
727 * @see #DOTTED
728 * @see #THICK
729 * @see #DOUBLE
730 * @see #HAIR
731 * @see #MEDIUM_DASHED
732 * @see #DASH_DOT
733 * @see #MEDIUM_DASH_DOT
734 * @see #DASH_DOT_DOT
735 * @see #MEDIUM_DASH_DOT_DOT
736 * @see #SLANTED_DASH_DOT
737 * @see #setBorderOptions(short)
738 */
739
740 public void setBorderRight(short border)
741 {
742 field_6_border_options =
743 _border_right.setShortValue(field_6_border_options, border);
744 }
745
746 /**
747 * set the border line style for the top border
748 *
749 *
750 * @param border - type of border for the top of the cell
751 * @see #NONE
752 * @see #THIN
753 * @see #MEDIUM
754 * @see #DASHED
755 * @see #DOTTED
756 * @see #THICK
757 * @see #DOUBLE
758 * @see #HAIR
759 * @see #MEDIUM_DASHED
760 * @see #DASH_DOT
761 * @see #MEDIUM_DASH_DOT
762 * @see #DASH_DOT_DOT
763 * @see #MEDIUM_DASH_DOT_DOT
764 * @see #SLANTED_DASH_DOT
765 * @see #setBorderOptions(short)
766 */
767
768 public void setBorderTop(short border)
769 {
770 field_6_border_options =
771 _border_top.setShortValue(field_6_border_options, border);
772 }
773
774 /**
775 * set the border line style for the bottom border
776 *
777 *
778 * @param border - type of border for the bottom of the cell
779 * @see #NONE
780 * @see #THIN
781 * @see #MEDIUM
782 * @see #DASHED
783 * @see #DOTTED
784 * @see #THICK
785 * @see #DOUBLE
786 * @see #HAIR
787 * @see #MEDIUM_DASHED
788 * @see #DASH_DOT
789 * @see #MEDIUM_DASH_DOT
790 * @see #DASH_DOT_DOT
791 * @see #MEDIUM_DASH_DOT_DOT
792 * @see #SLANTED_DASH_DOT
793 * @see #setBorderOptions(short)
794 */
795
796 public void setBorderBottom(short border)
797 {
798 field_6_border_options =
799 _border_bottom.setShortValue(field_6_border_options, border);
800 }
801
802 // end border option bitfields
803
804 /**
805 * set the palette options bitmask (see the individual bitsetter methods that
806 * reference this one)
807 *
808 *
809 * @param options - the bitmask to set
810 *
811 */
812
813 public void setPaletteOptions(short options)
814 {
815 field_7_palette_options = options;
816 }
817
818 // bitfields for palette options
819
820 /**
821 * set the palette index for the left border color
822 *
823 *
824 * @param border - palette index
825 * @see #setPaletteOptions(short)
826 */
827
828 public void setLeftBorderPaletteIdx(short border)
829 {
830 field_7_palette_options =
831 _left_border_palette_idx.setShortValue(field_7_palette_options,
832 border);
833 }
834
835 /**
836 * set the palette index for the right border color
837 *
838 *
839 * @param border - palette index
840 * @see #setPaletteOptions(short)
841 */
842
843 public void setRightBorderPaletteIdx(short border)
844 {
845 field_7_palette_options =
846 _right_border_palette_idx.setShortValue(field_7_palette_options,
847 border);
848 }
849
850 // i've no idea.. possible values are 1 for down, 2 for up and 3 for both...0 for none..
851 // maybe a diagnal line?
852
853 /**
854 * Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..
855 *
856 *
857 * @param diag - set whatever it is that this is.
858 * @see #setPaletteOptions(short)
859 */
860
861 public void setDiag(short diag)
862 {
863 field_7_palette_options = _diag.setShortValue(field_7_palette_options,
864 diag);
865 }
866
867 // end of palette options
868
869 /**
870 * set the additional palette options bitmask (see individual bitsetter methods
871 * that reference this method)
872 *
873 *
874 * @param options - bitmask to set
875 *
876 */
877
878 public void setAdtlPaletteOptions(short options)
879 {
880 field_8_adtl_palette_options = options;
881 }
882
883 // bitfields for additional palette options
884
885 /**
886 * set the palette index for the top border
887 *
888 *
889 * @param border - palette index
890 * @see #setAdtlPaletteOptions(short)
891 */
892
893 public void setTopBorderPaletteIdx(short border)
894 {
895 field_8_adtl_palette_options =
896 _top_border_palette_idx.setValue(field_8_adtl_palette_options,
897 border);
898 }
899
900 /**
901 * set the palette index for the bottom border
902 *
903 *
904 * @param border - palette index
905 * @see #setAdtlPaletteOptions(short)
906 */
907
908 public void setBottomBorderPaletteIdx(short border)
909 {
910 field_8_adtl_palette_options =
911 _bottom_border_palette_idx.setValue(field_8_adtl_palette_options,
912 border);
913 }
914
915 /**
916 * set for diagonal borders? No idea (its a palette color for the other function
917 * we didn't know what was?)
918 *
919 *
920 * @param diag - the palette index?
921 * @see #setAdtlPaletteOptions(short)
922 */
923
924 public void setAdtlDiag(short diag)
925 {
926 field_8_adtl_palette_options =
927 _adtl_diag.setValue(field_8_adtl_palette_options, diag);
928 }
929
930 /**
931 * set the diagonal border line style? Who the heck ever heard of a diagonal border?
932 *
933 *
934 * @param diag - the line style
935 * @see #NONE
936 * @see #THIN
937 * @see #MEDIUM
938 * @see #DASHED
939 * @see #DOTTED
940 * @see #THICK
941 * @see #DOUBLE
942 * @see #HAIR
943 * @see #MEDIUM_DASHED
944 * @see #DASH_DOT
945 * @see #MEDIUM_DASH_DOT
946 * @see #DASH_DOT_DOT
947 * @see #MEDIUM_DASH_DOT_DOT
948 * @see #SLANTED_DASH_DOT
949 * @see #setAdtlPaletteOptions(short)
950 */
951
952 public void setAdtlDiagLineStyle(short diag)
953 {
954 field_8_adtl_palette_options =
955 _adtl_diag_line_style.setValue(field_8_adtl_palette_options,
956 diag);
957 }
958
959 /**
960 * set the fill pattern
961 *
962 * @see #NO_FILL
963 * @see #SOLID_FILL
964 * @see #FINE_DOTS
965 * @see #ALT_BARS
966 * @see #SPARSE_DOTS
967 * @see #THICK_HORZ_BANDS
968 * @see #THICK_VERT_BANDS
969 * @see #THICK_BACKWARD_DIAG
970 * @see #THICK_FORWARD_DIAG
971 * @see #BIG_SPOTS
972 * @see #BRICKS
973 * @see #THIN_HORZ_BANDS
974 * @see #THIN_VERT_BANDS
975 * @see #THIN_BACKWARD_DIAG
976 * @see #THIN_FORWARD_DIAG
977 * @see #SQUARES
978 * @see #DIAMONDS
979 *
980 * @param fill - fill pattern??
981 * @see #setAdtlPaletteOptions(short)
982 */
983
984 public void setAdtlFillPattern(short fill)
985 {
986 field_8_adtl_palette_options =
987 _adtl_fill_pattern.setValue(field_8_adtl_palette_options, fill);
988 }
989
990 // end bitfields for additional palette options
991
992 /**
993 * set the fill palette options bitmask (see
994 *
995 *
996 * @param options
997 *
998 */
999
1000 public void setFillPaletteOptions(short options)
1001 {
1002 field_9_fill_palette_options = options;
1003 }
1004
1005 /**
1006 * set the foreground palette color index
1007 *
1008 *
1009 * @param color - palette index
1010 * @see #setFillPaletteOptions(short)
1011 */
1012
1013 public void setFillForeground(short color)
1014 {
1015 field_9_fill_palette_options =
1016 _fill_foreground.setShortValue(field_9_fill_palette_options,
1017 color);
1018 }
1019
1020 /**
1021 * set the background palette color index
1022 *
1023 *
1024 * @param color - palette index
1025 * @see #setFillPaletteOptions(short)
1026 */
1027
1028 public void setFillBackground(short color)
1029 {
1030 field_9_fill_palette_options =
1031 _fill_background.setShortValue(field_9_fill_palette_options,
1032 color);
1033 }
1034
1035 /**
1036 * get the index to the FONT record (which font to use 0 based)
1037 *
1038 *
1039 * @return index to the font
1040 * @see org.apache.poi.hssf.record.FontRecord
1041 */
1042
1043 public short getFontIndex()
1044 {
1045 return field_1_font_index;
1046 }
1047
1048 /**
1049 * get the index to the Format record (which FORMAT to use 0-based)
1050 *
1051 *
1052 * @return index to the format record
1053 * @see org.apache.poi.hssf.record.FormatRecord
1054 */
1055
1056 public short getFormatIndex()
1057 {
1058 return field_2_format_index;
1059 }
1060
1061 /**
1062 * gets the options bitmask - you can also use corresponding option bit getters
1063 * (see other methods that reference this one)
1064 *
1065 *
1066 * @return options bitmask
1067 *
1068 */
1069
1070 public short getCellOptions()
1071 {
1072 return field_3_cell_options;
1073 }
1074
1075 // These are the bit fields in cell options
1076
1077 /**
1078 * get whether the cell is locked or not
1079 *
1080 *
1081 * @return locked - if the cell is locked
1082 * @see #getCellOptions()
1083 */
1084
1085 public boolean isLocked()
1086 {
1087 return _locked.isSet(field_3_cell_options);
1088 }
1089
1090 /**
1091 * get whether the cell is hidden or not
1092 *
1093 *
1094 * @return hidden - if the cell is hidden
1095 * @see #getCellOptions()
1096 */
1097
1098 public boolean isHidden()
1099 {
1100 return _hidden.isSet(field_3_cell_options);
1101 }
1102
1103 /**
1104 * get whether the cell is a cell or style XFRecord
1105 *
1106 *
1107 * @return type - cell or style (0/1)
1108 * @see #XF_STYLE
1109 * @see #XF_CELL
1110 * @see #getCellOptions()
1111 */
1112
1113 public short getXFType()
1114 {
1115 return _xf_type.getShortValue(field_3_cell_options);
1116 }
1117
1118 /**
1119 * get some old holdover from lotus 123. Who cares, its all over for Lotus.
1120 * RIP Lotus.
1121 *
1122 * @return prefix - the lotus thing
1123 * @see #getCellOptions()
1124 */
1125
1126 public boolean get123Prefix()
1127 {
1128 return _123_prefix.isSet(field_3_cell_options);
1129 }
1130
1131 /**
1132 * for cell XF types this is the parent style (usually 0/normal). For
1133 * style this should be NULL.
1134 *
1135 * @return index of parent XF
1136 * @see #NULL
1137 * @see #getCellOptions()
1138 */
1139
1140 public short getParentIndex()
1141 {
1142 return _parent_index.getShortValue(field_3_cell_options);
1143 }
1144
1145 // end bitfields in cell options
1146
1147 /**
1148 * get the alignment options bitmask. See corresponding bitgetter methods
1149 * that reference this one.
1150 *
1151 *
1152 * @return options - the bitmask
1153 */
1154
1155 public short getAlignmentOptions()
1156 {
1157 return field_4_alignment_options;
1158 }
1159
1160 // bitfields in alignment options
1161
1162 /**
1163 * get the horizontal alignment of the cell.
1164 *
1165 *
1166 * @return align - how to align the cell (see constants)
1167 * @see #GENERAL
1168 * @see #LEFT
1169 * @see #CENTER
1170 * @see #RIGHT
1171 * @see #FILL
1172 * @see #JUSTIFY
1173 * @see #CENTER_SELECTION
1174 * @see #getAlignmentOptions()
1175 */
1176
1177 public short getAlignment()
1178 {
1179 return _alignment.getShortValue(field_4_alignment_options);
1180 }
1181
1182 /**
1183 * get whether to wrap the text in the cell
1184 *
1185 *
1186 * @return wrapped - whether or not to wrap the cell text
1187 * @see #getAlignmentOptions()
1188 */
1189
1190 public boolean getWrapText()
1191 {
1192 return _wrap_text.isSet(field_4_alignment_options);
1193 }
1194
1195 /**
1196 * get the vertical alignment of text in the cell
1197 *
1198 *
1199 * @return where to align the text
1200 * @see #VERTICAL_TOP
1201 * @see #VERTICAL_CENTER
1202 * @see #VERTICAL_BOTTOM
1203 * @see #VERTICAL_JUSTIFY
1204 *
1205 * @see #getAlignmentOptions()
1206 */
1207
1208 public short getVerticalAlignment()
1209 {
1210 return _vertical_alignment.getShortValue(field_4_alignment_options);
1211 }
1212
1213 /**
1214 * Dunno. Docs just say this is for far east versions.. (I'm guessing it
1215 * justifies for right-to-left read languages)
1216 *
1217 *
1218 * @return justify
1219 * @see #getAlignmentOptions()
1220 */
1221
1222 public short getJustifyLast()
1223 { // for far east languages supported only for format always 0 for US
1224 return _justify_last.getShortValue(field_4_alignment_options);
1225 }
1226
1227 /**
1228 * get the degree of rotation. (I've not actually seen this used anywhere)
1229 *
1230 *
1231 * @return rotation - the degree of rotation
1232 * @see #getAlignmentOptions()
1233 */
1234
1235 public short getRotation()
1236 {
1237 return _rotation.getShortValue(field_4_alignment_options);
1238 }
1239
1240 // end alignment options bitfields
1241
1242 /**
1243 * get the indent options bitmask (see corresponding bit getters that reference
1244 * this field)
1245 *
1246 *
1247 * @return options bitmask
1248 *
1249 */
1250
1251 public short getIndentionOptions()
1252 {
1253 return field_5_indention_options;
1254 }
1255
1256 // bitfields for indention options
1257
1258 /**
1259 * get indention (not sure of the units, think its spaces)
1260 *
1261 * @return indent - how far to indent the cell
1262 * @see #getIndentionOptions()
1263 */
1264
1265 public short getIndent()
1266 {
1267 return _indent.getShortValue(field_5_indention_options);
1268 }
1269
1270 /**
1271 * get whether to shrink the text to fit
1272 *
1273 *
1274 * @return shrink - shrink to fit or not
1275 * @see #getIndentionOptions()
1276 */
1277
1278 public boolean getShrinkToFit()
1279 {
1280 return _shrink_to_fit.isSet(field_5_indention_options);
1281 }
1282
1283 /**
1284 * get whether to merge cells
1285 *
1286 *
1287 * @return merge - merge cells or not
1288 * @see #getIndentionOptions()
1289 */
1290
1291 public boolean getMergeCells()
1292 {
1293 return _merge_cells.isSet(field_5_indention_options);
1294 }
1295
1296 /**
1297 * get the reading order for far east versions (0 - Context, 1 - Left to right,
1298 * 2 - right to left) - We could use some help with support for the far east.
1299 *
1300 * @return order - the reading order (0,1,2)
1301 * @see #getIndentionOptions()
1302 */
1303
1304 public short getReadingOrder()
1305 { // only for far east always 0 in US
1306 return _reading_order.getShortValue(field_5_indention_options);
1307 }
1308
1309 /**
1310 * get whether or not to use the format in this XF instead of the parent XF.
1311 *
1312 *
1313 * @return parent - true if this XF has a different format value than its parent,
1314 * false otherwise.
1315 * @see #getIndentionOptions()
1316 */
1317
1318 public boolean isIndentNotParentFormat()
1319 {
1320 return _indent_not_parent_format.isSet(field_5_indention_options);
1321 }
1322
1323 /**
1324 * get whether or not to use the font in this XF instead of the parent XF.
1325 *
1326 *
1327 * @return font - true if this XF has a different font value than its parent,
1328 * false otherwise.
1329 * @see #getIndentionOptions()
1330 */
1331
1332 public boolean isIndentNotParentFont()
1333 {
1334 return _indent_not_parent_font.isSet(field_5_indention_options);
1335 }
1336
1337 /**
1338 * get whether or not to use the alignment in this XF instead of the parent XF.
1339 *
1340 *
1341 * @return alignment true if this XF has a different alignment value than its parent,
1342 * false otherwise.
1343 * @see #getIndentionOptions()
1344 */
1345
1346 public boolean isIndentNotParentAlignment()
1347 {
1348 return _indent_not_parent_alignment.isSet(field_5_indention_options);
1349 }
1350
1351 /**
1352 * get whether or not to use the border in this XF instead of the parent XF.
1353 *
1354 *
1355 * @return border - true if this XF has a different border value than its parent,
1356 * false otherwise.
1357 * @see #getIndentionOptions()
1358 */
1359
1360 public boolean isIndentNotParentBorder()
1361 {
1362 return _indent_not_parent_border.isSet(field_5_indention_options);
1363 }
1364
1365 /**
1366 * get whether or not to use the pattern in this XF instead of the parent XF.
1367 * (foregrount/background)
1368 *
1369 * @return pattern- true if this XF has a different pattern value than its parent,
1370 * false otherwise.
1371 * @see #getIndentionOptions()
1372 */
1373
1374 public boolean isIndentNotParentPattern()
1375 {
1376 return _indent_not_parent_pattern.isSet(field_5_indention_options);
1377 }
1378
1379 /**
1380 * get whether or not to use the locking/hidden in this XF instead of the parent XF.
1381 *
1382 *
1383 * @return options- true if this XF has a different locking or hidden value than its parent,
1384 * false otherwise.
1385 * @see #getIndentionOptions()
1386 */
1387
1388 public boolean isIndentNotParentCellOptions()
1389 {
1390 return _indent_not_parent_cell_options
1391 .isSet(field_5_indention_options);
1392 }
1393
1394 // end of bitfields for indention options
1395 // border options
1396
1397 /**
1398 * get the border options bitmask (see the corresponding bit getter methods
1399 * that reference back to this one)
1400 *
1401 * @return options - the bit mask to set
1402 *
1403 */
1404
1405 public short getBorderOptions()
1406 {
1407 return field_6_border_options;
1408 }
1409
1410 // bitfields for border options
1411
1412 /**
1413 * get the borderline style for the left border
1414 *
1415 *
1416 * @return border - type of border for the left side of the cell
1417 * @see #NONE
1418 * @see #THIN
1419 * @see #MEDIUM
1420 * @see #DASHED
1421 * @see #DOTTED
1422 * @see #THICK
1423 * @see #DOUBLE
1424 * @see #HAIR
1425 * @see #MEDIUM_DASHED
1426 * @see #DASH_DOT
1427 * @see #MEDIUM_DASH_DOT
1428 * @see #DASH_DOT_DOT
1429 * @see #MEDIUM_DASH_DOT_DOT
1430 * @see #SLANTED_DASH_DOT
1431 * @see #getBorderOptions()
1432 */
1433
1434 public short getBorderLeft()
1435 {
1436 return _border_left.getShortValue(field_6_border_options);
1437 }
1438
1439 /**
1440 * get the borderline style for the right border
1441 *
1442 *
1443 * @return border - type of border for the right side of the cell
1444 * @see #NONE
1445 * @see #THIN
1446 * @see #MEDIUM
1447 * @see #DASHED
1448 * @see #DOTTED
1449 * @see #THICK
1450 * @see #DOUBLE
1451 * @see #HAIR
1452 * @see #MEDIUM_DASHED
1453 * @see #DASH_DOT
1454 * @see #MEDIUM_DASH_DOT
1455 * @see #DASH_DOT_DOT
1456 * @see #MEDIUM_DASH_DOT_DOT
1457 * @see #SLANTED_DASH_DOT
1458 * @see #getBorderOptions()
1459 */
1460
1461 public short getBorderRight()
1462 {
1463 return _border_right.getShortValue(field_6_border_options);
1464 }
1465
1466 /**
1467 * get the borderline style for the top border
1468 *
1469 *
1470 * @return border - type of border for the top of the cell
1471 * @see #NONE
1472 * @see #THIN
1473 * @see #MEDIUM
1474 * @see #DASHED
1475 * @see #DOTTED
1476 * @see #THICK
1477 * @see #DOUBLE
1478 * @see #HAIR
1479 * @see #MEDIUM_DASHED
1480 * @see #DASH_DOT
1481 * @see #MEDIUM_DASH_DOT
1482 * @see #DASH_DOT_DOT
1483 * @see #MEDIUM_DASH_DOT_DOT
1484 * @see #SLANTED_DASH_DOT
1485 * @see #getBorderOptions()
1486 */
1487
1488 public short getBorderTop()
1489 {
1490 return _border_top.getShortValue(field_6_border_options);
1491 }
1492
1493 /**
1494 * get the borderline style for the bottom border
1495 *
1496 *
1497 * @return border - type of border for the bottom of the cell
1498 * @see #NONE
1499 * @see #THIN
1500 * @see #MEDIUM
1501 * @see #DASHED
1502 * @see #DOTTED
1503 * @see #THICK
1504 * @see #DOUBLE
1505 * @see #HAIR
1506 * @see #MEDIUM_DASHED
1507 * @see #DASH_DOT
1508 * @see #MEDIUM_DASH_DOT
1509 * @see #DASH_DOT_DOT
1510 * @see #MEDIUM_DASH_DOT_DOT
1511 * @see #SLANTED_DASH_DOT
1512 * @see #getBorderOptions()
1513 */
1514
1515 public short getBorderBottom()
1516 {
1517 return _border_bottom.getShortValue(field_6_border_options);
1518 }
1519
1520 // record types -- palette options
1521
1522 /**
1523 * get the palette options bitmask (see the individual bit getter methods that
1524 * reference this one)
1525 *
1526 *
1527 * @return options - the bitmask
1528 *
1529 */
1530
1531 public short getPaletteOptions()
1532 {
1533 return field_7_palette_options;
1534 }
1535
1536 // bitfields for palette options
1537
1538 /**
1539 * get the palette index for the left border color
1540 *
1541 *
1542 * @return border - palette index
1543 * @see #getPaletteOptions()
1544 */
1545
1546 public short getLeftBorderPaletteIdx()
1547 {
1548 return _left_border_palette_idx
1549 .getShortValue(field_7_palette_options);
1550 }
1551
1552 /**
1553 * get the palette index for the right border color
1554 *
1555 *
1556 * @return border - palette index
1557 * @see #getPaletteOptions()
1558 */
1559
1560 public short getRightBorderPaletteIdx()
1561 {
1562 return _right_border_palette_idx
1563 .getShortValue(field_7_palette_options);
1564 }
1565
1566 // i've no idea.. possible values are 1 for down, 2 for up and 3 for both...0 for none..
1567 // maybe a diagnal line?
1568
1569 /**
1570 * Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..
1571 *
1572 *
1573 * @return diag - whatever it is that this is.
1574 * @see #getPaletteOptions()
1575 */
1576
1577 public short getDiag()
1578 {
1579 return _diag.getShortValue(field_7_palette_options);
1580 }
1581
1582 // end of style palette options
1583 // additional palette options
1584
1585 /**
1586 * get the additional palette options bitmask (see individual bit getter methods
1587 * that reference this method)
1588 *
1589 *
1590 * @return options - bitmask to set
1591 *
1592 */
1593
1594 public int getAdtlPaletteOptions()
1595 {
1596 return field_8_adtl_palette_options;
1597 }
1598
1599 // bitfields for additional palette options
1600
1601 /**
1602 * get the palette index for the top border
1603 *
1604 *
1605 * @return border - palette index
1606 * @see #getAdtlPaletteOptions()
1607 */
1608
1609 public short getTopBorderPaletteIdx()
1610 {
1611 return ( short ) _top_border_palette_idx
1612 .getValue(field_8_adtl_palette_options);
1613 }
1614
1615 /**
1616 * get the palette index for the bottom border
1617 *
1618 *
1619 * @return border - palette index
1620 * @see #getAdtlPaletteOptions()
1621 */
1622
1623 public short getBottomBorderPaletteIdx()
1624 {
1625 return ( short ) _bottom_border_palette_idx
1626 .getValue(field_8_adtl_palette_options);
1627 }
1628
1629 /**
1630 * get for diagonal borders? No idea (its a palette color for the other function
1631 * we didn't know what was?)
1632 *
1633 *
1634 * @return diag - the palette index?
1635 * @see #getAdtlPaletteOptions()
1636 */
1637
1638 public short getAdtlDiag()
1639 {
1640 return ( short ) _adtl_diag.getValue(field_8_adtl_palette_options);
1641 }
1642
1643 /**
1644 * get the diagonal border line style? Who the heck ever heard of a diagonal border?
1645 *
1646 *
1647 * @return diag - the line style
1648 * @see #NONE
1649 * @see #THIN
1650 * @see #MEDIUM
1651 * @see #DASHED
1652 * @see #DOTTED
1653 * @see #THICK
1654 * @see #DOUBLE
1655 * @see #HAIR
1656 * @see #MEDIUM_DASHED
1657 * @see #DASH_DOT
1658 * @see #MEDIUM_DASH_DOT
1659 * @see #DASH_DOT_DOT
1660 * @see #MEDIUM_DASH_DOT_DOT
1661 * @see #SLANTED_DASH_DOT
1662 * @see #getAdtlPaletteOptions()
1663 */
1664
1665 public short getAdtlDiagLineStyle()
1666 {
1667 return ( short ) _adtl_diag_line_style
1668 .getValue(field_8_adtl_palette_options);
1669 }
1670
1671 /**
1672 * get the additional fill pattern
1673 *
1674 * @see #NO_FILL
1675 * @see #SOLID_FILL
1676 * @see #FINE_DOTS
1677 * @see #ALT_BARS
1678 * @see #SPARSE_DOTS
1679 * @see #THICK_HORZ_BANDS
1680 * @see #THICK_VERT_BANDS
1681 * @see #THICK_BACKWARD_DIAG
1682 * @see #THICK_FORWARD_DIAG
1683 * @see #BIG_SPOTS
1684 * @see #BRICKS
1685 * @see #THIN_HORZ_BANDS
1686 * @see #THIN_VERT_BANDS
1687 * @see #THIN_BACKWARD_DIAG
1688 * @see #THIN_FORWARD_DIAG
1689 * @see #SQUARES
1690 * @see #DIAMONDS
1691 *
1692 * @return fill - fill pattern??
1693 * @see #getAdtlPaletteOptions()
1694 */
1695
1696 public short getAdtlFillPattern()
1697 {
1698 return ( short ) _adtl_fill_pattern
1699 .getValue(field_8_adtl_palette_options);
1700 }
1701
1702 // end bitfields for additional palette options
1703 // fill palette options
1704
1705 /**
1706 * get the fill palette options bitmask (see indivdual bit getters that
1707 * reference this method)
1708 *
1709 * @return options
1710 *
1711 */
1712
1713 public short getFillPaletteOptions()
1714 {
1715 return field_9_fill_palette_options;
1716 }
1717
1718 // bitfields for fill palette options
1719
1720 /**
1721 * get the foreground palette color index
1722 *
1723 *
1724 * @return color - palette index
1725 * @see #getFillPaletteOptions()
1726 */
1727
1728 public short getFillForeground()
1729 {
1730 return _fill_foreground.getShortValue(field_9_fill_palette_options);
1731 }
1732
1733 /**
1734 * get the background palette color index
1735 *
1736 * @retyrb color palette index
1737 * @see #getFillPaletteOptions()
1738 */
1739
1740 public short getFillBackground()
1741 {
1742 return _fill_background.getShortValue(field_9_fill_palette_options);
1743 }
1744
1745 public String toString()
1746 {
1747 StringBuffer buffer = new StringBuffer();
1748
1749 buffer.append("[EXTENDEDFORMAT]\n");
1750 if (getXFType() == XF_STYLE)
1751 {
1752 buffer.append(" STYLE_RECORD_TYPE\n");
1753 }
1754 else if (getXFType() == XF_CELL)
1755 {
1756 buffer.append(" CELL_RECORD_TYPE\n");
1757 }
1758 buffer.append(" .fontindex = ")
1759 .append(Integer.toHexString(getFontIndex())).append("\n");
1760 buffer.append(" .formatindex = ")
1761 .append(Integer.toHexString(getFormatIndex())).append("\n");
1762 buffer.append(" .celloptions = ")
1763 .append(Integer.toHexString(getCellOptions())).append("\n");
1764 buffer.append(" .islocked = ").append(isLocked())
1765 .append("\n");
1766 buffer.append(" .ishidden = ").append(isHidden())
1767 .append("\n");
1768 buffer.append(" .recordtype= ")
1769 .append(Integer.toHexString(getXFType())).append("\n");
1770 buffer.append(" .parentidx = ")
1771 .append(Integer.toHexString(getParentIndex())).append("\n");
1772 buffer.append(" .alignmentoptions= ")
1773 .append(Integer.toHexString(getAlignmentOptions())).append("\n");
1774 buffer.append(" .alignment = ").append(getAlignment())
1775 .append("\n");
1776 buffer.append(" .wraptext = ").append(getWrapText())
1777 .append("\n");
1778 buffer.append(" .valignment= ")
1779 .append(Integer.toHexString(getVerticalAlignment())).append("\n");
1780 buffer.append(" .justlast = ")
1781 .append(Integer.toHexString(getJustifyLast())).append("\n");
1782 buffer.append(" .rotation = ")
1783 .append(Integer.toHexString(getRotation())).append("\n");
1784 buffer.append(" .indentionoptions= ")
1785 .append(Integer.toHexString(getIndentionOptions())).append("\n");
1786 buffer.append(" .indent = ")
1787 .append(Integer.toHexString(getIndent())).append("\n");
1788 buffer.append(" .shrinktoft= ").append(getShrinkToFit())
1789 .append("\n");
1790 buffer.append(" .mergecells= ").append(getMergeCells())
1791 .append("\n");
1792 buffer.append(" .readngordr= ")
1793 .append(Integer.toHexString(getReadingOrder())).append("\n");
1794 buffer.append(" .formatflag= ")
1795 .append(isIndentNotParentFormat()).append("\n");
1796 buffer.append(" .fontflag = ")
1797 .append(isIndentNotParentFont()).append("\n");
1798 buffer.append(" .prntalgnmt= ")
1799 .append(isIndentNotParentAlignment()).append("\n");
1800 buffer.append(" .borderflag= ")
1801 .append(isIndentNotParentBorder()).append("\n");
1802 buffer.append(" .paternflag= ")
1803 .append(isIndentNotParentPattern()).append("\n");
1804 buffer.append(" .celloption= ")
1805 .append(isIndentNotParentCellOptions()).append("\n");
1806 buffer.append(" .borderoptns = ")
1807 .append(Integer.toHexString(getBorderOptions())).append("\n");
1808 buffer.append(" .lftln = ")
1809 .append(Integer.toHexString(getBorderLeft())).append("\n");
1810 buffer.append(" .rgtln = ")
1811 .append(Integer.toHexString(getBorderRight())).append("\n");
1812 buffer.append(" .topln = ")
1813 .append(Integer.toHexString(getBorderTop())).append("\n");
1814 buffer.append(" .btmln = ")
1815 .append(Integer.toHexString(getBorderBottom())).append("\n");
1816 buffer.append(" .paleteoptns = ")
1817 .append(Integer.toHexString(getPaletteOptions())).append("\n");
1818 buffer.append(" .leftborder= ")
1819 .append(Integer.toHexString(getLeftBorderPaletteIdx()))
1820 .append("\n");
1821 buffer.append(" .rghtborder= ")
1822 .append(Integer.toHexString(getRightBorderPaletteIdx()))
1823 .append("\n");
1824 buffer.append(" .diag = ")
1825 .append(Integer.toHexString(getDiag())).append("\n");
1826 buffer.append(" .paleteoptn2 = ")
1827 .append(Integer.toHexString(getAdtlPaletteOptions()))
1828 .append("\n");
1829 buffer.append(" .topborder = ")
1830 .append(Integer.toHexString(getTopBorderPaletteIdx()))
1831 .append("\n");
1832 buffer.append(" .botmborder= ")
1833 .append(Integer.toHexString(getBottomBorderPaletteIdx()))
1834 .append("\n");
1835 buffer.append(" .adtldiag = ")
1836 .append(Integer.toHexString(getAdtlDiag())).append("\n");
1837 buffer.append(" .diaglnstyl= ")
1838 .append(Integer.toHexString(getAdtlDiagLineStyle())).append("\n");
1839 buffer.append(" .fillpattrn= ")
1840 .append(Integer.toHexString(getAdtlFillPattern())).append("\n");
1841 buffer.append(" .fillpaloptn = ")
1842 .append(Integer.toHexString(getFillPaletteOptions()))
1843 .append("\n");
1844 buffer.append(" .foreground= ")
1845 .append(Integer.toHexString(getFillForeground())).append("\n");
1846 buffer.append(" .background= ")
1847 .append(Integer.toHexString(getFillBackground())).append("\n");
1848 buffer.append("[/EXTENDEDFORMAT]\n");
1849 return buffer.toString();
1850 }
1851
1852 public int serialize(int offset, byte [] data)
1853 {
1854 LittleEndian.putShort(data, 0 + offset, sid);
1855 LittleEndian.putShort(data, 2 + offset,
1856 ( short ) (20)); // 24 - 4(sid/len)
1857 LittleEndian.putShort(data, 4 + offset, getFontIndex());
1858 LittleEndian.putShort(data, 6 + offset, getFormatIndex());
1859 LittleEndian.putShort(data, 8 + offset, getCellOptions());
1860 LittleEndian.putShort(data, 10 + offset, getAlignmentOptions());
1861 LittleEndian.putShort(data, 12 + offset, getIndentionOptions());
1862 LittleEndian.putShort(data, 14 + offset, getBorderOptions());
1863 LittleEndian.putShort(data, 16 + offset, getPaletteOptions());
1864 LittleEndian.putInt(data, 18 + offset, getAdtlPaletteOptions());
1865 LittleEndian.putShort(data, 22 + offset, getFillPaletteOptions());
1866 return getRecordSize();
1867 }
1868
1869 public int getRecordSize()
1870 {
1871 return 24;
1872 }
1873
1874 public short getSid()
1875 {
1876 return this.sid;
1877 }
1878 }
1879 ??????????????????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