Regression analysis: the additional testing of cloning sheets showed a

possible ArrayIndexOutOfBounds error which we can avoid to make cloning
fail a bit less.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1730274 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2016-02-13 21:29:46 +00:00
parent eeee511f71
commit c68a9e4c02
2 changed files with 5 additions and 3 deletions

View File

@ -214,10 +214,12 @@ public class HSSFPicture extends HSSFSimpleShape implements Picture {
void afterInsert(HSSFPatriarch patriarch) {
EscherAggregate agg = patriarch.getBoundAggregate();
agg.associateShapeToObjRecord(getEscherContainer().getChildById(EscherClientDataRecord.RECORD_ID), getObjRecord());
if(getPictureIndex() != -1) {
EscherBSERecord bse =
patriarch.getSheet().getWorkbook().getWorkbook().getBSERecord(getPictureIndex());
bse.setRef(bse.getRef() + 1);
}
}
/**
* The filename of the embedded image

Binary file not shown.