There seems to be a bug with the current implementation that causes problems if you create a row but no sells. This just works around that bug.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353670 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
77cbf81c55
commit
0aaf734131
@ -57,6 +57,7 @@ public class OfficeDrawing
|
|||||||
// Create a row and size one of the cells reasonably large.
|
// Create a row and size one of the cells reasonably large.
|
||||||
HSSFRow row = sheet1.createRow(2);
|
HSSFRow row = sheet1.createRow(2);
|
||||||
row.setHeight((short) 2800);
|
row.setHeight((short) 2800);
|
||||||
|
row.createCell( (short)1 );
|
||||||
sheet1.setColumnWidth((short) 2, (short) 9000);
|
sheet1.setColumnWidth((short) 2, (short) 9000);
|
||||||
|
|
||||||
// Create the drawing patriarch. This is the top level container for
|
// Create the drawing patriarch. This is the top level container for
|
||||||
@ -78,6 +79,7 @@ public class OfficeDrawing
|
|||||||
{
|
{
|
||||||
// Create a row and size one of the cells reasonably large.
|
// Create a row and size one of the cells reasonably large.
|
||||||
HSSFRow row = sheet2.createRow(2);
|
HSSFRow row = sheet2.createRow(2);
|
||||||
|
row.createCell( (short)1 );
|
||||||
row.setHeightInPoints(240);
|
row.setHeightInPoints(240);
|
||||||
sheet2.setColumnWidth((short) 2, (short) 9000);
|
sheet2.setColumnWidth((short) 2, (short) 9000);
|
||||||
|
|
||||||
@ -94,6 +96,7 @@ public class OfficeDrawing
|
|||||||
// Create a row and size one of the cells reasonably large
|
// Create a row and size one of the cells reasonably large
|
||||||
HSSFRow row = sheet3.createRow(2);
|
HSSFRow row = sheet3.createRow(2);
|
||||||
row.setHeightInPoints(140);
|
row.setHeightInPoints(140);
|
||||||
|
row.createCell( (short)1 );
|
||||||
sheet3.setColumnWidth((short) 2, (short) 9000);
|
sheet3.setColumnWidth((short) 2, (short) 9000);
|
||||||
|
|
||||||
// Create the drawing patriarch. This is the top level container for
|
// Create the drawing patriarch. This is the top level container for
|
||||||
|
Loading…
Reference in New Issue
Block a user