aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/poi/hssf/usermodel/HSSFCell.java')
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFCell.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
index d36347549b..ad3635de6c 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
@@ -1045,17 +1045,9 @@ public class HSSFCell implements Cell {
/**
* @return hyperlink associated with this cell or <code>null</code> if not found
*/
+ @Override
public HSSFHyperlink getHyperlink(){
- for (Iterator<RecordBase> it = _sheet.getSheet().getRecords().iterator(); it.hasNext(); ) {
- RecordBase rec = it.next();
- if (rec instanceof HyperlinkRecord){
- HyperlinkRecord link = (HyperlinkRecord)rec;
- if(link.getFirstColumn() == _record.getColumn() && link.getFirstRow() == _record.getRow()){
- return new HSSFHyperlink(link);
- }
- }
- }
- return null;
+ return _sheet.getHyperlink(_record.getRow(), _record.getColumn());
}
/**
@@ -1064,6 +1056,7 @@ public class HSSFCell implements Cell {
*
* @param hyperlink hyperlink associated with this cell
*/
+ @Override
public void setHyperlink(Hyperlink hyperlink){
if (hyperlink == null) {
removeHyperlink();