Fixed line formatting. (2)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353148 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0efd3c5d47
commit
d768c461a6
@ -56,7 +56,6 @@
|
|||||||
package org.apache.poi.hssf.record;
|
package org.apache.poi.hssf.record;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import org.apache.poi.util.*;
|
import org.apache.poi.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,6 +63,7 @@ import org.apache.poi.util.*;
|
|||||||
* NOTE: This source was automatically generated.
|
* NOTE: This source was automatically generated.
|
||||||
* @author Shawn Laubach (slaubach at apache dot org)
|
* @author Shawn Laubach (slaubach at apache dot org)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class BottomMarginRecord
|
public class BottomMarginRecord
|
||||||
extends Record implements Margin
|
extends Record implements Margin
|
||||||
{
|
{
|
||||||
|
@ -57,6 +57,7 @@ package org.apache.poi.hssf.record;
|
|||||||
|
|
||||||
|
|
||||||
import org.apache.poi.util.*;
|
import org.apache.poi.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Record for the left margin.
|
* Record for the left margin.
|
||||||
* NOTE: This source was automatically generated.
|
* NOTE: This source was automatically generated.
|
||||||
@ -67,10 +68,12 @@ public class LeftMarginRecord
|
|||||||
extends Record implements Margin{
|
extends Record implements Margin{
|
||||||
public final static short sid = 0x26;
|
public final static short sid = 0x26;
|
||||||
private double field_1_margin;
|
private double field_1_margin;
|
||||||
|
|
||||||
public LeftMarginRecord()
|
public LeftMarginRecord()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a LeftMargin record and sets its fields appropriately.
|
* Constructs a LeftMargin record and sets its fields appropriately.
|
||||||
*
|
*
|
||||||
@ -79,10 +82,12 @@ public class LeftMarginRecord
|
|||||||
* @param size size the size of the data area of the record
|
* @param size size the size of the data area of the record
|
||||||
* @param data data of the record (should not contain sid/len)
|
* @param data data of the record (should not contain sid/len)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public LeftMarginRecord(short id, short size, byte [] data)
|
public LeftMarginRecord(short id, short size, byte [] data)
|
||||||
{
|
{
|
||||||
super(id, size, data);
|
super(id, size, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a LeftMargin record and sets its fields appropriately.
|
* Constructs a LeftMargin record and sets its fields appropriately.
|
||||||
*
|
*
|
||||||
@ -92,15 +97,18 @@ public class LeftMarginRecord
|
|||||||
* @param data data of the record (should not contain sid/len)
|
* @param data data of the record (should not contain sid/len)
|
||||||
* @param offset of the record's data
|
* @param offset of the record's data
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public LeftMarginRecord(short id, short size, byte [] data, int offset)
|
public LeftMarginRecord(short id, short size, byte [] data, int offset)
|
||||||
{
|
{
|
||||||
super(id, size, data, offset);
|
super(id, size, data, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the sid matches the expected side for this record
|
* Checks the sid matches the expected side for this record
|
||||||
*
|
*
|
||||||
* @param id the expected sid.
|
* @param id the expected sid.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected void validateSid(short id)
|
protected void validateSid(short id)
|
||||||
{
|
{
|
||||||
if (id != sid)
|
if (id != sid)
|
||||||
@ -108,10 +116,12 @@ public class LeftMarginRecord
|
|||||||
throw new RecordFormatException("Not a LeftMargin record");
|
throw new RecordFormatException("Not a LeftMargin record");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fillFields(byte [] data, short size, int offset)
|
protected void fillFields(byte [] data, short size, int offset)
|
||||||
{
|
{
|
||||||
field_1_margin = LittleEndian.getDouble(data, 0x0 + offset);
|
field_1_margin = LittleEndian.getDouble(data, 0x0 + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
@ -120,6 +130,7 @@ public class LeftMarginRecord
|
|||||||
buffer.append("[/LeftMargin]\n");
|
buffer.append("[/LeftMargin]\n");
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int serialize(int offset, byte[] data)
|
public int serialize(int offset, byte[] data)
|
||||||
{
|
{
|
||||||
LittleEndian.putShort(data, 0 + offset, sid);
|
LittleEndian.putShort(data, 0 + offset, sid);
|
||||||
@ -127,34 +138,43 @@ public class LeftMarginRecord
|
|||||||
LittleEndian.putDouble(data, 4 + offset, field_1_margin);
|
LittleEndian.putDouble(data, 4 + offset, field_1_margin);
|
||||||
return getRecordSize();
|
return getRecordSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of record (exluding 4 byte header)
|
* Size of record (exluding 4 byte header)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public int getRecordSize()
|
public int getRecordSize()
|
||||||
{
|
{
|
||||||
return 4 + 8;
|
return 4 + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
public short getSid()
|
public short getSid()
|
||||||
{
|
{
|
||||||
return this.sid;
|
return this.sid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the margin field for the LeftMargin record.
|
* Get the margin field for the LeftMargin record.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public double getMargin()
|
public double getMargin()
|
||||||
{
|
{
|
||||||
return field_1_margin;
|
return field_1_margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the margin field for the LeftMargin record.
|
* Set the margin field for the LeftMargin record.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void setMargin(double field_1_margin)
|
public void setMargin(double field_1_margin)
|
||||||
{
|
{
|
||||||
this.field_1_margin = field_1_margin;
|
this.field_1_margin = field_1_margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone() {
|
public Object clone() {
|
||||||
LeftMarginRecord rec = new LeftMarginRecord();
|
LeftMarginRecord rec = new LeftMarginRecord();
|
||||||
rec.field_1_margin = this.field_1_margin;
|
rec.field_1_margin = this.field_1_margin;
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
package org.apache.poi.hssf.record;
|
package org.apache.poi.hssf.record;
|
||||||
|
|
||||||
import org.apache.poi.util.*;
|
import org.apache.poi.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The margin interface is a parent used to define left, right, top and bottom margins. This allows much of the code to be generic when it comes to handling margins.
|
* The margin interface is a parent used to define left, right, top and bottom margins. This allows much of the code to be generic when it comes to handling margins.
|
||||||
* NOTE: This source wass automatically generated.
|
* NOTE: This source wass automatically generated.
|
||||||
@ -63,12 +64,17 @@ import org.apache.poi.util.*;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public interface Margin{
|
public interface Margin{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the margin field for the Margin.
|
* Get the margin field for the Margin.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public double getMargin();
|
public double getMargin();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the margin field for the Margin.
|
* Set the margin field for the Margin.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void setMargin(double field_1_margin);
|
public void setMargin(double field_1_margin);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,9 +53,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package org.apache.poi.hssf.record;import org.apache.poi.util.*;
|
package org.apache.poi.hssf.record;
|
||||||
|
|
||||||
/** * Record for the right margin.
|
import org.apache.poi.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Record for the right margin.
|
||||||
* NOTE: This source was automatically generated.
|
* NOTE: This source was automatically generated.
|
||||||
* @author Shawn Laubach (slaubach at apache dot org)
|
* @author Shawn Laubach (slaubach at apache dot org)
|
||||||
*/
|
*/
|
||||||
@ -65,10 +68,12 @@ public class RightMarginRecord
|
|||||||
extends Record implements Margin{
|
extends Record implements Margin{
|
||||||
public final static short sid = 0x27;
|
public final static short sid = 0x27;
|
||||||
private double field_1_margin;
|
private double field_1_margin;
|
||||||
|
|
||||||
public RightMarginRecord()
|
public RightMarginRecord()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a RightMargin record and sets its fields appropriately.
|
* Constructs a RightMargin record and sets its fields appropriately.
|
||||||
*
|
*
|
||||||
@ -77,10 +82,12 @@ public class RightMarginRecord
|
|||||||
* @param size size the size of the data area of the record
|
* @param size size the size of the data area of the record
|
||||||
* @param data data of the record (should not contain sid/len)
|
* @param data data of the record (should not contain sid/len)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public RightMarginRecord(short id, short size, byte [] data)
|
public RightMarginRecord(short id, short size, byte [] data)
|
||||||
{
|
{
|
||||||
super(id, size, data);
|
super(id, size, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a RightMargin record and sets its fields appropriately.
|
* Constructs a RightMargin record and sets its fields appropriately.
|
||||||
*
|
*
|
||||||
@ -90,15 +97,18 @@ public class RightMarginRecord
|
|||||||
* @param data data of the record (should not contain sid/len)
|
* @param data data of the record (should not contain sid/len)
|
||||||
* @param offset of the record's data
|
* @param offset of the record's data
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public RightMarginRecord(short id, short size, byte [] data, int offset)
|
public RightMarginRecord(short id, short size, byte [] data, int offset)
|
||||||
{
|
{
|
||||||
super(id, size, data, offset);
|
super(id, size, data, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the sid matches the expected side for this record
|
* Checks the sid matches the expected side for this record
|
||||||
*
|
*
|
||||||
* @param id the expected sid.
|
* @param id the expected sid.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected void validateSid(short id)
|
protected void validateSid(short id)
|
||||||
{
|
{
|
||||||
if (id != sid)
|
if (id != sid)
|
||||||
@ -106,10 +116,12 @@ public class RightMarginRecord
|
|||||||
throw new RecordFormatException("Not a RightMargin record");
|
throw new RecordFormatException("Not a RightMargin record");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fillFields(byte [] data, short size, int offset)
|
protected void fillFields(byte [] data, short size, int offset)
|
||||||
{
|
{
|
||||||
field_1_margin = LittleEndian.getDouble(data, 0x0 + offset);
|
field_1_margin = LittleEndian.getDouble(data, 0x0 + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
@ -118,6 +130,7 @@ public class RightMarginRecord
|
|||||||
buffer.append("[/RightMargin]\n");
|
buffer.append("[/RightMargin]\n");
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int serialize(int offset, byte[] data)
|
public int serialize(int offset, byte[] data)
|
||||||
{
|
{
|
||||||
LittleEndian.putShort(data, 0 + offset, sid);
|
LittleEndian.putShort(data, 0 + offset, sid);
|
||||||
@ -125,34 +138,43 @@ public class RightMarginRecord
|
|||||||
LittleEndian.putDouble(data, 4 + offset, field_1_margin);
|
LittleEndian.putDouble(data, 4 + offset, field_1_margin);
|
||||||
return getRecordSize();
|
return getRecordSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of record (exluding 4 byte header)
|
* Size of record (exluding 4 byte header)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public int getRecordSize()
|
public int getRecordSize()
|
||||||
{
|
{
|
||||||
return 4 + 8;
|
return 4 + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
public short getSid()
|
public short getSid()
|
||||||
{
|
{
|
||||||
return this.sid;
|
return this.sid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the margin field for the RightMargin record.
|
* Get the margin field for the RightMargin record.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public double getMargin()
|
public double getMargin()
|
||||||
{
|
{
|
||||||
return field_1_margin;
|
return field_1_margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the margin field for the RightMargin record.
|
* Set the margin field for the RightMargin record.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void setMargin(double field_1_margin)
|
public void setMargin(double field_1_margin)
|
||||||
{
|
{
|
||||||
this.field_1_margin = field_1_margin;
|
this.field_1_margin = field_1_margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone() {
|
public Object clone() {
|
||||||
RightMarginRecord rec = new RightMarginRecord();
|
RightMarginRecord rec = new RightMarginRecord();
|
||||||
rec.field_1_margin = this.field_1_margin;
|
rec.field_1_margin = this.field_1_margin;
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,7 @@ import org.apache.poi.util.*;
|
|||||||
* NOTE: This source was automatically generated.
|
* NOTE: This source was automatically generated.
|
||||||
* @author Shawn Laubach (slaubach at apache dot org)
|
* @author Shawn Laubach (slaubach at apache dot org)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class TopMarginRecord
|
public class TopMarginRecord
|
||||||
extends Record implements Margin
|
extends Record implements Margin
|
||||||
{
|
{
|
||||||
@ -89,6 +90,7 @@ public class TopMarginRecord
|
|||||||
{
|
{
|
||||||
super(id, size, data);
|
super(id, size, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a TopMargin record and sets its fields appropriately.
|
* Constructs a TopMargin record and sets its fields appropriately.
|
||||||
*
|
*
|
||||||
@ -98,15 +100,18 @@ public class TopMarginRecord
|
|||||||
* @param data data of the record (should not contain sid/len)
|
* @param data data of the record (should not contain sid/len)
|
||||||
* @param offset of the record's data
|
* @param offset of the record's data
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public TopMarginRecord(short id, short size, byte [] data, int offset)
|
public TopMarginRecord(short id, short size, byte [] data, int offset)
|
||||||
{
|
{
|
||||||
super(id, size, data, offset);
|
super(id, size, data, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the sid matches the expected side for this record
|
* Checks the sid matches the expected side for this record
|
||||||
*
|
*
|
||||||
* @param id the expected sid.
|
* @param id the expected sid.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected void validateSid(short id)
|
protected void validateSid(short id)
|
||||||
{
|
{
|
||||||
if (id != sid)
|
if (id != sid)
|
||||||
@ -114,10 +119,12 @@ public class TopMarginRecord
|
|||||||
throw new RecordFormatException("Not a TopMargin record");
|
throw new RecordFormatException("Not a TopMargin record");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void fillFields(byte [] data, short size, int offset)
|
protected void fillFields(byte [] data, short size, int offset)
|
||||||
{
|
{
|
||||||
field_1_margin = LittleEndian.getDouble(data, 0x0 + offset);
|
field_1_margin = LittleEndian.getDouble(data, 0x0 + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
@ -127,6 +134,7 @@ public class TopMarginRecord
|
|||||||
buffer.append("[/TopMargin]\n");
|
buffer.append("[/TopMargin]\n");
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int serialize(int offset, byte[] data)
|
public int serialize(int offset, byte[] data)
|
||||||
{
|
{
|
||||||
LittleEndian.putShort(data, 0 + offset, sid);
|
LittleEndian.putShort(data, 0 + offset, sid);
|
||||||
@ -134,34 +142,43 @@ public class TopMarginRecord
|
|||||||
LittleEndian.putDouble(data, 4 + offset, field_1_margin);
|
LittleEndian.putDouble(data, 4 + offset, field_1_margin);
|
||||||
return getRecordSize();
|
return getRecordSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of record (exluding 4 byte header)
|
* Size of record (exluding 4 byte header)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public int getRecordSize()
|
public int getRecordSize()
|
||||||
{
|
{
|
||||||
return 4 + 8;
|
return 4 + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
public short getSid()
|
public short getSid()
|
||||||
{
|
{
|
||||||
return this.sid;
|
return this.sid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the margin field for the TopMargin record.
|
* Get the margin field for the TopMargin record.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public double getMargin()
|
public double getMargin()
|
||||||
{
|
{
|
||||||
return field_1_margin;
|
return field_1_margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the margin field for the TopMargin record.
|
* Set the margin field for the TopMargin record.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void setMargin(double field_1_margin)
|
public void setMargin(double field_1_margin)
|
||||||
{
|
{
|
||||||
this.field_1_margin = field_1_margin;
|
this.field_1_margin = field_1_margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone() {
|
public Object clone() {
|
||||||
TopMarginRecord rec = new TopMarginRecord();
|
TopMarginRecord rec = new TopMarginRecord();
|
||||||
rec.field_1_margin = this.field_1_margin;
|
rec.field_1_margin = this.field_1_margin;
|
||||||
return rec;
|
return rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user