aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/hssf
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/poi/hssf')
-rw-r--r--src/java/org/apache/poi/hssf/dev/BiffViewer.java2
-rw-r--r--src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java15
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java12
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java4
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFShape.java5
5 files changed, 27 insertions, 11 deletions
diff --git a/src/java/org/apache/poi/hssf/dev/BiffViewer.java b/src/java/org/apache/poi/hssf/dev/BiffViewer.java
index 19cdd02942..5451b27899 100644
--- a/src/java/org/apache/poi/hssf/dev/BiffViewer.java
+++ b/src/java/org/apache/poi/hssf/dev/BiffViewer.java
@@ -145,7 +145,7 @@ public final class BiffViewer {
case DatRecord.sid: return new DatRecord(in);
case DataFormatRecord.sid: return new DataFormatRecord(in);
case DateWindow1904Record.sid: return new DateWindow1904Record(in);
- case DConRefRecord.sid: return new DConRefRecord(in);
+ case DConRefRecord.sid: return new DConRefRecord(in);
case DefaultColWidthRecord.sid:return new DefaultColWidthRecord(in);
case DefaultDataLabelTextPropertiesRecord.sid: return new DefaultDataLabelTextPropertiesRecord(in);
case DefaultRowHeightRecord.sid: return new DefaultRowHeightRecord(in);
diff --git a/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java b/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java
index 078f0205d7..d3263834c7 100644
--- a/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java
+++ b/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java
@@ -57,20 +57,19 @@ public abstract class AbstractEscherHolderRecord extends Record {
public AbstractEscherHolderRecord(RecordInputStream in)
{
escherRecords = new ArrayList<EscherRecord>();
- if (! DESERIALISE )
- {
+ if (! DESERIALISE ) {
rawDataContainer.concatenate(in.readRemainder());
- }
- else
- {
+ } else {
byte[] data = in.readAllContinuedRemainder();
convertToEscherRecords( 0, data.length, data );
}
}
protected void convertRawBytesToEscherRecords() {
- byte[] rawData = getRawData();
- convertToEscherRecords(0, rawData.length, rawData);
+ if (! DESERIALISE ) {
+ byte[] rawData = getRawData();
+ convertToEscherRecords(0, rawData.length, rawData);
+ }
}
private void convertToEscherRecords( int offset, int size, byte[] data )
{
@@ -224,7 +223,7 @@ public abstract class AbstractEscherHolderRecord extends Record {
public EscherRecord getEscherRecord(int index)
{
- return (EscherRecord) escherRecords.get(index);
+ return escherRecords.get(index);
}
/**
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java b/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java
index 0a65bbd8ff..c46f7b7a92 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFClientAnchor.java
@@ -42,6 +42,10 @@ public final class HSSFClientAnchor extends HSSFAnchor implements ClientAnchor {
/**
* Creates a new client anchor and sets the top-left and bottom-right
* coordinates of the anchor.
+ *
+ * Note: Microsoft Excel seems to sometimes disallow
+ * higher y1 than y2 or higher x1 than x2, you might need to
+ * reverse them and draw shapes vertically or horizontally flipped!
*
* @param dx1 the x coordinate within the first cell.
* @param dy1 the y coordinate within the first cell.
@@ -186,8 +190,12 @@ public final class HSSFClientAnchor extends HSSFAnchor implements ClientAnchor {
}
/**
- * Dets the top-left and bottom-right
- * coordinates of the anchor.
+ * Sets the top-left and bottom-right coordinates of
+ * the anchor.
+ *
+ * Note: Microsoft Excel seems to sometimes disallow
+ * higher y1 than y2 or higher x1 than x2, you might need to
+ * reverse them and draw shapes vertically or horizontally flipped!
*
* @param x1 the x coordinate within the first cell.
* @param y1 the y coordinate within the first cell.
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java b/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java
index 7745801fd2..dda4b39575 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java
@@ -171,6 +171,10 @@ public final class HSSFPatriarch implements HSSFShapeContainer, Drawing {
/**
* Creates a simple shape. This includes such shapes as lines, rectangles,
* and ovals.
+ *
+ * Note: Microsoft Excel seems to sometimes disallow
+ * higher y1 than y2 or higher x1 than x2 in the anchor, you might need to
+ * reverse them and draw shapes vertically or horizontally flipped!
*
* @param anchor the client anchor describes how this group is attached
* to the sheet.
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFShape.java b/src/java/org/apache/poi/hssf/usermodel/HSSFShape.java
index 4ea7d31e6a..4775122f82 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFShape.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFShape.java
@@ -27,6 +27,11 @@ import java.io.IOException;
/**
* An abstract shape.
+ *
+ * Note: Microsoft Excel seems to sometimes disallow
+ * higher y1 than y2 or higher x1 than x2 in the anchor, you might need to
+ * reverse them and draw shapes vertically or horizontally flipped via
+ * setFlipVertical() or setFlipHorizontally().
*/
public abstract class HSSFShape {
public static final int LINEWIDTH_ONE_PT = 12700;