aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hssf
diff options
context:
space:
mode:
authorYegor Kozlov <yegor@apache.org>2012-03-29 10:35:41 +0000
committerYegor Kozlov <yegor@apache.org>2012-03-29 10:35:41 +0000
commit0afefcd2b852519b036d24f971980a3c21bf9d38 (patch)
tree93b50395ac107990c233f0faec4c6db53ac2ef36 /src/testcases/org/apache/poi/hssf
parent18501424af3f15a82002abc7cf635c3254d71e43 (diff)
downloadpoi-0afefcd2b852519b036d24f971980a3c21bf9d38.tar.gz
poi-0afefcd2b852519b036d24f971980a3c21bf9d38.zip
Bugzilla 49529 - avoid exception when cloning sheets with no drawing records and initialized drawing patriarch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1306781 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf')
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
index 111130e29d..0864549f6c 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
@@ -2227,4 +2227,15 @@ if(1==2) {
cell.getCellFormula());
}
+ public void test49529() throws Exception {
+ // user code reported in Bugzilla #49529
+ HSSFWorkbook workbook = openSample("49529.xls");
+ workbook.getSheetAt(0).createDrawingPatriarch();
+ // prior to the fix the line below failed with
+ // java.lang.IllegalStateException: EOF - next record not available
+ workbook.cloneSheet(0);
+
+ // make sure we are still readable
+ writeOutAndReadBack(workbook);
+ }
}