ASF Bugzilla – Attachment 33086 Details for
Bug 58350
[PATCH] Make (S)XSSFSheet behavior the same as HSSFSheet when calling getMergedRegions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
XSSFSheet.getMergedRegions return empty list
XSSFSheet.java.getMergedRegionsReturnsEmptyList.patch (text/plain), 1.19 KB, created by
Javen O'Neal
on 2015-09-10 02:32:42 UTC
(
hide
)
Description:
XSSFSheet.getMergedRegions return empty list
Filename:
MIME Type:
Creator:
Javen O'Neal
Created:
2015-09-10 02:32:42 UTC
Size:
1.19 KB
patch
obsolete
>Index: src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java >=================================================================== >--- src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (revision 1702148) >+++ src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (working copy) >@@ -1104,15 +1104,14 @@ > * faster than calling {@link #getMergedRegion(int)} each time. > * > * @return the list of merged regions >- * @throws IllegalStateException if this worksheet does not contain merged regions > */ > @SuppressWarnings("deprecation") > @Override > public List<CellRangeAddress> getMergedRegions() { >+ List<CellRangeAddress> addresses = new ArrayList<CellRangeAddress>(); > CTMergeCells ctMergeCells = worksheet.getMergeCells(); >- if(ctMergeCells == null) throw new IllegalStateException("This worksheet does not contain merged regions"); >+ if(ctMergeCells == null) return addresses; > >- List<CellRangeAddress> addresses = new ArrayList<CellRangeAddress>(); > for(CTMergeCell ctMergeCell : ctMergeCells.getMergeCellArray()) { > String ref = ctMergeCell.getRef(); > addresses.add(CellRangeAddress.valueOf(ref));
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 58350
: 33086