You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2010/06/30 14:56:32 UTC
DO NOT REPLY [Bug 49529] New: HSSFWorkbook.cloneSheet after
createDrawingPatriarch -> Exception
https://issues.apache.org/bugzilla/show_bug.cgi?id=49529
Summary: HSSFWorkbook.cloneSheet after createDrawingPatriarch
-> Exception
Product: POI
Version: 3.6
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: olivier.masseau@ic.lu
Created an attachment (id=25668)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25668)
Excel workbook used to reproduce the bug.
If I open an existing workbook with one sheet and then create a drawing
patriarch for the sheet, I cannot clone the sheet anymore.
Simple code to reproduce the bug :
public static void main(String[] args) {
try {
Workbook workbook = WorkbookFactory.create(new
FileInputStream("C:\\test.xls"));
workbook.getSheetAt(0).createDrawingPatriarch();
workbook.cloneSheet(0);
System.out.println("OK");
}
catch(Exception e) {
e.printStackTrace();
}
}
It produces this exception :
java.lang.IllegalStateException: EOF - next record not available
at
org.apache.poi.hssf.record.RecordInputStream.nextRecord(RecordInputStream.java:190)
at org.apache.poi.hssf.record.Record.cloneViaReserialise(Record.java:88)
at
org.apache.poi.hssf.record.AbstractEscherHolderRecord.clone(AbstractEscherHolderRecord.java:150)
at org.apache.poi.hssf.model.Sheet.cloneSheet(Sheet.java:375)
at org.apache.poi.hssf.usermodel.HSSFSheet.cloneSheet(HSSFSheet.java:121)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.cloneSheet(HSSFWorkbook.java:662)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.cloneSheet(HSSFWorkbook.java:87)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 49529] HSSFWorkbook.cloneSheet after
createDrawingPatriarch -> Exception
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49529
--- Comment #1 from Evgeniy Berlog <su...@gmail.com> 2012-03-27 20:52:14 UTC ---
Created attachment 28512
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28512
Fixed bug with cloning empty EscherAggregate records
Bug appears only if sheet has no drawing records. If we try to serialize empty
EscherRecord it returns empty bytes array what can cause exceptions.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 49529] HSSFWorkbook.cloneSheet after
createDrawingPatriarch -> Exception
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49529
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Yegor Kozlov <ye...@dinom.ru> 2012-03-29 10:36:36 UTC ---
Thanks for the patch, applied in r1306781 along with a unit test. The attached
sample was included in our collection of test files.
Yegor
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org