aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/hssf
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2008-04-05 21:43:53 +0000
committerNick Burch <nick@apache.org>2008-04-05 21:43:53 +0000
commit4a1c6abf5951271392dd431f555e8e24e0124b8e (patch)
tree92665ab7b4fbcb56504951350d52c1f47a2315a6 /src/java/org/apache/poi/hssf
parent96d3004ed71dc050333ad7320c35d8bc524227c0 (diff)
downloadpoi-4a1c6abf5951271392dd431f555e8e24e0124b8e.tar.gz
poi-4a1c6abf5951271392dd431f555e8e24e0124b8e.zip
More work on XSSF Hyperlinks. Still not quite there, but mostly now. Just need to fix a openxml4j bug first though
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@645179 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/hssf')
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFCell.java5
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFCreationHelper.java3
-rwxr-xr-xsrc/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java12
3 files changed, 10 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 ededf0d648..2a605c8a75 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
@@ -40,6 +40,7 @@ import org.apache.poi.hssf.record.formula.Ptg;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Comment;
+import org.apache.poi.ss.usermodel.Hyperlink;
import org.apache.poi.ss.usermodel.RichTextString;
/**
@@ -1120,7 +1121,9 @@ public class HSSFCell implements Cell
*
* @param link hypelrink associated with this cell
*/
- public void setHyperlink(HSSFHyperlink link){
+ public void setHyperlink(Hyperlink hyperlink){
+ HSSFHyperlink link = (HSSFHyperlink)hyperlink;
+
link.setFirstRow(record.getRow());
link.setLastRow(record.getRow());
link.setFirstColumn(record.getColumn());
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCreationHelper.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCreationHelper.java
index 42d28a7281..6986ef94b5 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFCreationHelper.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCreationHelper.java
@@ -41,9 +41,6 @@ public class HSSFCreationHelper implements CreationHelper {
return dataFormat;
}
- public HSSFHyperlink createHyperlink(int type, Sheet sheetFor) {
- return createHyperlink(type);
- }
public HSSFHyperlink createHyperlink(int type) {
return new HSSFHyperlink(type);
}
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java b/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
index 53d9298ee0..3bfbf880b3 100755
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
@@ -130,7 +130,7 @@ public class HSSFHyperlink implements Hyperlink {
*
* @return the 0-based column of the first cell that contains the hyperlink
*/
- public short getFirstColumn(){
+ public int getFirstColumn(){
return record.getFirstColumn();
}
@@ -139,8 +139,8 @@ public class HSSFHyperlink implements Hyperlink {
*
* @param col the 0-based column of the first cell that contains the hyperlink
*/
- public void setFirstColumn(short col){
- record.setFirstColumn(col);
+ public void setFirstColumn(int col){
+ record.setFirstColumn((short)col);
}
/**
@@ -148,7 +148,7 @@ public class HSSFHyperlink implements Hyperlink {
*
* @return the 0-based column of the last cell that contains the hyperlink
*/
- public short getLastColumn(){
+ public int getLastColumn(){
return record.getLastColumn();
}
@@ -157,8 +157,8 @@ public class HSSFHyperlink implements Hyperlink {
*
* @param col the 0-based column of the last cell that contains the hyperlink
*/
- public void setLastColumn(short col){
- record.setLastColumn(col);
+ public void setLastColumn(int col){
+ record.setLastColumn((short)col);
}
/**