Bug 52272

Summary: [PATCH] Inserting images on cloned sheet with images.
Product: POI Reporter: Michael <obidin>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.8-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 53010    
Attachments: Patch that fix described problem in this issue.
Sample input xls file for reproducing this issue.

Description Michael 2011-12-01 17:42:28 UTC
Created attachment 28012 [details]
Patch that fix described problem in this issue.

TC
1)Create xls file with one sheet with images (see attached example).
2)Clone this sheet.
3)Try to obtain HSSFPatriarch by calling HSSFSheet.getDrawingPatriarch()

ER
HSSFPatriarch will be returned.

AR
null is returned.


The bug produces problem:
To insert image on cloned sheet you have to call createDrawingPatriarch(), but that method remove all existence image from this sheet.

I found the problem code and fix it (see attached patch).
Comment 1 Michael 2011-12-01 17:43:10 UTC
Created attachment 28013 [details]
Sample input xls file for reproducing this issue.
Comment 2 Evgeniy Berlog 2012-08-12 11:38:12 UTC
This problem should be fixed in trunk.

Please try with a nightly build - see download links on http://poi.apache.org/
or build yourself from SVN trunk, see http://poi.apache.org/subversion.html