Author: nickarls
Date: 2008-09-19 16:29:18 -0400 (Fri, 19 Sep 2008)
New Revision: 9032
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java
trunk/src/excel/org/jboss/seam/excel/ui/UIImage.java
Log:
Fixed trunc error in image row/colspan. Changed corresponding ui-attributes to double.
Updated documentation.
Modified: trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-09-19 12:41:28 UTC (rev 9031)
+++ trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-09-19 20:29:18 UTC (rev 9032)
@@ -1552,8 +1552,7 @@
<literal>columnSpan</literal>
—The column span of the image. The default
is one resulting in the default width of the
- image. The value is a number. Note that the value
- is 0-based.
+ image. The value is a float.
</para>
</listitem>
<listitem>
@@ -1561,8 +1560,7 @@
<literal>rowSpan</literal>
—The row span of the image. The default is
the one resulting in the default height of the
- image. The value is a number. Note that the value
- is 0-based.
+ image. The value is a float.
</para>
</listitem>
<listitem>
Modified: trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java 2008-09-19 12:41:28 UTC
(rev 9031)
+++ trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java 2008-09-19 20:29:18 UTC
(rev 9032)
@@ -449,8 +449,8 @@
int useStartColumn = uiImage.getStartColumn() == null ? currentColumnIndex :
uiImage.getStartRow();
int useStartRow = uiImage.getStartRow() == null ? currentRowIndex :
uiImage.getStartRow();
- int useColumnSpan = uiImage.getColumnSpan() == null ? (image.getWidth() /
CELL_DEFAULT_WIDTH) : uiImage.getColumnSpan();
- int useRowSpan = uiImage.getRowSpan() == null ? (image.getWidth() /
CELL_DEFAULT_HEIGHT) : uiImage.getRowSpan();
+ double useColumnSpan = uiImage.getColumnSpan() == null ? ((double)(image.getWidth()
/ CELL_DEFAULT_WIDTH)) : uiImage.getColumnSpan();
+ double useRowSpan = uiImage.getRowSpan() == null ? ((double)(image.getWidth() /
CELL_DEFAULT_HEIGHT)) : uiImage.getRowSpan();
worksheet.addImage(new WritableImage(useStartColumn, useStartRow, useColumnSpan,
useRowSpan, pngStream.toByteArray()));
}
Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIImage.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIImage.java 2008-09-19 12:41:28 UTC (rev
9031)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIImage.java 2008-09-19 20:29:18 UTC (rev
9032)
@@ -9,8 +9,8 @@
private String URI;
private Integer startColumn;
private Integer startRow;
- private Integer columnSpan;
- private Integer rowSpan;
+ private Double columnSpan;
+ private Double rowSpan;
public String getURI()
{
@@ -42,22 +42,22 @@
this.startColumn = startColumn;
}
- public Integer getRowSpan()
+ public Double getRowSpan()
{
- return (Integer) valueOf("rowSpan", rowSpan);
+ return (Double) valueOf("rowSpan", rowSpan);
}
- public void setRowSpan(Integer rowSpan)
+ public void setRowSpan(Double rowSpan)
{
this.rowSpan = rowSpan;
}
- public Integer getColumnSpan()
+ public Double getColumnSpan()
{
- return (Integer) valueOf("columnSpan", columnSpan);
+ return (Double) valueOf("columnSpan", columnSpan);
}
- public void setColumnSpan(Integer columnSpan)
+ public void setColumnSpan(Double columnSpan)
{
this.columnSpan = columnSpan;
}
Show replies by date