Bug 52272 - [PATCH] Inserting images on cloned sheet with images.
Summary: [PATCH] Inserting images on cloned sheet with images.
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.8-dev
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks: 53010
  Show dependency tree
 
Reported: 2011-12-01 17:42 UTC by Michael
Modified: 2012-08-12 11:38 UTC (History)
0 users



Attachments
Patch that fix described problem in this issue. (696 bytes, patch)
2011-12-01 17:42 UTC, Michael
Details | Diff
Sample input xls file for reproducing this issue. (178.50 KB, application/vnd.ms-excel)
2011-12-01 17:43 UTC, Michael
Details

Note You need to log in before you can comment on or make changes to this bug.
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