Bug 63073 - return value of addMergedRegion starting from 1
Summary: return value of addMergedRegion starting from 1
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: unspecified
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-10 16:46 UTC by chenhuanming.cn
Modified: 2019-04-23 20:28 UTC (History)
0 users



Attachments
Patch to make the return value of XSSFSheet.addMergedRegion zero-based (1.81 KB, patch)
2019-04-21 18:00 UTC, David Gauntt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description chenhuanming.cn 2019-01-10 16:46:57 UTC
HSSFSheet.addMergedRegion() returns index of the region,which starts from 0,but return value of XSSFSheet.addMergedRegion() starts from 1

Is it a Bug?Their interface Sheet does not mention this

==============
Implementation In HSSFSheet:
return mrt.getNumberOfMergedRegions()-1;


And in XSSFSheet:
return ctMergeCells.sizeOfMergeCellArray();


forgot -1?

Version:4.0.1
Comment 1 David Gauntt 2019-04-21 18:00:58 UTC
Created attachment 36539 [details]
Patch to make the return value of XSSFSheet.addMergedRegion zero-based
Comment 2 Dominik Stadler 2019-04-23 20:28:16 UTC
Fixed on trunk via r1858021, thanks for the patch!