ASF Bugzilla – Attachment 36541 Details for
Bug 63371
addMergedRegion does not update CTMergeCells.getCount
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Test case to illustrate bug 63371
file_63371.txt (text/plain), 1.47 KB, created by
David Gauntt
on 2019-04-21 19:54:46 UTC
(
hide
)
Description:
Test case to illustrate bug 63371
Filename:
MIME Type:
Creator:
David Gauntt
Created:
2019-04-21 19:54:46 UTC
Size:
1.47 KB
patch
obsolete
> public static XSSFWorkbook testAddMergedRegion(boolean bApplyBug, boolean bApplyBugFix) { > final String procName = "testAddMergedRegion"; > XSSFWorkbook workbook = new XSSFWorkbook(); > XSSFSheet sheet = workbook.createSheet(); > > if (!bApplyBug) { > return workbook; > } > > CellRangeAddress region = new CellRangeAddress(1, 1, 1, 2); > int index = sheet.addMergedRegion(region); > System.out.println(String.format("%s: index=%d", procName, index)); > testMergeRegions(sheet, "After adding first region"); > region = new CellRangeAddress(2, 2, 1, 2); > > return workbook; > } > > private static void testMergeRegions(XSSFSheet sheet, String title) { > final List<CellRangeAddress> ranges = sheet.getMergedRegions(); > final int numMergedRegions = sheet.getNumMergedRegions(); > final CTWorksheet ctSheet = sheet.getCTWorksheet(); > final CTMergeCells ctMergeCells = ctSheet.getMergeCells(); > final List<CTMergeCell> ctMergeCellList = ctMergeCells.getMergeCellList(); > final long ctMergeCellCount = ctMergeCells.getCount(); > final int ctMergeCellListSize = ctMergeCellList.size(); > > System.out.println(String.format("\ntestMergeRegions(%s)", title)); > System.out.println(String.format("ranges.size=%d", ranges.size())); > System.out.println(String.format("numMergedRegions=%d", numMergedRegions)); > System.out.println(String.format("ctMergeCellCount=%d", ctMergeCellCount)); > System.out.println(String.format("ctMergeCellListSize=%d", ctMergeCellListSize)); > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 63371
:
36540
| 36541