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:
Glen Stampoultzis 2005-05-05 13:05:09 +00:00
parent d03cb3101e
commit af7638fefa
1 changed files with 3 additions and 0 deletions

View File

@ -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