diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-08-11 21:16:49 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-08-11 21:16:49 +0000 |
commit | f83a4152d5324e6cad5c522ad98174dab8c79f47 (patch) | |
tree | 812e0765f985eab6e95061d1215ba0387abb392a | |
parent | 4bac6db36b440ae273d3dab675d8088377b24172 (diff) | |
download | poi-f83a4152d5324e6cad5c522ad98174dab8c79f47.tar.gz poi-f83a4152d5324e6cad5c522ad98174dab8c79f47.zip |
support removing hyperlink from one cell when hyperlink is shared by many cells
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892247 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java index ce883fb8e2..615379087f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java @@ -3387,6 +3387,9 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet { */ @Internal public void removeHyperlink(int row, int column) { + // CTHyperlinks is regenerated from scratch when writing out the spreadsheet + // so don't worry about maintaining hyperlinks and CTHyperlinks in parallel. + // only maintain hyperlinks XSSFHyperlink hyperlink = getHyperlink(row, column); if (hyperlink != null) { if (hyperlink.getFirstRow() == row && hyperlink.getLastRow() == row |