Support for cloning one extended format record onto another, plus tests
[poi.git] / src / java / org / apache / poi / hssf / record / ExtendedFormatRecord.java
blobae983876711ef44ebb5d8efebcc5ca04769b6539
2 /* ====================================================================
3 Licensed to the Apache Software Foundation (ASF) under one or more
4 contributor license agreements. See the NOTICE file distributed with
5 this work for additional information regarding copyright ownership.
6 The ASF licenses this file to You under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with
8 the License. You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 ==================================================================== */
20 package org.apache.poi.hssf.record;
22 import org.apache.poi.util.BitField;
23 import org.apache.poi.util.BitFieldFactory;
24 import org.apache.poi.util.LittleEndian;
26 /**
27 * Title: Extended Format Record
28 * Description: Probably one of the more complex records. There are two breeds:
29 * Style and Cell.
30 *<P>
31 * It should be noted that fields in the extended format record are
32 * somewhat arbitrary. Almost all of the fields are bit-level, but
33 * we name them as best as possible by functional group. In some
34 * places this is better than others.
35 *<P>
37 * REFERENCE: PG 426 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P>
38 * @author Andrew C. Oliver (acoliver at apache dot org)
39 * @version 2.0-pre
42 public class ExtendedFormatRecord
43 extends Record
45 public final static short sid = 0xE0;
47 // null constant
48 public final static short NULL = (short)0xfff0;
50 // xf type
51 public final static short XF_STYLE = 1;
52 public final static short XF_CELL = 0;
54 // borders
55 public final static short NONE = 0x0;
56 public final static short THIN = 0x1;
57 public final static short MEDIUM = 0x2;
58 public final static short DASHED = 0x3;
59 public final static short DOTTED = 0x4;
60 public final static short THICK = 0x5;
61 public final static short DOUBLE = 0x6;
62 public final static short HAIR = 0x7;
63 public final static short MEDIUM_DASHED = 0x8;
64 public final static short DASH_DOT = 0x9;
65 public final static short MEDIUM_DASH_DOT = 0xA;
66 public final static short DASH_DOT_DOT = 0xB;
67 public final static short MEDIUM_DASH_DOT_DOT = 0xC;
68 public final static short SLANTED_DASH_DOT = 0xD;
70 // alignment
71 public final static short GENERAL = 0x0;
72 public final static short LEFT = 0x1;
73 public final static short CENTER = 0x2;
74 public final static short RIGHT = 0x3;
75 public final static short FILL = 0x4;
76 public final static short JUSTIFY = 0x5;
77 public final static short CENTER_SELECTION = 0x6;
79 // vertical alignment
80 public final static short VERTICAL_TOP = 0x0;
81 public final static short VERTICAL_CENTER = 0x1;
82 public final static short VERTICAL_BOTTOM = 0x2;
83 public final static short VERTICAL_JUSTIFY = 0x3;
85 // fill
86 public final static short NO_FILL = 0 ;
87 public final static short SOLID_FILL = 1 ;
88 public final static short FINE_DOTS = 2 ;
89 public final static short ALT_BARS = 3 ;
90 public final static short SPARSE_DOTS = 4 ;
91 public final static short THICK_HORZ_BANDS = 5 ;
92 public final static short THICK_VERT_BANDS = 6 ;
93 public final static short THICK_BACKWARD_DIAG = 7 ;
94 public final static short THICK_FORWARD_DIAG = 8 ;
95 public final static short BIG_SPOTS = 9 ;
96 public final static short BRICKS = 10 ;
97 public final static short THIN_HORZ_BANDS = 11 ;
98 public final static short THIN_VERT_BANDS = 12 ;
99 public final static short THIN_BACKWARD_DIAG = 13 ;
100 public final static short THIN_FORWARD_DIAG = 14 ;
101 public final static short SQUARES = 15 ;
102 public final static short DIAMONDS = 16 ;
104 // fields in BOTH style and Cell XF records
105 private short field_1_font_index; // not bit-mapped
106 private short field_2_format_index; // not bit-mapped
108 // field_3_cell_options bit map
109 static final private BitField _locked = BitFieldFactory.getInstance(0x0001);
110 static final private BitField _hidden = BitFieldFactory.getInstance(0x0002);
111 static final private BitField _xf_type = BitFieldFactory.getInstance(0x0004);
112 static final private BitField _123_prefix = BitFieldFactory.getInstance(0x0008);
113 static final private BitField _parent_index = BitFieldFactory.getInstance(0xFFF0);
114 private short field_3_cell_options;
116 // field_4_alignment_options bit map
117 static final private BitField _alignment = BitFieldFactory.getInstance(0x0007);
118 static final private BitField _wrap_text = BitFieldFactory.getInstance(0x0008);
119 static final private BitField _vertical_alignment = BitFieldFactory.getInstance(0x0070);
120 static final private BitField _justify_last = BitFieldFactory.getInstance(0x0080);
121 static final private BitField _rotation = BitFieldFactory.getInstance(0xFF00);
122 private short field_4_alignment_options;
124 // field_5_indention_options
125 static final private BitField _indent =
126 BitFieldFactory.getInstance(0x000F);
127 static final private BitField _shrink_to_fit =
128 BitFieldFactory.getInstance(0x0010);
129 static final private BitField _merge_cells =
130 BitFieldFactory.getInstance(0x0020);
131 static final private BitField _reading_order =
132 BitFieldFactory.getInstance(0x00C0);
134 // apparently bits 8 and 9 are unused
135 static final private BitField _indent_not_parent_format =
136 BitFieldFactory.getInstance(0x0400);
137 static final private BitField _indent_not_parent_font =
138 BitFieldFactory.getInstance(0x0800);
139 static final private BitField _indent_not_parent_alignment =
140 BitFieldFactory.getInstance(0x1000);
141 static final private BitField _indent_not_parent_border =
142 BitFieldFactory.getInstance(0x2000);
143 static final private BitField _indent_not_parent_pattern =
144 BitFieldFactory.getInstance(0x4000);
145 static final private BitField _indent_not_parent_cell_options =
146 BitFieldFactory.getInstance(0x8000);
147 private short field_5_indention_options;
149 // field_6_border_options bit map
150 static final private BitField _border_left = BitFieldFactory.getInstance(0x000F);
151 static final private BitField _border_right = BitFieldFactory.getInstance(0x00F0);
152 static final private BitField _border_top = BitFieldFactory.getInstance(0x0F00);
153 static final private BitField _border_bottom = BitFieldFactory.getInstance(0xF000);
154 private short field_6_border_options;
156 // all three of the following attributes are palette options
157 // field_7_palette_options bit map
158 static final private BitField _left_border_palette_idx =
159 BitFieldFactory.getInstance(0x007F);
160 static final private BitField _right_border_palette_idx =
161 BitFieldFactory.getInstance(0x3F80);
162 static final private BitField _diag =
163 BitFieldFactory.getInstance(0xC000);
164 private short field_7_palette_options;
166 // field_8_adtl_palette_options bit map
167 static final private BitField _top_border_palette_idx =
168 BitFieldFactory.getInstance(0x0000007F);
169 static final private BitField _bottom_border_palette_idx =
170 BitFieldFactory.getInstance(0x00003F80);
171 static final private BitField _adtl_diag =
172 BitFieldFactory.getInstance(0x001fc000);
173 static final private BitField _adtl_diag_line_style =
174 BitFieldFactory.getInstance(0x01e00000);
176 // apparently bit 25 is unused
177 static final private BitField _adtl_fill_pattern =
178 BitFieldFactory.getInstance(0xfc000000);
179 private int field_8_adtl_palette_options; // additional to avoid 2
181 // field_9_fill_palette_options bit map
182 static final private BitField _fill_foreground = BitFieldFactory.getInstance(0x007F);
183 static final private BitField _fill_background = BitFieldFactory.getInstance(0x3f80);
185 // apparently bits 15 and 14 are unused
186 private short field_9_fill_palette_options;
189 * Constructor ExtendedFormatRecord
194 public ExtendedFormatRecord()
199 * Constructs an ExtendedFormat record and sets its fields appropriately.
200 * @param in the RecordInputstream to read the record from
203 public ExtendedFormatRecord(RecordInputStream in)
205 super(in);
208 protected void validateSid(short id)
210 if (id != sid)
212 throw new RecordFormatException("NOT A EXTENDED FORMAT RECORD");
216 protected void fillFields(RecordInputStream in)
218 field_1_font_index = in.readShort();
219 field_2_format_index = in.readShort();
220 field_3_cell_options = in.readShort();
221 field_4_alignment_options = in.readShort();
222 field_5_indention_options = in.readShort();
223 field_6_border_options = in.readShort();
224 field_7_palette_options = in.readShort();
225 field_8_adtl_palette_options = in.readInt();
226 field_9_fill_palette_options = in.readShort();
230 * set the index to the FONT record (which font to use 0 based)
233 * @param index to the font
234 * @see org.apache.poi.hssf.record.FontRecord
237 public void setFontIndex(short index)
239 field_1_font_index = index;
243 * set the index to the Format record (which FORMAT to use 0-based)
246 * @param index to the format record
247 * @see org.apache.poi.hssf.record.FormatRecord
250 public void setFormatIndex(short index)
252 field_2_format_index = index;
256 * sets the options bitmask - you can also use corresponding option bit setters
257 * (see other methods that reference this one)
260 * @param options bitmask to set
264 public void setCellOptions(short options)
266 field_3_cell_options = options;
269 // These are the bit fields in cell options
272 * set whether the cell is locked or not
275 * @param locked - if the cell is locked
276 * @see #setCellOptions(short)
279 public void setLocked(boolean locked)
281 field_3_cell_options = _locked.setShortBoolean(field_3_cell_options,
282 locked);
286 * set whether the cell is hidden or not
289 * @param hidden - if the cell is hidden
290 * @see #setCellOptions(short)
293 public void setHidden(boolean hidden)
295 field_3_cell_options = _hidden.setShortBoolean(field_3_cell_options,
296 hidden);
300 * set whether the cell is a cell or style XFRecord
303 * @param type - cell or style (0/1)
304 * @see #XF_STYLE
305 * @see #XF_CELL
306 * @see #setCellOptions(short)
309 public void setXFType(short type)
311 field_3_cell_options = _xf_type.setShortValue(field_3_cell_options,
312 type);
316 * set some old holdover from lotus 123. Who cares, its all over for Lotus.
317 * RIP Lotus.
319 * @param prefix - the lotus thing to set.
320 * @see #setCellOptions(short)
323 public void set123Prefix(boolean prefix)
325 field_3_cell_options =
326 _123_prefix.setShortBoolean(field_3_cell_options, prefix);
329 // present in both but NULL except in cell records
332 * for cell XF types this is the parent style (usually 0/normal). For
333 * style this should be NULL.
335 * @param parent index of parent XF
336 * @see #NULL
337 * @see #setCellOptions(short)
340 public void setParentIndex(short parent)
342 field_3_cell_options =
343 _parent_index.setShortValue(field_3_cell_options, parent);
346 // end bitfields in cell options
349 * set the alignment options bitmask. See corresponding bitsetter methods
350 * that reference this one.
353 * @param options - the bitmask to set
356 public void setAlignmentOptions(short options)
358 field_4_alignment_options = options;
362 * set the horizontal alignment of the cell.
365 * @param align - how to align the cell (see constants)
366 * @see #GENERAL
367 * @see #LEFT
368 * @see #CENTER
369 * @see #RIGHT
370 * @see #FILL
371 * @see #JUSTIFY
372 * @see #CENTER_SELECTION
373 * @see #setAlignmentOptions(short)
376 public void setAlignment(short align)
378 field_4_alignment_options =
379 _alignment.setShortValue(field_4_alignment_options, align);
383 * set whether to wrap the text in the cell
386 * @param wrapped - whether or not to wrap the cell text
387 * @see #setAlignmentOptions(short)
390 public void setWrapText(boolean wrapped)
392 field_4_alignment_options =
393 _wrap_text.setShortBoolean(field_4_alignment_options, wrapped);
397 * set the vertical alignment of text in the cell
400 * @param align where to align the text
401 * @see #VERTICAL_TOP
402 * @see #VERTICAL_CENTER
403 * @see #VERTICAL_BOTTOM
404 * @see #VERTICAL_JUSTIFY
406 * @see #setAlignmentOptions(short)
409 public void setVerticalAlignment(short align)
411 field_4_alignment_options =
412 _vertical_alignment.setShortValue(field_4_alignment_options,
413 align);
417 * Dunno. Docs just say this is for far east versions.. (I'm guessing it
418 * justifies for right-to-left read languages)
421 * @param justify
422 * @see #setAlignmentOptions(short)
425 public void setJustifyLast(short justify)
426 { // for far east languages supported only for format always 0 for US
427 field_4_alignment_options =
428 _justify_last.setShortValue(field_4_alignment_options, justify);
432 * set the degree of rotation. (I've not actually seen this used anywhere)
435 * @param rotation the degree of rotation
436 * @see #setAlignmentOptions(short)
439 public void setRotation(short rotation)
441 field_4_alignment_options =
442 _rotation.setShortValue(field_4_alignment_options, rotation);
446 * set the indent options bitmask (see corresponding bitmask setters that reference
447 * this field)
450 * @param options bitmask to set.
454 public void setIndentionOptions(short options)
456 field_5_indention_options = options;
459 // set bitfields for indention options
462 * set indention (not sure of the units, think its spaces)
464 * @param indent - how far to indent the cell
465 * @see #setIndentionOptions(short)
468 public void setIndent(short indent)
470 field_5_indention_options =
471 _indent.setShortValue(field_5_indention_options, indent);
475 * set whether to shrink the text to fit
478 * @param shrink - shrink to fit or not
479 * @see #setIndentionOptions(short)
482 public void setShrinkToFit(boolean shrink)
484 field_5_indention_options =
485 _shrink_to_fit.setShortBoolean(field_5_indention_options, shrink);
489 * set whether to merge cells
492 * @param merge - merge cells or not
493 * @see #setIndentionOptions(short)
496 public void setMergeCells(boolean merge)
498 field_5_indention_options =
499 _merge_cells.setShortBoolean(field_5_indention_options, merge);
503 * set the reading order for far east versions (0 - Context, 1 - Left to right,
504 * 2 - right to left) - We could use some help with support for the far east.
506 * @param order - the reading order (0,1,2)
507 * @see #setIndentionOptions(short)
510 public void setReadingOrder(short order)
511 { // only for far east always 0 in US
512 field_5_indention_options =
513 _reading_order.setShortValue(field_5_indention_options, order);
517 * set whether or not to use the format in this XF instead of the parent XF.
520 * @param parent - true if this XF has a different format value than its parent,
521 * false otherwise.
522 * @see #setIndentionOptions(short)
525 public void setIndentNotParentFormat(boolean parent)
527 field_5_indention_options =
528 _indent_not_parent_format
529 .setShortBoolean(field_5_indention_options, parent);
533 * set whether or not to use the font in this XF instead of the parent XF.
536 * @param font - true if this XF has a different font value than its parent,
537 * false otherwise.
538 * @see #setIndentionOptions(short)
541 public void setIndentNotParentFont(boolean font)
543 field_5_indention_options =
544 _indent_not_parent_font.setShortBoolean(field_5_indention_options,
545 font);
549 * set whether or not to use the alignment in this XF instead of the parent XF.
552 * @param alignment true if this XF has a different alignment value than its parent,
553 * false otherwise.
554 * @see #setIndentionOptions(short)
557 public void setIndentNotParentAlignment(boolean alignment)
559 field_5_indention_options =
560 _indent_not_parent_alignment
561 .setShortBoolean(field_5_indention_options, alignment);
565 * set whether or not to use the border in this XF instead of the parent XF.
568 * @param border - true if this XF has a different border value than its parent,
569 * false otherwise.
570 * @see #setIndentionOptions(short)
573 public void setIndentNotParentBorder(boolean border)
575 field_5_indention_options =
576 _indent_not_parent_border
577 .setShortBoolean(field_5_indention_options, border);
581 * <p>Sets whether or not to use the pattern in this XF instead of the
582 * parent XF (foreground/background).</p>
584 * @param pattern <code>true</code> if this XF has a different pattern
585 * value than its parent,</code> false</code> otherwise.
586 * @see #setIndentionOptions(short)
589 public void setIndentNotParentPattern(boolean pattern)
591 field_5_indention_options =
592 _indent_not_parent_pattern
593 .setShortBoolean(field_5_indention_options, pattern);
597 * set whether or not to use the locking/hidden in this XF instead of the parent XF.
600 * @param options true if this XF has a different locking or hidden value than its parent,
601 * false otherwise.
602 * @see #setIndentionOptions(short)
605 public void setIndentNotParentCellOptions(boolean options)
607 field_5_indention_options =
608 _indent_not_parent_cell_options
609 .setShortBoolean(field_5_indention_options, options);
612 // end indention options bitmask sets
615 * set the border options bitmask (see the corresponding bitsetter methods
616 * that reference back to this one)
618 * @param options - the bit mask to set
622 public void setBorderOptions(short options)
624 field_6_border_options = options;
627 // border options bitfields
630 * set the borderline style for the left border
633 * @param border - type of border for the left side of the cell
634 * @see #NONE
635 * @see #THIN
636 * @see #MEDIUM
637 * @see #DASHED
638 * @see #DOTTED
639 * @see #THICK
640 * @see #DOUBLE
641 * @see #HAIR
642 * @see #MEDIUM_DASHED
643 * @see #DASH_DOT
644 * @see #MEDIUM_DASH_DOT
645 * @see #DASH_DOT_DOT
646 * @see #MEDIUM_DASH_DOT_DOT
647 * @see #SLANTED_DASH_DOT
648 * @see #setBorderOptions(short)
651 public void setBorderLeft(short border)
653 field_6_border_options =
654 _border_left.setShortValue(field_6_border_options, border);
658 * set the border line style for the right border
661 * @param border - type of border for the right side of the cell
662 * @see #NONE
663 * @see #THIN
664 * @see #MEDIUM
665 * @see #DASHED
666 * @see #DOTTED
667 * @see #THICK
668 * @see #DOUBLE
669 * @see #HAIR
670 * @see #MEDIUM_DASHED
671 * @see #DASH_DOT
672 * @see #MEDIUM_DASH_DOT
673 * @see #DASH_DOT_DOT
674 * @see #MEDIUM_DASH_DOT_DOT
675 * @see #SLANTED_DASH_DOT
676 * @see #setBorderOptions(short)
679 public void setBorderRight(short border)
681 field_6_border_options =
682 _border_right.setShortValue(field_6_border_options, border);
686 * set the border line style for the top border
689 * @param border - type of border for the top of the cell
690 * @see #NONE
691 * @see #THIN
692 * @see #MEDIUM
693 * @see #DASHED
694 * @see #DOTTED
695 * @see #THICK
696 * @see #DOUBLE
697 * @see #HAIR
698 * @see #MEDIUM_DASHED
699 * @see #DASH_DOT
700 * @see #MEDIUM_DASH_DOT
701 * @see #DASH_DOT_DOT
702 * @see #MEDIUM_DASH_DOT_DOT
703 * @see #SLANTED_DASH_DOT
704 * @see #setBorderOptions(short)
707 public void setBorderTop(short border)
709 field_6_border_options =
710 _border_top.setShortValue(field_6_border_options, border);
714 * set the border line style for the bottom border
717 * @param border - type of border for the bottom of the cell
718 * @see #NONE
719 * @see #THIN
720 * @see #MEDIUM
721 * @see #DASHED
722 * @see #DOTTED
723 * @see #THICK
724 * @see #DOUBLE
725 * @see #HAIR
726 * @see #MEDIUM_DASHED
727 * @see #DASH_DOT
728 * @see #MEDIUM_DASH_DOT
729 * @see #DASH_DOT_DOT
730 * @see #MEDIUM_DASH_DOT_DOT
731 * @see #SLANTED_DASH_DOT
732 * @see #setBorderOptions(short)
735 public void setBorderBottom(short border)
737 field_6_border_options =
738 _border_bottom.setShortValue(field_6_border_options, border);
741 // end border option bitfields
744 * set the palette options bitmask (see the individual bitsetter methods that
745 * reference this one)
748 * @param options - the bitmask to set
752 public void setPaletteOptions(short options)
754 field_7_palette_options = options;
757 // bitfields for palette options
760 * set the palette index for the left border color
763 * @param border - palette index
764 * @see #setPaletteOptions(short)
767 public void setLeftBorderPaletteIdx(short border)
769 field_7_palette_options =
770 _left_border_palette_idx.setShortValue(field_7_palette_options,
771 border);
775 * set the palette index for the right border color
778 * @param border - palette index
779 * @see #setPaletteOptions(short)
782 public void setRightBorderPaletteIdx(short border)
784 field_7_palette_options =
785 _right_border_palette_idx.setShortValue(field_7_palette_options,
786 border);
789 // i've no idea.. possible values are 1 for down, 2 for up and 3 for both...0 for none..
790 // maybe a diagnal line?
793 * Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..
796 * @param diag - set whatever it is that this is.
797 * @see #setPaletteOptions(short)
800 public void setDiag(short diag)
802 field_7_palette_options = _diag.setShortValue(field_7_palette_options,
803 diag);
806 // end of palette options
809 * set the additional palette options bitmask (see individual bitsetter methods
810 * that reference this method)
813 * @param options - bitmask to set
817 public void setAdtlPaletteOptions(short options)
819 field_8_adtl_palette_options = options;
822 // bitfields for additional palette options
825 * set the palette index for the top border
828 * @param border - palette index
829 * @see #setAdtlPaletteOptions(short)
832 public void setTopBorderPaletteIdx(short border)
834 field_8_adtl_palette_options =
835 _top_border_palette_idx.setValue(field_8_adtl_palette_options,
836 border);
840 * set the palette index for the bottom border
843 * @param border - palette index
844 * @see #setAdtlPaletteOptions(short)
847 public void setBottomBorderPaletteIdx(short border)
849 field_8_adtl_palette_options =
850 _bottom_border_palette_idx.setValue(field_8_adtl_palette_options,
851 border);
855 * set for diagonal borders? No idea (its a palette color for the other function
856 * we didn't know what was?)
859 * @param diag - the palette index?
860 * @see #setAdtlPaletteOptions(short)
863 public void setAdtlDiag(short diag)
865 field_8_adtl_palette_options =
866 _adtl_diag.setValue(field_8_adtl_palette_options, diag);
870 * set the diagonal border line style? Who the heck ever heard of a diagonal border?
873 * @param diag - the line style
874 * @see #NONE
875 * @see #THIN
876 * @see #MEDIUM
877 * @see #DASHED
878 * @see #DOTTED
879 * @see #THICK
880 * @see #DOUBLE
881 * @see #HAIR
882 * @see #MEDIUM_DASHED
883 * @see #DASH_DOT
884 * @see #MEDIUM_DASH_DOT
885 * @see #DASH_DOT_DOT
886 * @see #MEDIUM_DASH_DOT_DOT
887 * @see #SLANTED_DASH_DOT
888 * @see #setAdtlPaletteOptions(short)
891 public void setAdtlDiagLineStyle(short diag)
893 field_8_adtl_palette_options =
894 _adtl_diag_line_style.setValue(field_8_adtl_palette_options,
895 diag);
899 * set the fill pattern
901 * @see #NO_FILL
902 * @see #SOLID_FILL
903 * @see #FINE_DOTS
904 * @see #ALT_BARS
905 * @see #SPARSE_DOTS
906 * @see #THICK_HORZ_BANDS
907 * @see #THICK_VERT_BANDS
908 * @see #THICK_BACKWARD_DIAG
909 * @see #THICK_FORWARD_DIAG
910 * @see #BIG_SPOTS
911 * @see #BRICKS
912 * @see #THIN_HORZ_BANDS
913 * @see #THIN_VERT_BANDS
914 * @see #THIN_BACKWARD_DIAG
915 * @see #THIN_FORWARD_DIAG
916 * @see #SQUARES
917 * @see #DIAMONDS
919 * @param fill - fill pattern??
920 * @see #setAdtlPaletteOptions(short)
923 public void setAdtlFillPattern(short fill)
925 field_8_adtl_palette_options =
926 _adtl_fill_pattern.setValue(field_8_adtl_palette_options, fill);
929 // end bitfields for additional palette options
932 * set the fill palette options bitmask (see
935 * @param options
939 public void setFillPaletteOptions(short options)
941 field_9_fill_palette_options = options;
945 * set the foreground palette color index
948 * @param color - palette index
949 * @see #setFillPaletteOptions(short)
952 public void setFillForeground(short color)
954 field_9_fill_palette_options =
955 _fill_foreground.setShortValue(field_9_fill_palette_options,
956 color);
960 * set the background palette color index
963 * @param color - palette index
964 * @see #setFillPaletteOptions(short)
967 public void setFillBackground(short color)
969 field_9_fill_palette_options =
970 _fill_background.setShortValue(field_9_fill_palette_options,
971 color);
975 * get the index to the FONT record (which font to use 0 based)
978 * @return index to the font
979 * @see org.apache.poi.hssf.record.FontRecord
982 public short getFontIndex()
984 return field_1_font_index;
988 * get the index to the Format record (which FORMAT to use 0-based)
991 * @return index to the format record
992 * @see org.apache.poi.hssf.record.FormatRecord
995 public short getFormatIndex()
997 return field_2_format_index;
1001 * gets the options bitmask - you can also use corresponding option bit getters
1002 * (see other methods that reference this one)
1005 * @return options bitmask
1009 public short getCellOptions()
1011 return field_3_cell_options;
1014 // These are the bit fields in cell options
1017 * get whether the cell is locked or not
1020 * @return locked - if the cell is locked
1021 * @see #getCellOptions()
1024 public boolean isLocked()
1026 return _locked.isSet(field_3_cell_options);
1030 * get whether the cell is hidden or not
1033 * @return hidden - if the cell is hidden
1034 * @see #getCellOptions()
1037 public boolean isHidden()
1039 return _hidden.isSet(field_3_cell_options);
1043 * get whether the cell is a cell or style XFRecord
1046 * @return type - cell or style (0/1)
1047 * @see #XF_STYLE
1048 * @see #XF_CELL
1049 * @see #getCellOptions()
1052 public short getXFType()
1054 return _xf_type.getShortValue(field_3_cell_options);
1058 * get some old holdover from lotus 123. Who cares, its all over for Lotus.
1059 * RIP Lotus.
1061 * @return prefix - the lotus thing
1062 * @see #getCellOptions()
1065 public boolean get123Prefix()
1067 return _123_prefix.isSet(field_3_cell_options);
1071 * for cell XF types this is the parent style (usually 0/normal). For
1072 * style this should be NULL.
1074 * @return index of parent XF
1075 * @see #NULL
1076 * @see #getCellOptions()
1079 public short getParentIndex()
1081 return _parent_index.getShortValue(field_3_cell_options);
1084 // end bitfields in cell options
1087 * get the alignment options bitmask. See corresponding bitgetter methods
1088 * that reference this one.
1091 * @return options - the bitmask
1094 public short getAlignmentOptions()
1096 return field_4_alignment_options;
1099 // bitfields in alignment options
1102 * get the horizontal alignment of the cell.
1105 * @return align - how to align the cell (see constants)
1106 * @see #GENERAL
1107 * @see #LEFT
1108 * @see #CENTER
1109 * @see #RIGHT
1110 * @see #FILL
1111 * @see #JUSTIFY
1112 * @see #CENTER_SELECTION
1113 * @see #getAlignmentOptions()
1116 public short getAlignment()
1118 return _alignment.getShortValue(field_4_alignment_options);
1122 * get whether to wrap the text in the cell
1125 * @return wrapped - whether or not to wrap the cell text
1126 * @see #getAlignmentOptions()
1129 public boolean getWrapText()
1131 return _wrap_text.isSet(field_4_alignment_options);
1135 * get the vertical alignment of text in the cell
1138 * @return where to align the text
1139 * @see #VERTICAL_TOP
1140 * @see #VERTICAL_CENTER
1141 * @see #VERTICAL_BOTTOM
1142 * @see #VERTICAL_JUSTIFY
1144 * @see #getAlignmentOptions()
1147 public short getVerticalAlignment()
1149 return _vertical_alignment.getShortValue(field_4_alignment_options);
1153 * Dunno. Docs just say this is for far east versions.. (I'm guessing it
1154 * justifies for right-to-left read languages)
1157 * @return justify
1158 * @see #getAlignmentOptions()
1161 public short getJustifyLast()
1162 { // for far east languages supported only for format always 0 for US
1163 return _justify_last.getShortValue(field_4_alignment_options);
1167 * get the degree of rotation. (I've not actually seen this used anywhere)
1170 * @return rotation - the degree of rotation
1171 * @see #getAlignmentOptions()
1174 public short getRotation()
1176 return _rotation.getShortValue(field_4_alignment_options);
1179 // end alignment options bitfields
1182 * get the indent options bitmask (see corresponding bit getters that reference
1183 * this field)
1186 * @return options bitmask
1190 public short getIndentionOptions()
1192 return field_5_indention_options;
1195 // bitfields for indention options
1198 * get indention (not sure of the units, think its spaces)
1200 * @return indent - how far to indent the cell
1201 * @see #getIndentionOptions()
1204 public short getIndent()
1206 return _indent.getShortValue(field_5_indention_options);
1210 * get whether to shrink the text to fit
1213 * @return shrink - shrink to fit or not
1214 * @see #getIndentionOptions()
1217 public boolean getShrinkToFit()
1219 return _shrink_to_fit.isSet(field_5_indention_options);
1223 * get whether to merge cells
1226 * @return merge - merge cells or not
1227 * @see #getIndentionOptions()
1230 public boolean getMergeCells()
1232 return _merge_cells.isSet(field_5_indention_options);
1236 * get the reading order for far east versions (0 - Context, 1 - Left to right,
1237 * 2 - right to left) - We could use some help with support for the far east.
1239 * @return order - the reading order (0,1,2)
1240 * @see #getIndentionOptions()
1243 public short getReadingOrder()
1244 { // only for far east always 0 in US
1245 return _reading_order.getShortValue(field_5_indention_options);
1249 * get whether or not to use the format in this XF instead of the parent XF.
1252 * @return parent - true if this XF has a different format value than its parent,
1253 * false otherwise.
1254 * @see #getIndentionOptions()
1257 public boolean isIndentNotParentFormat()
1259 return _indent_not_parent_format.isSet(field_5_indention_options);
1263 * get whether or not to use the font in this XF instead of the parent XF.
1266 * @return font - true if this XF has a different font value than its parent,
1267 * false otherwise.
1268 * @see #getIndentionOptions()
1271 public boolean isIndentNotParentFont()
1273 return _indent_not_parent_font.isSet(field_5_indention_options);
1277 * get whether or not to use the alignment in this XF instead of the parent XF.
1280 * @return alignment true if this XF has a different alignment value than its parent,
1281 * false otherwise.
1282 * @see #getIndentionOptions()
1285 public boolean isIndentNotParentAlignment()
1287 return _indent_not_parent_alignment.isSet(field_5_indention_options);
1291 * get whether or not to use the border in this XF instead of the parent XF.
1294 * @return border - true if this XF has a different border value than its parent,
1295 * false otherwise.
1296 * @see #getIndentionOptions()
1299 public boolean isIndentNotParentBorder()
1301 return _indent_not_parent_border.isSet(field_5_indention_options);
1305 * get whether or not to use the pattern in this XF instead of the parent XF.
1306 * (foregrount/background)
1308 * @return pattern- true if this XF has a different pattern value than its parent,
1309 * false otherwise.
1310 * @see #getIndentionOptions()
1313 public boolean isIndentNotParentPattern()
1315 return _indent_not_parent_pattern.isSet(field_5_indention_options);
1319 * get whether or not to use the locking/hidden in this XF instead of the parent XF.
1322 * @return options- true if this XF has a different locking or hidden value than its parent,
1323 * false otherwise.
1324 * @see #getIndentionOptions()
1327 public boolean isIndentNotParentCellOptions()
1329 return _indent_not_parent_cell_options
1330 .isSet(field_5_indention_options);
1333 // end of bitfields for indention options
1334 // border options
1337 * get the border options bitmask (see the corresponding bit getter methods
1338 * that reference back to this one)
1340 * @return options - the bit mask to set
1344 public short getBorderOptions()
1346 return field_6_border_options;
1349 // bitfields for border options
1352 * get the borderline style for the left border
1355 * @return border - type of border for the left side of the cell
1356 * @see #NONE
1357 * @see #THIN
1358 * @see #MEDIUM
1359 * @see #DASHED
1360 * @see #DOTTED
1361 * @see #THICK
1362 * @see #DOUBLE
1363 * @see #HAIR
1364 * @see #MEDIUM_DASHED
1365 * @see #DASH_DOT
1366 * @see #MEDIUM_DASH_DOT
1367 * @see #DASH_DOT_DOT
1368 * @see #MEDIUM_DASH_DOT_DOT
1369 * @see #SLANTED_DASH_DOT
1370 * @see #getBorderOptions()
1373 public short getBorderLeft()
1375 return _border_left.getShortValue(field_6_border_options);
1379 * get the borderline style for the right border
1382 * @return border - type of border for the right side of the cell
1383 * @see #NONE
1384 * @see #THIN
1385 * @see #MEDIUM
1386 * @see #DASHED
1387 * @see #DOTTED
1388 * @see #THICK
1389 * @see #DOUBLE
1390 * @see #HAIR
1391 * @see #MEDIUM_DASHED
1392 * @see #DASH_DOT
1393 * @see #MEDIUM_DASH_DOT
1394 * @see #DASH_DOT_DOT
1395 * @see #MEDIUM_DASH_DOT_DOT
1396 * @see #SLANTED_DASH_DOT
1397 * @see #getBorderOptions()
1400 public short getBorderRight()
1402 return _border_right.getShortValue(field_6_border_options);
1406 * get the borderline style for the top border
1409 * @return border - type of border for the top of the cell
1410 * @see #NONE
1411 * @see #THIN
1412 * @see #MEDIUM
1413 * @see #DASHED
1414 * @see #DOTTED
1415 * @see #THICK
1416 * @see #DOUBLE
1417 * @see #HAIR
1418 * @see #MEDIUM_DASHED
1419 * @see #DASH_DOT
1420 * @see #MEDIUM_DASH_DOT
1421 * @see #DASH_DOT_DOT
1422 * @see #MEDIUM_DASH_DOT_DOT
1423 * @see #SLANTED_DASH_DOT
1424 * @see #getBorderOptions()
1427 public short getBorderTop()
1429 return _border_top.getShortValue(field_6_border_options);
1433 * get the borderline style for the bottom border
1436 * @return border - type of border for the bottom of the cell
1437 * @see #NONE
1438 * @see #THIN
1439 * @see #MEDIUM
1440 * @see #DASHED
1441 * @see #DOTTED
1442 * @see #THICK
1443 * @see #DOUBLE
1444 * @see #HAIR
1445 * @see #MEDIUM_DASHED
1446 * @see #DASH_DOT
1447 * @see #MEDIUM_DASH_DOT
1448 * @see #DASH_DOT_DOT
1449 * @see #MEDIUM_DASH_DOT_DOT
1450 * @see #SLANTED_DASH_DOT
1451 * @see #getBorderOptions()
1454 public short getBorderBottom()
1456 return _border_bottom.getShortValue(field_6_border_options);
1459 // record types -- palette options
1462 * get the palette options bitmask (see the individual bit getter methods that
1463 * reference this one)
1466 * @return options - the bitmask
1470 public short getPaletteOptions()
1472 return field_7_palette_options;
1475 // bitfields for palette options
1478 * get the palette index for the left border color
1481 * @return border - palette index
1482 * @see #getPaletteOptions()
1485 public short getLeftBorderPaletteIdx()
1487 return _left_border_palette_idx
1488 .getShortValue(field_7_palette_options);
1492 * get the palette index for the right border color
1495 * @return border - palette index
1496 * @see #getPaletteOptions()
1499 public short getRightBorderPaletteIdx()
1501 return _right_border_palette_idx
1502 .getShortValue(field_7_palette_options);
1505 // i've no idea.. possible values are 1 for down, 2 for up and 3 for both...0 for none..
1506 // maybe a diagnal line?
1509 * Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..
1512 * @return diag - whatever it is that this is.
1513 * @see #getPaletteOptions()
1516 public short getDiag()
1518 return _diag.getShortValue(field_7_palette_options);
1521 // end of style palette options
1522 // additional palette options
1525 * get the additional palette options bitmask (see individual bit getter methods
1526 * that reference this method)
1529 * @return options - bitmask to set
1533 public int getAdtlPaletteOptions()
1535 return field_8_adtl_palette_options;
1538 // bitfields for additional palette options
1541 * get the palette index for the top border
1544 * @return border - palette index
1545 * @see #getAdtlPaletteOptions()
1548 public short getTopBorderPaletteIdx()
1550 return ( short ) _top_border_palette_idx
1551 .getValue(field_8_adtl_palette_options);
1555 * get the palette index for the bottom border
1558 * @return border - palette index
1559 * @see #getAdtlPaletteOptions()
1562 public short getBottomBorderPaletteIdx()
1564 return ( short ) _bottom_border_palette_idx
1565 .getValue(field_8_adtl_palette_options);
1569 * get for diagonal borders? No idea (its a palette color for the other function
1570 * we didn't know what was?)
1573 * @return diag - the palette index?
1574 * @see #getAdtlPaletteOptions()
1577 public short getAdtlDiag()
1579 return ( short ) _adtl_diag.getValue(field_8_adtl_palette_options);
1583 * get the diagonal border line style? Who the heck ever heard of a diagonal border?
1586 * @return diag - the line style
1587 * @see #NONE
1588 * @see #THIN
1589 * @see #MEDIUM
1590 * @see #DASHED
1591 * @see #DOTTED
1592 * @see #THICK
1593 * @see #DOUBLE
1594 * @see #HAIR
1595 * @see #MEDIUM_DASHED
1596 * @see #DASH_DOT
1597 * @see #MEDIUM_DASH_DOT
1598 * @see #DASH_DOT_DOT
1599 * @see #MEDIUM_DASH_DOT_DOT
1600 * @see #SLANTED_DASH_DOT
1601 * @see #getAdtlPaletteOptions()
1604 public short getAdtlDiagLineStyle()
1606 return ( short ) _adtl_diag_line_style
1607 .getValue(field_8_adtl_palette_options);
1611 * get the additional fill pattern
1613 * @see #NO_FILL
1614 * @see #SOLID_FILL
1615 * @see #FINE_DOTS
1616 * @see #ALT_BARS
1617 * @see #SPARSE_DOTS
1618 * @see #THICK_HORZ_BANDS
1619 * @see #THICK_VERT_BANDS
1620 * @see #THICK_BACKWARD_DIAG
1621 * @see #THICK_FORWARD_DIAG
1622 * @see #BIG_SPOTS
1623 * @see #BRICKS
1624 * @see #THIN_HORZ_BANDS
1625 * @see #THIN_VERT_BANDS
1626 * @see #THIN_BACKWARD_DIAG
1627 * @see #THIN_FORWARD_DIAG
1628 * @see #SQUARES
1629 * @see #DIAMONDS
1631 * @return fill - fill pattern??
1632 * @see #getAdtlPaletteOptions()
1635 public short getAdtlFillPattern()
1637 return ( short ) _adtl_fill_pattern
1638 .getValue(field_8_adtl_palette_options);
1641 // end bitfields for additional palette options
1642 // fill palette options
1645 * get the fill palette options bitmask (see indivdual bit getters that
1646 * reference this method)
1648 * @return options
1652 public short getFillPaletteOptions()
1654 return field_9_fill_palette_options;
1657 // bitfields for fill palette options
1660 * get the foreground palette color index
1663 * @return color - palette index
1664 * @see #getFillPaletteOptions()
1667 public short getFillForeground()
1669 return _fill_foreground.getShortValue(field_9_fill_palette_options);
1673 * get the background palette color index
1675 * @return color palette index
1676 * @see #getFillPaletteOptions()
1679 public short getFillBackground()
1681 return _fill_background.getShortValue(field_9_fill_palette_options);
1684 public String toString()
1686 StringBuffer buffer = new StringBuffer();
1688 buffer.append("[EXTENDEDFORMAT]\n");
1689 if (getXFType() == XF_STYLE)
1691 buffer.append(" STYLE_RECORD_TYPE\n");
1693 else if (getXFType() == XF_CELL)
1695 buffer.append(" CELL_RECORD_TYPE\n");
1697 buffer.append(" .fontindex = ")
1698 .append(Integer.toHexString(getFontIndex())).append("\n");
1699 buffer.append(" .formatindex = ")
1700 .append(Integer.toHexString(getFormatIndex())).append("\n");
1701 buffer.append(" .celloptions = ")
1702 .append(Integer.toHexString(getCellOptions())).append("\n");
1703 buffer.append(" .islocked = ").append(isLocked())
1704 .append("\n");
1705 buffer.append(" .ishidden = ").append(isHidden())
1706 .append("\n");
1707 buffer.append(" .recordtype= ")
1708 .append(Integer.toHexString(getXFType())).append("\n");
1709 buffer.append(" .parentidx = ")
1710 .append(Integer.toHexString(getParentIndex())).append("\n");
1711 buffer.append(" .alignmentoptions= ")
1712 .append(Integer.toHexString(getAlignmentOptions())).append("\n");
1713 buffer.append(" .alignment = ").append(getAlignment())
1714 .append("\n");
1715 buffer.append(" .wraptext = ").append(getWrapText())
1716 .append("\n");
1717 buffer.append(" .valignment= ")
1718 .append(Integer.toHexString(getVerticalAlignment())).append("\n");
1719 buffer.append(" .justlast = ")
1720 .append(Integer.toHexString(getJustifyLast())).append("\n");
1721 buffer.append(" .rotation = ")
1722 .append(Integer.toHexString(getRotation())).append("\n");
1723 buffer.append(" .indentionoptions= ")
1724 .append(Integer.toHexString(getIndentionOptions())).append("\n");
1725 buffer.append(" .indent = ")
1726 .append(Integer.toHexString(getIndent())).append("\n");
1727 buffer.append(" .shrinktoft= ").append(getShrinkToFit())
1728 .append("\n");
1729 buffer.append(" .mergecells= ").append(getMergeCells())
1730 .append("\n");
1731 buffer.append(" .readngordr= ")
1732 .append(Integer.toHexString(getReadingOrder())).append("\n");
1733 buffer.append(" .formatflag= ")
1734 .append(isIndentNotParentFormat()).append("\n");
1735 buffer.append(" .fontflag = ")
1736 .append(isIndentNotParentFont()).append("\n");
1737 buffer.append(" .prntalgnmt= ")
1738 .append(isIndentNotParentAlignment()).append("\n");
1739 buffer.append(" .borderflag= ")
1740 .append(isIndentNotParentBorder()).append("\n");
1741 buffer.append(" .paternflag= ")
1742 .append(isIndentNotParentPattern()).append("\n");
1743 buffer.append(" .celloption= ")
1744 .append(isIndentNotParentCellOptions()).append("\n");
1745 buffer.append(" .borderoptns = ")
1746 .append(Integer.toHexString(getBorderOptions())).append("\n");
1747 buffer.append(" .lftln = ")
1748 .append(Integer.toHexString(getBorderLeft())).append("\n");
1749 buffer.append(" .rgtln = ")
1750 .append(Integer.toHexString(getBorderRight())).append("\n");
1751 buffer.append(" .topln = ")
1752 .append(Integer.toHexString(getBorderTop())).append("\n");
1753 buffer.append(" .btmln = ")
1754 .append(Integer.toHexString(getBorderBottom())).append("\n");
1755 buffer.append(" .paleteoptns = ")
1756 .append(Integer.toHexString(getPaletteOptions())).append("\n");
1757 buffer.append(" .leftborder= ")
1758 .append(Integer.toHexString(getLeftBorderPaletteIdx()))
1759 .append("\n");
1760 buffer.append(" .rghtborder= ")
1761 .append(Integer.toHexString(getRightBorderPaletteIdx()))
1762 .append("\n");
1763 buffer.append(" .diag = ")
1764 .append(Integer.toHexString(getDiag())).append("\n");
1765 buffer.append(" .paleteoptn2 = ")
1766 .append(Integer.toHexString(getAdtlPaletteOptions()))
1767 .append("\n");
1768 buffer.append(" .topborder = ")
1769 .append(Integer.toHexString(getTopBorderPaletteIdx()))
1770 .append("\n");
1771 buffer.append(" .botmborder= ")
1772 .append(Integer.toHexString(getBottomBorderPaletteIdx()))
1773 .append("\n");
1774 buffer.append(" .adtldiag = ")
1775 .append(Integer.toHexString(getAdtlDiag())).append("\n");
1776 buffer.append(" .diaglnstyl= ")
1777 .append(Integer.toHexString(getAdtlDiagLineStyle())).append("\n");
1778 buffer.append(" .fillpattrn= ")
1779 .append(Integer.toHexString(getAdtlFillPattern())).append("\n");
1780 buffer.append(" .fillpaloptn = ")
1781 .append(Integer.toHexString(getFillPaletteOptions()))
1782 .append("\n");
1783 buffer.append(" .foreground= ")
1784 .append(Integer.toHexString(getFillForeground())).append("\n");
1785 buffer.append(" .background= ")
1786 .append(Integer.toHexString(getFillBackground())).append("\n");
1787 buffer.append("[/EXTENDEDFORMAT]\n");
1788 return buffer.toString();
1791 public int serialize(int offset, byte [] data)
1793 LittleEndian.putShort(data, 0 + offset, sid);
1794 LittleEndian.putShort(data, 2 + offset,
1795 ( short ) (20)); // 24 - 4(sid/len)
1796 LittleEndian.putShort(data, 4 + offset, getFontIndex());
1797 LittleEndian.putShort(data, 6 + offset, getFormatIndex());
1798 LittleEndian.putShort(data, 8 + offset, getCellOptions());
1799 LittleEndian.putShort(data, 10 + offset, getAlignmentOptions());
1800 LittleEndian.putShort(data, 12 + offset, getIndentionOptions());
1801 LittleEndian.putShort(data, 14 + offset, getBorderOptions());
1802 LittleEndian.putShort(data, 16 + offset, getPaletteOptions());
1803 LittleEndian.putInt(data, 18 + offset, getAdtlPaletteOptions());
1804 LittleEndian.putShort(data, 22 + offset, getFillPaletteOptions());
1805 return getRecordSize();
1808 public int getRecordSize()
1810 return 24;
1813 public short getSid()
1815 return sid;
1819 * Clones all the style information from another
1820 * ExtendedFormatRecord, onto this one. This
1821 * will then hold all the same style options.
1823 * If The source ExtendedFormatRecord comes from
1824 * a different Workbook, you will need to sort
1825 * out the font and format indicies yourself!
1827 public void cloneStyleFrom(ExtendedFormatRecord source) {
1828 field_1_font_index = source.field_1_font_index;
1829 field_2_format_index = source.field_2_format_index;
1830 field_3_cell_options = source.field_3_cell_options;
1831 field_4_alignment_options = source.field_4_alignment_options;
1832 field_5_indention_options = source.field_5_indention_options;
1833 field_6_border_options = source.field_6_border_options;
1834 field_7_palette_options = source.field_7_palette_options;
1835 field_8_adtl_palette_options = source.field_8_adtl_palette_options;
1836 field_9_fill_palette_options = source.field_9_fill_palette_options;
1839 public int hashCode() {
1840 final int prime = 31;
1841 int result = 1;
1842 result = prime * result + field_1_font_index;
1843 result = prime * result + field_2_format_index;
1844 result = prime * result + field_3_cell_options;
1845 result = prime * result + field_4_alignment_options;
1846 result = prime * result + field_5_indention_options;
1847 result = prime * result + field_6_border_options;
1848 result = prime * result + field_7_palette_options;
1849 result = prime * result + field_8_adtl_palette_options;
1850 result = prime * result + field_9_fill_palette_options;
1851 return result;
1855 * Will consider two different records with the same
1856 * contents as equals, as the various indexes
1857 * that matter are embedded in the records
1859 public boolean equals(Object obj) {
1860 if (this == obj)
1861 return true;
1862 if (obj == null)
1863 return false;
1864 if (obj instanceof ExtendedFormatRecord) {
1865 final ExtendedFormatRecord other = (ExtendedFormatRecord) obj;
1866 if (field_1_font_index != other.field_1_font_index)
1867 return false;
1868 if (field_2_format_index != other.field_2_format_index)
1869 return false;
1870 if (field_3_cell_options != other.field_3_cell_options)
1871 return false;
1872 if (field_4_alignment_options != other.field_4_alignment_options)
1873 return false;
1874 if (field_5_indention_options != other.field_5_indention_options)
1875 return false;
1876 if (field_6_border_options != other.field_6_border_options)
1877 return false;
1878 if (field_7_palette_options != other.field_7_palette_options)
1879 return false;
1880 if (field_8_adtl_palette_options != other.field_8_adtl_palette_options)
1881 return false;
1882 if (field_9_fill_palette_options != other.field_9_fill_palette_options)
1883 return false;
1884 return true;
1886 return false;