Partial fix for bug 45570 - Converted instance BitField fields to static

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@683132 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Josh Micich 2008-08-06 06:27:39 +00:00
parent 1459d3eb3b
commit 01dcfa626a
27 changed files with 354 additions and 505 deletions

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The area format record is used to define the colours and patterns for an area. * The area format record is used to define the colours and patterns for an area.
@ -30,16 +29,16 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class AreaFormatRecord public final class AreaFormatRecord extends Record {
extends Record public final static short sid = 0x100A;
{
public final static short sid = 0x100a; private static final BitField automatic = BitFieldFactory.getInstance(0x1);
private static final BitField invert = BitFieldFactory.getInstance(0x2);
private int field_1_foregroundColor; private int field_1_foregroundColor;
private int field_2_backgroundColor; private int field_2_backgroundColor;
private short field_3_pattern; private short field_3_pattern;
private short field_4_formatFlags; private short field_4_formatFlags;
private BitField automatic = BitFieldFactory.getInstance(0x1);
private BitField invert = BitFieldFactory.getInstance(0x2);
private short field_5_forecolorIndex; private short field_5_forecolorIndex;
private short field_6_backcolorIndex; private short field_6_backcolorIndex;
@ -297,10 +296,4 @@ public class AreaFormatRecord
{ {
return invert.isSet(field_4_formatFlags); return invert.isSet(field_4_formatFlags);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The area record is used to define a area chart. * The area record is used to define a area chart.
@ -30,14 +29,12 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class AreaRecord public final class AreaRecord extends Record {
extends Record
{
public final static short sid = 0x101A; public final static short sid = 0x101A;
private short field_1_formatFlags; private short field_1_formatFlags;
private BitField stacked = BitFieldFactory.getInstance(0x1); private static final BitField stacked = BitFieldFactory.getInstance(0x1);
private BitField displayAsPercentage = BitFieldFactory.getInstance(0x2); private static final BitField displayAsPercentage = BitFieldFactory.getInstance(0x2);
private BitField shadow = BitFieldFactory.getInstance(0x4); private static final BitField shadow = BitFieldFactory.getInstance(0x4);
public AreaRecord() public AreaRecord()
@ -197,10 +194,4 @@ public class AreaRecord
{ {
return shadow.isSet(field_1_formatFlags); return shadow.isSet(field_1_formatFlags);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The axis options record provides unit information and other various tidbits about the axis. * The axis options record provides unit information and other various tidbits about the axis.
@ -30,27 +29,27 @@ import org.apache.poi.util.*;
* @author Andrew C. Oliver(acoliver at apache.org) * @author Andrew C. Oliver(acoliver at apache.org)
*/ */
public class AxisOptionsRecord public final class AxisOptionsRecord extends Record {
extends Record public final static short sid = 0x1062;
{
public final static short sid = 0x1062; private static final BitField defaultMinimum = BitFieldFactory.getInstance(0x01);
private short field_1_minimumCategory; private static final BitField defaultMaximum = BitFieldFactory.getInstance(0x02);
private short field_2_maximumCategory; private static final BitField defaultMajor = BitFieldFactory.getInstance(0x04);
private short field_3_majorUnitValue; private static final BitField defaultMinorUnit = BitFieldFactory.getInstance(0x08);
private short field_4_majorUnit; private static final BitField isDate = BitFieldFactory.getInstance(0x10);
private short field_5_minorUnitValue; private static final BitField defaultBase = BitFieldFactory.getInstance(0x20);
private short field_6_minorUnit; private static final BitField defaultCross = BitFieldFactory.getInstance(0x40);
private short field_7_baseUnit; private static final BitField defaultDateSettings = BitFieldFactory.getInstance(0x80);
private short field_8_crossingPoint;
private short field_9_options; private short field_1_minimumCategory;
private BitField defaultMinimum = BitFieldFactory.getInstance(0x1); private short field_2_maximumCategory;
private BitField defaultMaximum = BitFieldFactory.getInstance(0x2); private short field_3_majorUnitValue;
private BitField defaultMajor = BitFieldFactory.getInstance(0x4); private short field_4_majorUnit;
private BitField defaultMinorUnit = BitFieldFactory.getInstance(0x8); private short field_5_minorUnitValue;
private BitField isDate = BitFieldFactory.getInstance(0x10); private short field_6_minorUnit;
private BitField defaultBase = BitFieldFactory.getInstance(0x20); private short field_7_baseUnit;
private BitField defaultCross = BitFieldFactory.getInstance(0x40); private short field_8_crossingPoint;
private BitField defaultDateSettings = BitFieldFactory.getInstance(0x80); private short field_9_options;
public AxisOptionsRecord() public AxisOptionsRecord()
@ -488,10 +487,4 @@ public class AxisOptionsRecord
{ {
return defaultDateSettings.isSet(field_9_options); return defaultDateSettings.isSet(field_9_options);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The bar record is used to define a bar chart. * The bar record is used to define a bar chart.
@ -30,17 +29,17 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class BarRecord public final class BarRecord extends Record {
extends Record public final static short sid = 0x1017;
{
public final static short sid = 0x1017; private static final BitField horizontal = BitFieldFactory.getInstance(0x1);
private static final BitField stacked = BitFieldFactory.getInstance(0x2);
private static final BitField displayAsPercentage = BitFieldFactory.getInstance(0x4);
private static final BitField shadow = BitFieldFactory.getInstance(0x8);
private short field_1_barSpace; private short field_1_barSpace;
private short field_2_categorySpace; private short field_2_categorySpace;
private short field_3_formatFlags; private short field_3_formatFlags;
private BitField horizontal = BitFieldFactory.getInstance(0x1);
private BitField stacked = BitFieldFactory.getInstance(0x2);
private BitField displayAsPercentage = BitFieldFactory.getInstance(0x4);
private BitField shadow = BitFieldFactory.getInstance(0x8);
public BarRecord() public BarRecord()
@ -264,10 +263,4 @@ public class BarRecord
{ {
return shadow.isSet(field_3_formatFlags); return shadow.isSet(field_3_formatFlags);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,10 +14,10 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory; import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.StringUtil; import org.apache.poi.util.StringUtil;
@ -33,12 +32,10 @@ import org.apache.poi.util.StringUtil;
* @author Sergei Kozello (sergeikozello at mail.ru) * @author Sergei Kozello (sergeikozello at mail.ru)
* @version 2.0-pre * @version 2.0-pre
*/ */
public final class BoundSheetRecord extends Record {
public final static short sid = 0x0085;
public class BoundSheetRecord private static final BitField hiddenFlag = BitFieldFactory.getInstance(0x01);
extends Record
{
private static final short HIDDEN_FLAG_MASK = 0x01;
public final static short sid = 0x85;
private int field_1_position_of_BOF; private int field_1_position_of_BOF;
private short field_2_option_flags; private short field_2_option_flags;
private byte field_3_sheetname_length; private byte field_3_sheetname_length;
@ -305,10 +302,10 @@ public class BoundSheetRecord
} }
public boolean isHidden() { public boolean isHidden() {
return BitFieldFactory.getInstance(HIDDEN_FLAG_MASK).isSet(field_2_option_flags); return hiddenFlag.isSet(field_2_option_flags);
} }
public void setHidden(boolean hidden) { public void setHidden(boolean hidden) {
field_2_option_flags = BitFieldFactory.getInstance(HIDDEN_FLAG_MASK).setShortBoolean(field_2_option_flags, hidden); field_2_option_flags = hiddenFlag.setShortBoolean(field_2_option_flags, hidden);
} }
} }

View File

@ -31,8 +31,7 @@ import org.apache.poi.util.LittleEndian;
* Conditional Formatting Rule Record. * Conditional Formatting Rule Record.
* @author Dmitriy Kumshayev * @author Dmitriy Kumshayev
*/ */
public final class CFRuleRecord extends Record public final class CFRuleRecord extends Record {
{
public static final short sid = 0x01B1; public static final short sid = 0x01B1;

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* This record refers to a category or series axis and is used to specify label/tickmark frequency. * This record refers to a category or series axis and is used to specify label/tickmark frequency.
@ -30,17 +29,17 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class CategorySeriesAxisRecord public final class CategorySeriesAxisRecord extends Record {
extends Record public final static short sid = 0x1020;
{
public final static short sid = 0x1020; private static final BitField valueAxisCrossing = BitFieldFactory.getInstance(0x1);
private static final BitField crossesFarRight = BitFieldFactory.getInstance(0x2);
private static final BitField reversed = BitFieldFactory.getInstance(0x4);
private short field_1_crossingPoint; private short field_1_crossingPoint;
private short field_2_labelFrequency; private short field_2_labelFrequency;
private short field_3_tickMarkFrequency; private short field_3_tickMarkFrequency;
private short field_4_options; private short field_4_options;
private BitField valueAxisCrossing = BitFieldFactory.getInstance(0x1);
private BitField crossesFarRight = BitFieldFactory.getInstance(0x2);
private BitField reversed = BitFieldFactory.getInstance(0x4);
public CategorySeriesAxisRecord() public CategorySeriesAxisRecord()
@ -268,10 +267,4 @@ public class CategorySeriesAxisRecord
{ {
return reversed.isSet(field_4_options); return reversed.isSet(field_4_options);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,12 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.BitField; import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory; import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndian;
/** /**
* Class ChartFormatRecord * Class ChartFormatRecord
@ -30,19 +28,17 @@ import org.apache.poi.util.BitFieldFactory;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
* @version %I%, %G% * @version %I%, %G%
*/ */
public final class ChartFormatRecord extends Record {
public class ChartFormatRecord
extends Record
{
public static final short sid = 0x1014; public static final short sid = 0x1014;
private static final BitField varyDisplayPattern = BitFieldFactory.getInstance(0x01);
// ignored? // ignored?
private int field1_x_position; // lower left private int field1_x_position; // lower left
private int field2_y_position; // lower left private int field2_y_position; // lower left
private int field3_width; private int field3_width;
private int field4_height; private int field4_height;
private short field5_grbit; private short field5_grbit;
private BitField varyDisplayPattern = BitFieldFactory.getInstance(0x01);
public ChartFormatRecord() public ChartFormatRecord()
{ {

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,63 +14,64 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The common object data record is used to store all common preferences for an excel object. * The common object data record is used to store all common preferences for an excel object.
* NOTE: This source is automatically generated please do not modify this file. Either subclass or * NOTE: This source is automatically generated please do not modify this file. Either subclass or
* remove the record in src/records/definitions. * remove the record in src/records/definitions.
*
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class CommonObjectDataSubRecord public final class CommonObjectDataSubRecord extends SubRecord {
extends SubRecord public final static short sid = 0x0015;
{
public final static short sid = 0x15; private static final BitField locked = BitFieldFactory.getInstance(0x0001);
private static final BitField printable = BitFieldFactory.getInstance(0x0010);
private static final BitField autofill = BitFieldFactory.getInstance(0x2000);
private static final BitField autoline = BitFieldFactory.getInstance(0x4000);
public final static short OBJECT_TYPE_GROUP = 0;
public final static short OBJECT_TYPE_LINE = 1;
public final static short OBJECT_TYPE_RECTANGLE = 2;
public final static short OBJECT_TYPE_OVAL = 3;
public final static short OBJECT_TYPE_ARC = 4;
public final static short OBJECT_TYPE_CHART = 5;
public final static short OBJECT_TYPE_TEXT = 6;
public final static short OBJECT_TYPE_BUTTON = 7;
public final static short OBJECT_TYPE_PICTURE = 8;
public final static short OBJECT_TYPE_POLYGON = 9;
public final static short OBJECT_TYPE_RESERVED1 = 10;
public final static short OBJECT_TYPE_CHECKBOX = 11;
public final static short OBJECT_TYPE_OPTION_BUTTON = 12;
public final static short OBJECT_TYPE_EDIT_BOX = 13;
public final static short OBJECT_TYPE_LABEL = 14;
public final static short OBJECT_TYPE_DIALOG_BOX = 15;
public final static short OBJECT_TYPE_SPINNER = 16;
public final static short OBJECT_TYPE_SCROLL_BAR = 17;
public final static short OBJECT_TYPE_LIST_BOX = 18;
public final static short OBJECT_TYPE_GROUP_BOX = 19;
public final static short OBJECT_TYPE_COMBO_BOX = 20;
public final static short OBJECT_TYPE_RESERVED2 = 21;
public final static short OBJECT_TYPE_RESERVED3 = 22;
public final static short OBJECT_TYPE_RESERVED4 = 23;
public final static short OBJECT_TYPE_RESERVED5 = 24;
public final static short OBJECT_TYPE_COMMENT = 25;
public final static short OBJECT_TYPE_RESERVED6 = 26;
public final static short OBJECT_TYPE_RESERVED7 = 27;
public final static short OBJECT_TYPE_RESERVED8 = 28;
public final static short OBJECT_TYPE_RESERVED9 = 29;
public final static short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING = 30;
private short field_1_objectType; private short field_1_objectType;
public final static short OBJECT_TYPE_GROUP = 0;
public final static short OBJECT_TYPE_LINE = 1;
public final static short OBJECT_TYPE_RECTANGLE = 2;
public final static short OBJECT_TYPE_OVAL = 3;
public final static short OBJECT_TYPE_ARC = 4;
public final static short OBJECT_TYPE_CHART = 5;
public final static short OBJECT_TYPE_TEXT = 6;
public final static short OBJECT_TYPE_BUTTON = 7;
public final static short OBJECT_TYPE_PICTURE = 8;
public final static short OBJECT_TYPE_POLYGON = 9;
public final static short OBJECT_TYPE_RESERVED1 = 10;
public final static short OBJECT_TYPE_CHECKBOX = 11;
public final static short OBJECT_TYPE_OPTION_BUTTON = 12;
public final static short OBJECT_TYPE_EDIT_BOX = 13;
public final static short OBJECT_TYPE_LABEL = 14;
public final static short OBJECT_TYPE_DIALOG_BOX = 15;
public final static short OBJECT_TYPE_SPINNER = 16;
public final static short OBJECT_TYPE_SCROLL_BAR = 17;
public final static short OBJECT_TYPE_LIST_BOX = 18;
public final static short OBJECT_TYPE_GROUP_BOX = 19;
public final static short OBJECT_TYPE_COMBO_BOX = 20;
public final static short OBJECT_TYPE_RESERVED2 = 21;
public final static short OBJECT_TYPE_RESERVED3 = 22;
public final static short OBJECT_TYPE_RESERVED4 = 23;
public final static short OBJECT_TYPE_RESERVED5 = 24;
public final static short OBJECT_TYPE_COMMENT = 25;
public final static short OBJECT_TYPE_RESERVED6 = 26;
public final static short OBJECT_TYPE_RESERVED7 = 27;
public final static short OBJECT_TYPE_RESERVED8 = 28;
public final static short OBJECT_TYPE_RESERVED9 = 29;
public final static short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING = 30;
private short field_2_objectId; private short field_2_objectId;
private short field_3_option; private short field_3_option;
private BitField locked = BitFieldFactory.getInstance(0x1);
private BitField printable = BitFieldFactory.getInstance(0x10);
private BitField autofill = BitFieldFactory.getInstance(0x2000);
private BitField autoline = BitFieldFactory.getInstance(0x4000);
private int field_4_reserved1; private int field_4_reserved1;
private int field_5_reserved2; private int field_5_reserved2;
private int field_6_reserved3; private int field_6_reserved3;
@ -431,8 +431,4 @@ public class CommonObjectDataSubRecord
{ {
return autoline.isSet(field_3_option); return autoline.isSet(field_3_option);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The dat record is used to store options for the chart. * The dat record is used to store options for the chart.
@ -30,15 +29,15 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class DatRecord public final class DatRecord extends Record {
extends Record public final static short sid = 0x1063;
{
public final static short sid = 0x1063; private static final BitField horizontalBorder = BitFieldFactory.getInstance(0x1);
private static final BitField verticalBorder = BitFieldFactory.getInstance(0x2);
private static final BitField border = BitFieldFactory.getInstance(0x4);
private static final BitField showSeriesKey = BitFieldFactory.getInstance(0x8);
private short field_1_options; private short field_1_options;
private BitField horizontalBorder = BitFieldFactory.getInstance(0x1);
private BitField verticalBorder = BitFieldFactory.getInstance(0x2);
private BitField border = BitFieldFactory.getInstance(0x4);
private BitField showSeriesKey = BitFieldFactory.getInstance(0x8);
public DatRecord() public DatRecord()
@ -216,10 +215,4 @@ public class DatRecord
{ {
return showSeriesKey.isSet(field_1_options); return showSeriesKey.isSet(field_1_options);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,30 +14,30 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The data format record is used to index into a series. * The data format record is used to index into a series.
* NOTE: This source is automatically generated please do not modify this file. Either subclass or * NOTE: This source is automatically generated please do not modify this file. Either subclass or
* remove the record in src/records/definitions. * remove the record in src/records/definitions.
*
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class DataFormatRecord public final class DataFormatRecord extends Record {
extends Record public final static short sid = 0x1006;
{
public final static short sid = 0x1006; private static final BitField useExcel4Colors = BitFieldFactory.getInstance(0x1);
private short field_1_pointNumber;
private short field_2_seriesIndex; private short field_1_pointNumber;
private short field_3_seriesNumber; private short field_2_seriesIndex;
private short field_4_formatFlags; private short field_3_seriesNumber;
private BitField useExcel4Colors = BitFieldFactory.getInstance(0x1); private short field_4_formatFlags;
public DataFormatRecord() public DataFormatRecord()
@ -228,10 +227,4 @@ public class DataFormatRecord
{ {
return useExcel4Colors.isSet(field_4_formatFlags); return useExcel4Colors.isSet(field_4_formatFlags);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,7 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
/*
* FormulaRecord.java
*
* Created on October 28, 2001, 5:44 PM
*/
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import java.util.List; import java.util.List;
@ -39,24 +32,22 @@ import org.apache.poi.util.LittleEndian;
* @author Jason Height (jheight at chariot dot net dot au) * @author Jason Height (jheight at chariot dot net dot au)
* @version 2.0-pre * @version 2.0-pre
*/ */
public final class FormulaRecord public final class FormulaRecord
extends Record extends Record
implements CellValueRecordInterface, Comparable implements CellValueRecordInterface, Comparable
{ {
public static final short sid = public static final short sid = 0x0006; // docs say 406...because of a bug Microsoft support site article #Q184647)
0x06; // docs say 406...because of a bug Microsoft support site article #Q184647)
private static final BitField alwaysCalc = BitFieldFactory.getInstance(0x0001);
//private short field_1_row; private static final BitField calcOnLoad = BitFieldFactory.getInstance(0x0002);
private static final BitField sharedFormula = BitFieldFactory.getInstance(0x0008);
private int field_1_row; private int field_1_row;
private short field_2_column; private short field_2_column;
private short field_3_xf; private short field_3_xf;
private double field_4_value; private double field_4_value;
private short field_5_options; private short field_5_options;
private BitField alwaysCalc = BitFieldFactory.getInstance(0x0001);
private BitField calcOnLoad = BitFieldFactory.getInstance(0x0002);
private BitField sharedFormula = BitFieldFactory.getInstance(0x0008);
private int field_6_zero; private int field_6_zero;
private short field_7_expression_len; private short field_7_expression_len;
private Stack field_8_parsed_expr; private Stack field_8_parsed_expr;

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The frame record indicates whether there is a border around the displayed text of a chart. * The frame record indicates whether there is a border around the displayed text of a chart.
@ -30,16 +29,16 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class FrameRecord public final class FrameRecord extends Record {
extends Record public final static short sid = 0x1032;
{
public final static short sid = 0x1032; private static final BitField autoSize = BitFieldFactory.getInstance(0x1);
private static final BitField autoPosition = BitFieldFactory.getInstance(0x2);
private short field_1_borderType; private short field_1_borderType;
public final static short BORDER_TYPE_REGULAR = 0; public final static short BORDER_TYPE_REGULAR = 0;
public final static short BORDER_TYPE_SHADOW = 1; public final static short BORDER_TYPE_SHADOW = 1;
private short field_2_options; private short field_2_options;
private BitField autoSize = BitFieldFactory.getInstance(0x1);
private BitField autoPosition = BitFieldFactory.getInstance(0x2);
public FrameRecord() public FrameRecord()
@ -211,10 +210,4 @@ public class FrameRecord
{ {
return autoPosition.isSet(field_2_options); return autoPosition.isSet(field_2_options);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* Defines a legend for a chart. * Defines a legend for a chart.
@ -30,10 +29,16 @@ import org.apache.poi.util.*;
* @author Andrew C. Oliver (acoliver at apache.org) * @author Andrew C. Oliver (acoliver at apache.org)
*/ */
public class LegendRecord public final class LegendRecord extends Record {
extends Record public final static short sid = 0x1015;
{
public final static short sid = 0x1015; private static final BitField autoPosition = BitFieldFactory.getInstance(0x01);
private static final BitField autoSeries = BitFieldFactory.getInstance(0x02);
private static final BitField autoXPositioning = BitFieldFactory.getInstance(0x04);
private static final BitField autoYPositioning = BitFieldFactory.getInstance(0x08);
private static final BitField vertical = BitFieldFactory.getInstance(0x10);
private static final BitField dataTable = BitFieldFactory.getInstance(0x20);
private int field_1_xAxisUpperLeft; private int field_1_xAxisUpperLeft;
private int field_2_yAxisUpperLeft; private int field_2_yAxisUpperLeft;
private int field_3_xSize; private int field_3_xSize;
@ -50,12 +55,6 @@ public class LegendRecord
public final static byte SPACING_MEDIUM = 1; public final static byte SPACING_MEDIUM = 1;
public final static byte SPACING_OPEN = 2; public final static byte SPACING_OPEN = 2;
private short field_7_options; private short field_7_options;
private BitField autoPosition = BitFieldFactory.getInstance(0x1);
private BitField autoSeries = BitFieldFactory.getInstance(0x2);
private BitField autoXPositioning = BitFieldFactory.getInstance(0x4);
private BitField autoYPositioning = BitFieldFactory.getInstance(0x8);
private BitField vertical = BitFieldFactory.getInstance(0x10);
private BitField dataTable = BitFieldFactory.getInstance(0x20);
public LegendRecord() public LegendRecord()
@ -437,10 +436,4 @@ public class LegendRecord
{ {
return dataTable.isSet(field_7_options); return dataTable.isSet(field_7_options);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* Describes a line format record. The line format record controls how a line on a chart appears. * Describes a line format record. The line format record controls how a line on a chart appears.
@ -30,10 +29,13 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class LineFormatRecord public final class LineFormatRecord extends Record {
extends Record public final static short sid = 0x1007;
{
public final static short sid = 0x1007; private static final BitField auto = BitFieldFactory.getInstance(0x1);
private static final BitField drawTicks = BitFieldFactory.getInstance(0x4);
private static final BitField unknown = BitFieldFactory.getInstance(0x4);
private int field_1_lineColor; private int field_1_lineColor;
private short field_2_linePattern; private short field_2_linePattern;
public final static short LINE_PATTERN_SOLID = 0; public final static short LINE_PATTERN_SOLID = 0;
@ -51,9 +53,6 @@ public class LineFormatRecord
public final static short WEIGHT_MEDIUM = 1; public final static short WEIGHT_MEDIUM = 1;
public final static short WEIGHT_WIDE = 2; public final static short WEIGHT_WIDE = 2;
private short field_4_format; private short field_4_format;
private BitField auto = BitFieldFactory.getInstance(0x1);
private BitField drawTicks = BitFieldFactory.getInstance(0x4);
private BitField unknown = BitFieldFactory.getInstance(0x4);
private short field_5_colourPaletteIndex; private short field_5_colourPaletteIndex;
@ -342,10 +341,4 @@ public class LineFormatRecord
{ {
return unknown.isSet(field_4_format); return unknown.isSet(field_4_format);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* Describes a linked data record. This record referes to the series data or text. * Describes a linked data record. This record referes to the series data or text.
@ -30,10 +29,11 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class LinkedDataRecord public final class LinkedDataRecord extends Record {
extends Record public final static short sid = 0x1051;
{
public final static short sid = 0x1051; private static final BitField customNumberFormat= BitFieldFactory.getInstance(0x1);
private byte field_1_linkType; private byte field_1_linkType;
public final static byte LINK_TYPE_TITLE_OR_TEXT = 0; public final static byte LINK_TYPE_TITLE_OR_TEXT = 0;
public final static byte LINK_TYPE_VALUES = 1; public final static byte LINK_TYPE_VALUES = 1;
@ -45,7 +45,6 @@ public class LinkedDataRecord
public final static byte REFERENCE_TYPE_NOT_USED = 3; public final static byte REFERENCE_TYPE_NOT_USED = 3;
public final static byte REFERENCE_TYPE_ERROR_REPORTED = 4; public final static byte REFERENCE_TYPE_ERROR_REPORTED = 4;
private short field_3_options; private short field_3_options;
private BitField customNumberFormat = BitFieldFactory.getInstance(0x1);
private short field_4_indexNumberFmtRecord; private short field_4_indexNumberFmtRecord;
private LinkedDataFormulaField field_5_formulaOfLink; private LinkedDataFormulaField field_5_formulaOfLink;
@ -86,7 +85,7 @@ public class LinkedDataRecord
field_2_referenceType = in.readByte(); field_2_referenceType = in.readByte();
field_3_options = in.readShort(); field_3_options = in.readShort();
field_4_indexNumberFmtRecord = in.readShort(); field_4_indexNumberFmtRecord = in.readShort();
field_5_formulaOfLink = new org.apache.poi.hssf.record.LinkedDataFormulaField(); field_5_formulaOfLink = new LinkedDataFormulaField();
field_5_formulaOfLink.fillField(in); field_5_formulaOfLink.fillField(in);
} }
@ -156,7 +155,7 @@ public class LinkedDataRecord
rec.field_2_referenceType = field_2_referenceType; rec.field_2_referenceType = field_2_referenceType;
rec.field_3_options = field_3_options; rec.field_3_options = field_3_options;
rec.field_4_indexNumberFmtRecord = field_4_indexNumberFmtRecord; rec.field_4_indexNumberFmtRecord = field_4_indexNumberFmtRecord;
rec.field_5_formulaOfLink = ((org.apache.poi.hssf.record.LinkedDataFormulaField)field_5_formulaOfLink.clone());; rec.field_5_formulaOfLink = ((LinkedDataFormulaField)field_5_formulaOfLink.clone());;
return rec; return rec;
} }
@ -286,10 +285,4 @@ public class LinkedDataRecord
{ {
return customNumberFormat.isSet(field_3_options); return customNumberFormat.isSet(field_3_options);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The series label record defines the type of label associated with the data format record. * The series label record defines the type of label associated with the data format record.
@ -30,18 +29,17 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class SeriesLabelsRecord public final class SeriesLabelsRecord extends Record {
extends Record public final static short sid = 0x100c;
{
public final static short sid = 0x100c;
private short field_1_formatFlags;
private BitField showActual = BitFieldFactory.getInstance(0x1);
private BitField showPercent = BitFieldFactory.getInstance(0x2);
private BitField labelAsPercentage = BitFieldFactory.getInstance(0x4);
private BitField smoothedLine = BitFieldFactory.getInstance(0x8);
private BitField showLabel = BitFieldFactory.getInstance(0x10);
private BitField showBubbleSizes = BitFieldFactory.getInstance(0x20);
private static final BitField showActual = BitFieldFactory.getInstance(0x01);
private static final BitField showPercent = BitFieldFactory.getInstance(0x02);
private static final BitField labelAsPercentage = BitFieldFactory.getInstance(0x04);
private static final BitField smoothedLine = BitFieldFactory.getInstance(0x08);
private static final BitField showLabel = BitFieldFactory.getInstance(0x10);
private static final BitField showBubbleSizes = BitFieldFactory.getInstance(0x20);
private short field_1_formatFlags;
public SeriesLabelsRecord() public SeriesLabelsRecord()
{ {
@ -256,10 +254,4 @@ public class SeriesLabelsRecord
{ {
return showBubbleSizes.isSet(field_1_formatFlags); return showBubbleSizes.isSet(field_1_formatFlags);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* Describes a chart sheet properties record. * Describes a chart sheet properties record.
@ -30,16 +29,16 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class SheetPropertiesRecord public final class SheetPropertiesRecord extends Record {
extends Record public final static short sid = 0x1044;
{
public final static short sid = 0x1044; private static final BitField chartTypeManuallyFormatted = BitFieldFactory.getInstance(0x01);
private static final BitField plotVisibleOnly = BitFieldFactory.getInstance(0x02);
private static final BitField doNotSizeWithWindow = BitFieldFactory.getInstance(0x04);
private static final BitField defaultPlotDimensions = BitFieldFactory.getInstance(0x08);
private static final BitField autoPlotArea = BitFieldFactory.getInstance(0x10);
private short field_1_flags; private short field_1_flags;
private BitField chartTypeManuallyFormatted = BitFieldFactory.getInstance(0x1);
private BitField plotVisibleOnly = BitFieldFactory.getInstance(0x2);
private BitField doNotSizeWithWindow = BitFieldFactory.getInstance(0x4);
private BitField defaultPlotDimensions = BitFieldFactory.getInstance(0x8);
private BitField autoPlotArea = BitFieldFactory.getInstance(0x10);
private byte field_2_empty; private byte field_2_empty;
public final static byte EMPTY_NOT_PLOTTED = 0; public final static byte EMPTY_NOT_PLOTTED = 0;
public final static byte EMPTY_ZERO = 1; public final static byte EMPTY_ZERO = 1;
@ -274,10 +273,4 @@ public class SheetPropertiesRecord
{ {
return autoPlotArea.isSet(field_1_flags); return autoPlotArea.isSet(field_1_flags);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,14 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.StringUtil;
import org.apache.poi.util.BitField; import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory; import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.StringUtil;
/** /**
* Title: Style Record<P> * Title: Style Record<P>
@ -32,11 +30,11 @@ import org.apache.poi.util.BitFieldFactory;
* @author aviks : string fixes for UserDefined Style * @author aviks : string fixes for UserDefined Style
* @version 2.0-pre * @version 2.0-pre
*/ */
public final class StyleRecord extends Record {
public final static short sid = 0x0293;
private static final BitField fHighByte = BitFieldFactory.getInstance(0x01);
public class StyleRecord
extends Record
{
public final static short sid = 0x293;
public final static short STYLE_USER_DEFINED = 0; public final static short STYLE_USER_DEFINED = 0;
public final static short STYLE_BUILT_IN = 1; public final static short STYLE_BUILT_IN = 1;
@ -50,7 +48,6 @@ public class StyleRecord
// only for user defined styles // only for user defined styles
private short field_2_name_length; //OO doc says 16 bit length, so we believe private short field_2_name_length; //OO doc says 16 bit length, so we believe
private byte field_3_string_options; private byte field_3_string_options;
private BitField fHighByte;
private String field_4_name; private String field_4_name;
public StyleRecord() public StyleRecord()
@ -77,8 +74,6 @@ public class StyleRecord
protected void fillFields(RecordInputStream in) protected void fillFields(RecordInputStream in)
{ {
fHighByte = BitFieldFactory.getInstance(0x01); //have to init here, since we are being called
//from super, and class level init hasnt been done.
field_1_xf_index = in.readShort(); field_1_xf_index = in.readShort();
if (getType() == STYLE_BUILT_IN) if (getType() == STYLE_BUILT_IN)
{ {

View File

@ -14,8 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record;
import org.apache.poi.hssf.record.formula.TblPtg;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndian;
/** /**
* TableRecord - The record specifies a data table. * TableRecord - The record specifies a data table.
* This record is preceded by a single Formula record that * This record is preceded by a single Formula record that
@ -24,15 +29,18 @@
* *
* See p536 of the June 08 binary docs * See p536 of the June 08 binary docs
*/ */
package org.apache.poi.hssf.record; public final class TableRecord extends Record {
import org.apache.poi.hssf.record.formula.TblPtg;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndian;
public class TableRecord extends Record {
public static final short sid = 566; public static final short sid = 566;
private static final BitField alwaysCalc = BitFieldFactory.getInstance(0x0001);
private static final BitField reserved1 = BitFieldFactory.getInstance(0x0002);
private static final BitField rowOrColInpCell = BitFieldFactory.getInstance(0x0004);
private static final BitField oneOrTwoVar = BitFieldFactory.getInstance(0x0008);
private static final BitField rowDeleted = BitFieldFactory.getInstance(0x0010);
private static final BitField colDeleted = BitFieldFactory.getInstance(0x0020);
private static final BitField reserved2 = BitFieldFactory.getInstance(0x0040);
private static final BitField reserved3 = BitFieldFactory.getInstance(0x0080);
private short field_1_ref_rowFirst; private short field_1_ref_rowFirst;
private short field_2_ref_rowLast; private short field_2_ref_rowLast;
private short field_3_ref_colFirst; private short field_3_ref_colFirst;
@ -45,14 +53,6 @@ public class TableRecord extends Record {
private short field_9_rowInputCol; private short field_9_rowInputCol;
private short field_10_colInputCol; private short field_10_colInputCol;
private BitField alwaysCalc = BitFieldFactory.getInstance(0x0001);
private BitField reserved1 = BitFieldFactory.getInstance(0x0002);
private BitField rowOrColInpCell = BitFieldFactory.getInstance(0x0004);
private BitField oneOrTwoVar = BitFieldFactory.getInstance(0x0008);
private BitField rowDeleted = BitFieldFactory.getInstance(0x0010);
private BitField colDeleted = BitFieldFactory.getInstance(0x0020);
private BitField reserved2 = BitFieldFactory.getInstance(0x0040);
private BitField reserved3 = BitFieldFactory.getInstance(0x0080);
protected void fillFields(RecordInputStream in) { protected void fillFields(RecordInputStream in) {
field_1_ref_rowFirst = in.readShort(); field_1_ref_rowFirst = in.readShort();

View File

@ -32,25 +32,25 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class TextObjectBaseRecord public class TextObjectBaseRecord extends Record {
extends Record
{
public final static short sid = 0x1B6; public final static short sid = 0x1B6;
private static final BitField reserved1 = BitFieldFactory.getInstance(0x0001);
private static final BitField HorizontalTextAlignment = BitFieldFactory.getInstance(0x000E);
private static final BitField VerticalTextAlignment = BitFieldFactory.getInstance(0x0070);
private static final BitField reserved2 = BitFieldFactory.getInstance(0x0180);
private static final BitField textLocked = BitFieldFactory.getInstance(0x0200);
private static final BitField reserved3 = BitFieldFactory.getInstance(0xFC00);
private short field_1_options; private short field_1_options;
private BitField reserved1 = BitFieldFactory.getInstance(0x1);
private BitField HorizontalTextAlignment = BitFieldFactory.getInstance(0x000E);
public final static short HORIZONTAL_TEXT_ALIGNMENT_LEFT_ALIGNED = 1; public final static short HORIZONTAL_TEXT_ALIGNMENT_LEFT_ALIGNED = 1;
public final static short HORIZONTAL_TEXT_ALIGNMENT_CENTERED = 2; public final static short HORIZONTAL_TEXT_ALIGNMENT_CENTERED = 2;
public final static short HORIZONTAL_TEXT_ALIGNMENT_RIGHT_ALIGNED = 3; public final static short HORIZONTAL_TEXT_ALIGNMENT_RIGHT_ALIGNED = 3;
public final static short HORIZONTAL_TEXT_ALIGNMENT_JUSTIFIED = 4; public final static short HORIZONTAL_TEXT_ALIGNMENT_JUSTIFIED = 4;
private BitField VerticalTextAlignment = BitFieldFactory.getInstance(0x0070);
public final static short VERTICAL_TEXT_ALIGNMENT_TOP = 1; public final static short VERTICAL_TEXT_ALIGNMENT_TOP = 1;
public final static short VERTICAL_TEXT_ALIGNMENT_CENTER = 2; public final static short VERTICAL_TEXT_ALIGNMENT_CENTER = 2;
public final static short VERTICAL_TEXT_ALIGNMENT_BOTTOM = 3; public final static short VERTICAL_TEXT_ALIGNMENT_BOTTOM = 3;
public final static short VERTICAL_TEXT_ALIGNMENT_JUSTIFY = 4; public final static short VERTICAL_TEXT_ALIGNMENT_JUSTIFY = 4;
private BitField reserved2 = BitFieldFactory.getInstance(0x0180);
private BitField textLocked = BitFieldFactory.getInstance(0x200);
private BitField reserved3 = BitFieldFactory.getInstance(0xFC00);
private short field_2_textOrientation; private short field_2_textOrientation;
public final static short TEXT_ORIENTATION_NONE = 0; public final static short TEXT_ORIENTATION_NONE = 0;
public final static short TEXT_ORIENTATION_TOP_TO_BOTTOM = 1; public final static short TEXT_ORIENTATION_TOP_TO_BOTTOM = 1;
@ -452,10 +452,4 @@ public class TextObjectBaseRecord
{ {
return reserved3.getShortValue(field_1_options); return reserved3.getShortValue(field_1_options);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The text record is used to define text stored on a chart. * The text record is used to define text stored on a chart.
@ -30,10 +29,26 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class TextRecord public final class TextRecord extends Record {
extends Record
{
public final static short sid = 0x1025; public final static short sid = 0x1025;
private static final BitField dataLabelPlacement = BitFieldFactory.getInstance(0x000F);
private static final BitField autoColor = BitFieldFactory.getInstance(0x0001);
private static final BitField showKey = BitFieldFactory.getInstance(0x0002);
private static final BitField showValue = BitFieldFactory.getInstance(0x0004);
private static final BitField vertical = BitFieldFactory.getInstance(0x0008);
private static final BitField autoGeneratedText = BitFieldFactory.getInstance(0x0010);
private static final BitField generated = BitFieldFactory.getInstance(0x0020);
private static final BitField autoLabelDeleted = BitFieldFactory.getInstance(0x0040);
private static final BitField autoBackground = BitFieldFactory.getInstance(0x0080);
private static final BitField rotation = BitFieldFactory.getInstance(0x0700);
private static final BitField showCategoryLabelAsPercentage = BitFieldFactory.getInstance(0x0800);
private static final BitField showValueAsPercentage = BitFieldFactory.getInstance(0x1000);
private static final BitField showBubbleSizes = BitFieldFactory.getInstance(0x2000);
private static final BitField showLabel = BitFieldFactory.getInstance(0x4000);
private byte field_1_horizontalAlignment; private byte field_1_horizontalAlignment;
public final static byte HORIZONTAL_ALIGNMENT_LEFT = 1; public final static byte HORIZONTAL_ALIGNMENT_LEFT = 1;
public final static byte HORIZONTAL_ALIGNMENT_CENTER = 2; public final static byte HORIZONTAL_ALIGNMENT_CENTER = 2;
@ -53,26 +68,12 @@ public class TextRecord
private int field_7_width; private int field_7_width;
private int field_8_height; private int field_8_height;
private short field_9_options1; private short field_9_options1;
private BitField autoColor = BitFieldFactory.getInstance(0x1);
private BitField showKey = BitFieldFactory.getInstance(0x2);
private BitField showValue = BitFieldFactory.getInstance(0x4);
private BitField vertical = BitFieldFactory.getInstance(0x8);
private BitField autoGeneratedText = BitFieldFactory.getInstance(0x10);
private BitField generated = BitFieldFactory.getInstance(0x20);
private BitField autoLabelDeleted = BitFieldFactory.getInstance(0x40);
private BitField autoBackground = BitFieldFactory.getInstance(0x80);
private BitField rotation = BitFieldFactory.getInstance(0x0700);
public final static short ROTATION_NONE = 0; public final static short ROTATION_NONE = 0;
public final static short ROTATION_TOP_TO_BOTTOM = 1; public final static short ROTATION_TOP_TO_BOTTOM = 1;
public final static short ROTATION_ROTATED_90_DEGREES = 2; public final static short ROTATION_ROTATED_90_DEGREES = 2;
public final static short ROTATION_ROTATED_90_DEGREES_CLOCKWISE = 3; public final static short ROTATION_ROTATED_90_DEGREES_CLOCKWISE = 3;
private BitField showCategoryLabelAsPercentage = BitFieldFactory.getInstance(0x800);
private BitField showValueAsPercentage = BitFieldFactory.getInstance(0x1000);
private BitField showBubbleSizes = BitFieldFactory.getInstance(0x2000);
private BitField showLabel = BitFieldFactory.getInstance(0x4000);
private short field_10_indexOfColorValue; private short field_10_indexOfColorValue;
private short field_11_options2; private short field_11_options2;
private BitField dataLabelPlacement = BitFieldFactory.getInstance(0x000F);
public final static short DATA_LABEL_PLACEMENT_CHART_DEPENDENT = 0; public final static short DATA_LABEL_PLACEMENT_CHART_DEPENDENT = 0;
public final static short DATA_LABEL_PLACEMENT_OUTSIDE = 1; public final static short DATA_LABEL_PLACEMENT_OUTSIDE = 1;
public final static short DATA_LABEL_PLACEMENT_INSIDE = 2; public final static short DATA_LABEL_PLACEMENT_INSIDE = 2;
@ -740,10 +741,4 @@ public class TextRecord
{ {
return dataLabelPlacement.getShortValue(field_11_options2); return dataLabelPlacement.getShortValue(field_11_options2);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The Tick record defines how tick marks and label positioning/formatting * The Tick record defines how tick marks and label positioning/formatting
@ -30,10 +29,14 @@ import org.apache.poi.util.*;
* @author Andrew C. Oliver(acoliver at apache.org) * @author Andrew C. Oliver(acoliver at apache.org)
*/ */
public class TickRecord public final class TickRecord extends Record {
extends Record public final static short sid = 0x101E;
{
public final static short sid = 0x101e; private static final BitField autoTextColor = BitFieldFactory.getInstance(0x1);
private static final BitField autoTextBackground = BitFieldFactory.getInstance(0x2);
private static final BitField rotation = BitFieldFactory.getInstance(0x1c);
private static final BitField autorotate = BitFieldFactory.getInstance(0x20);
private byte field_1_majorTickType; private byte field_1_majorTickType;
private byte field_2_minorTickType; private byte field_2_minorTickType;
private byte field_3_labelPosition; private byte field_3_labelPosition;
@ -44,10 +47,6 @@ public class TickRecord
private int field_8_zero3; private int field_8_zero3;
private int field_9_zero4; private int field_9_zero4;
private short field_10_options; private short field_10_options;
private BitField autoTextColor = BitFieldFactory.getInstance(0x1);
private BitField autoTextBackground = BitFieldFactory.getInstance(0x2);
private BitField rotation = BitFieldFactory.getInstance(0x1c);
private BitField autorotate = BitFieldFactory.getInstance(0x20);
private short field_11_tickColor; private short field_11_tickColor;
private short field_12_zero5; private short field_12_zero5;
@ -442,10 +441,4 @@ public class TickRecord
{ {
return autorotate.isSet(field_10_options); return autorotate.isSet(field_10_options);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,13 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.*; import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndian;
/** /**
* The value range record defines the range of the value axis. * The value range record defines the range of the value axis.
@ -30,25 +29,25 @@ import org.apache.poi.util.*;
* @author Glen Stampoultzis (glens at apache.org) * @author Glen Stampoultzis (glens at apache.org)
*/ */
public class ValueRangeRecord public final class ValueRangeRecord extends Record {
extends Record public final static short sid = 0x101f;
{
public final static short sid = 0x101f; private static final BitField automaticMinimum = BitFieldFactory.getInstance(0x0001);
private static final BitField automaticMaximum = BitFieldFactory.getInstance(0x0002);
private static final BitField automaticMajor = BitFieldFactory.getInstance(0x0004);
private static final BitField automaticMinor = BitFieldFactory.getInstance(0x0008);
private static final BitField automaticCategoryCrossing = BitFieldFactory.getInstance(0x0010);
private static final BitField logarithmicScale = BitFieldFactory.getInstance(0x0020);
private static final BitField valuesInReverse = BitFieldFactory.getInstance(0x0040);
private static final BitField crossCategoryAxisAtMaximum = BitFieldFactory.getInstance(0x0080);
private static final BitField reserved = BitFieldFactory.getInstance(0x0100);
private double field_1_minimumAxisValue; private double field_1_minimumAxisValue;
private double field_2_maximumAxisValue; private double field_2_maximumAxisValue;
private double field_3_majorIncrement; private double field_3_majorIncrement;
private double field_4_minorIncrement; private double field_4_minorIncrement;
private double field_5_categoryAxisCross; private double field_5_categoryAxisCross;
private short field_6_options; private short field_6_options;
private BitField automaticMinimum = BitFieldFactory.getInstance(0x1);
private BitField automaticMaximum = BitFieldFactory.getInstance(0x2);
private BitField automaticMajor = BitFieldFactory.getInstance(0x4);
private BitField automaticMinor = BitFieldFactory.getInstance(0x8);
private BitField automaticCategoryCrossing = BitFieldFactory.getInstance(0x10);
private BitField logarithmicScale = BitFieldFactory.getInstance(0x20);
private BitField valuesInReverse = BitFieldFactory.getInstance(0x40);
private BitField crossCategoryAxisAtMaximum = BitFieldFactory.getInstance(0x80);
private BitField reserved = BitFieldFactory.getInstance(0x100);
public ValueRangeRecord() public ValueRangeRecord()
@ -432,10 +431,4 @@ public class ValueRangeRecord
{ {
return reserved.isSet(field_6_options); return reserved.isSet(field_6_options);
} }
}
} // END OF CLASS

View File

@ -1,4 +1,3 @@
/* ==================================================================== /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with contributor license agreements. See the NOTICE file distributed with
@ -15,7 +14,6 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==================================================================== */ ==================================================================== */
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
@ -31,34 +29,27 @@ import org.apache.poi.util.LittleEndian;
* @author Jason Height (jheight at chariot dot net dot au) * @author Jason Height (jheight at chariot dot net dot au)
* @version 2.0-pre * @version 2.0-pre
*/ */
public final class WindowTwoRecord extends Record {
public class WindowTwoRecord public final static short sid = 0x023E;
extends Record
{
public final static short sid = 0x23e;
private short field_1_options;
// bitfields // bitfields
private BitField displayFormulas = BitFieldFactory.getInstance(0x01); private static final BitField displayFormulas = BitFieldFactory.getInstance(0x01);
private BitField displayGridlines = BitFieldFactory.getInstance(0x02); private static final BitField displayGridlines = BitFieldFactory.getInstance(0x02);
private BitField displayRowColHeadings = BitFieldFactory.getInstance(0x04); private static final BitField displayRowColHeadings = BitFieldFactory.getInstance(0x04);
private BitField freezePanes = BitFieldFactory.getInstance(0x08); private static final BitField freezePanes = BitFieldFactory.getInstance(0x08);
private BitField displayZeros = BitFieldFactory.getInstance(0x10); private static final BitField displayZeros = BitFieldFactory.getInstance(0x10);
private BitField defaultHeader = /** if false use color in field 4 if true use default foreground for headers */
BitFieldFactory.getInstance(0x20); // if false use color in field 4 private static final BitField defaultHeader = BitFieldFactory.getInstance(0x20);
private static final BitField arabic = BitFieldFactory.getInstance(0x040);
// if true use default foreground private static final BitField displayGuts = BitFieldFactory.getInstance(0x080);
// for headers private static final BitField freezePanesNoSplit = BitFieldFactory.getInstance(0x100);
private BitField arabic = private static final BitField selected = BitFieldFactory.getInstance(0x200);
BitFieldFactory.getInstance(0x40); // for our desert dwelling friends private static final BitField active = BitFieldFactory.getInstance(0x400);
private BitField displayGuts = BitFieldFactory.getInstance(0x80); private static final BitField savedInPageBreakPreview = BitFieldFactory.getInstance(0x800);
private BitField freezePanesNoSplit = BitFieldFactory.getInstance(0x100);
private BitField selected = BitFieldFactory.getInstance(0x200);
private BitField active = BitFieldFactory.getInstance(0x400);
private BitField savedInPageBreakPreview = BitFieldFactory.getInstance(0x800);
// 4-7 reserved // 4-7 reserved
// end bitfields // end bitfields
private short field_1_options;
private short field_2_top_row; private short field_2_top_row;
private short field_3_left_col; private short field_3_left_col;
private int field_4_header_color; private int field_4_header_color;

View File

@ -25,7 +25,6 @@ import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory; import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
/** /**
* Title: Area 3D Ptg - 3D reference (Sheet + Area)<P> * Title: Area 3D Ptg - 3D reference (Sheet + Area)<P>
* Description: Defined a area in Extern Sheet. <P> * Description: Defined a area in Extern Sheet. <P>
@ -38,14 +37,16 @@ import org.apache.poi.util.LittleEndian;
public final class Area3DPtg extends OperandPtg implements AreaI { public final class Area3DPtg extends OperandPtg implements AreaI {
public final static byte sid = 0x3b; public final static byte sid = 0x3b;
private final static int SIZE = 11; // 10 + 1 for Ptg private final static int SIZE = 11; // 10 + 1 for Ptg
private static final BitField rowRelative = BitFieldFactory.getInstance(0x8000);
private static final BitField colRelative = BitFieldFactory.getInstance(0x4000);
private short field_1_index_extern_sheet; private short field_1_index_extern_sheet;
private int field_2_first_row; private int field_2_first_row;
private int field_3_last_row; private int field_3_last_row;
private int field_4_first_column; private int field_4_first_column;
private int field_5_last_column; private int field_5_last_column;
private BitField rowRelative = BitFieldFactory.getInstance( 0x8000 );
private BitField colRelative = BitFieldFactory.getInstance( 0x4000 );
/** Creates new AreaPtg */ /** Creates new AreaPtg */
public Area3DPtg() public Area3DPtg()

View File

@ -36,6 +36,10 @@ import org.apache.poi.util.LittleEndian;
*/ */
public final class Ref3DPtg extends OperandPtg { public final class Ref3DPtg extends OperandPtg {
public final static byte sid = 0x3a; public final static byte sid = 0x3a;
private static final BitField rowRelative = BitFieldFactory.getInstance(0x8000);
private static final BitField colRelative = BitFieldFactory.getInstance(0x4000);
private final static int SIZE = 7; // 6 + 1 for Ptg private final static int SIZE = 7; // 6 + 1 for Ptg
private short field_1_index_extern_sheet; private short field_1_index_extern_sheet;
/** The row index - zero based unsigned 16 bit value */ /** The row index - zero based unsigned 16 bit value */
@ -46,8 +50,6 @@ public final class Ref3DPtg extends OperandPtg {
* - bit 15 - isColumnRelative * - bit 15 - isColumnRelative
*/ */
private int field_3_column; private int field_3_column;
private BitField rowRelative = BitFieldFactory.getInstance(0x8000);
private BitField colRelative = BitFieldFactory.getInstance(0x4000);
/** Creates new AreaPtg */ /** Creates new AreaPtg */
public Ref3DPtg() {} public Ref3DPtg() {}