bug 60601: hyperlinks have to be removed one by one to avoid other errors
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779429 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
70cc2bce03
commit
45de2e444a
@ -3485,7 +3485,18 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
|
|||||||
worksheet.getHyperlinks().setHyperlinkArray(ctHls);
|
worksheet.getHyperlinks().setHyperlinkArray(ctHls);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
worksheet.unsetHyperlinks();
|
// For some reason, we have to remove the hyperlinks one by one from the CTHyperlinks array
|
||||||
|
// rather than unsetting or resetting the hyperlink array.
|
||||||
|
//worksheet.getHyperlinks().setHyperlinkArray(new CTHyperlink[0]);
|
||||||
|
//worksheet.unsetHyperlinks();
|
||||||
|
if (worksheet.getHyperlinks() != null) {
|
||||||
|
final int count = worksheet.getHyperlinks().sizeOfHyperlinkArray();
|
||||||
|
for (int i=count-1; i>=0; i--) {
|
||||||
|
worksheet.getHyperlinks().removeHyperlink(i);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int minCell=Integer.MAX_VALUE, maxCell=Integer.MIN_VALUE;
|
int minCell=Integer.MAX_VALUE, maxCell=Integer.MIN_VALUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user