You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2015/11/29 03:43:17 UTC

svn commit: r1717026 - in /poi/trunk/src: java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java

Author: onealj
Date: Sun Nov 29 02:43:17 2015
New Revision: 1717026

URL: http://svn.apache.org/viewvc?rev=1717026&view=rev
Log:
bug 52903/58557: add @Override decorators to XSSFHyperlink and HSSFHyperlink

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java?rev=1717026&r1=1717025&r2=1717026&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java Sun Nov 29 02:43:17 2015
@@ -25,24 +25,28 @@ import org.apache.poi.ss.usermodel.Hyper
 public class HSSFHyperlink implements Hyperlink {
 
     /**
-     * Link to an existing file or web page
+     * Link to an existing file or web page
+     * May be deprecated in the future. Consider using {@link Hyperlink#LINK_URL} instead.
      */
-    public static final int LINK_URL = 1;
+    public static final int LINK_URL = Hyperlink.LINK_URL;
 
     /**
      * Link to a place in this document
+     * May be deprecated in the future. Consider using {@link Hyperlink#LINK_DOCUMENT} instead.
      */
-    public static final int LINK_DOCUMENT = 2;
+    public static final int LINK_DOCUMENT = Hyperlink.LINK_DOCUMENT;
 
     /**
      * Link to an E-mail address
+     * May be deprecated in the future. Consider using {@link Hyperlink#LINK_EMAIL} instead.
      */
-    public static final int LINK_EMAIL = 3;
+    public static final int LINK_EMAIL = Hyperlink.LINK_EMAIL;
 
     /**
      * Link to a file
+     * May be deprecated in the future. Consider using {@link Hyperlink#LINK_FILE} instead.
      */
-    public static final int LINK_FILE = 4;
+    public static final int LINK_FILE = Hyperlink.LINK_FILE;
 
     /**
      * Low-level record object that stores the actual hyperlink data
@@ -127,6 +131,7 @@ public class HSSFHyperlink implements Hy
      *
      * @return the 0-based row of the cell that contains the hyperlink
      */
+    @Override
     public int getFirstRow(){
         return record.getFirstRow();
     }
@@ -136,6 +141,7 @@ public class HSSFHyperlink implements Hy
      *
      * @param row the 0-based row of the first cell that contains the hyperlink
      */
+    @Override
     public void setFirstRow(int row){
         record.setFirstRow(row);
     }
@@ -145,6 +151,7 @@ public class HSSFHyperlink implements Hy
      *
      * @return the 0-based row of the last cell that contains the hyperlink
      */
+    @Override
     public int getLastRow(){
         return record.getLastRow();
     }
@@ -154,6 +161,7 @@ public class HSSFHyperlink implements Hy
      *
      * @param row the 0-based row of the last cell that contains the hyperlink
      */
+    @Override
     public void setLastRow(int row){
         record.setLastRow(row);
     }
@@ -163,6 +171,7 @@ public class HSSFHyperlink implements Hy
      *
      * @return the 0-based column of the first cell that contains the hyperlink
      */
+    @Override
     public int getFirstColumn(){
         return record.getFirstColumn();
     }
@@ -172,6 +181,7 @@ public class HSSFHyperlink implements Hy
      *
      * @param col the 0-based column of the first cell that contains the hyperlink
      */
+    @Override
     public void setFirstColumn(int col){
         record.setFirstColumn((short)col);
     }
@@ -181,6 +191,7 @@ public class HSSFHyperlink implements Hy
      *
      * @return the 0-based column of the last cell that contains the hyperlink
      */
+    @Override
     public int getLastColumn(){
         return record.getLastColumn();
     }
@@ -190,6 +201,7 @@ public class HSSFHyperlink implements Hy
      *
      * @param col the 0-based column of the last cell that contains the hyperlink
      */
+    @Override
     public void setLastColumn(int col){
         record.setLastColumn((short)col);
     }
@@ -198,7 +210,8 @@ public class HSSFHyperlink implements Hy
      * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.
      *
      * @return  the address of this hyperlink
-     */
+     */
+    @Override
     public String getAddress(){
         return record.getAddress();
     }
@@ -230,7 +243,8 @@ public class HSSFHyperlink implements Hy
      * Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.
      *
      * @param address  the address of this hyperlink
-     */
+     */
+    @Override
     public void setAddress(String address){
         record.setAddress(address);
     }
@@ -240,6 +254,7 @@ public class HSSFHyperlink implements Hy
      *
      * @return  text to display
      */
+    @Override
     public String getLabel(){
         return record.getLabel();
     }
@@ -249,6 +264,7 @@ public class HSSFHyperlink implements Hy
      *
      * @param label text label for this hyperlink
      */
+    @Override
     public void setLabel(String label){
         record.setLabel(label);
     }
@@ -258,6 +274,7 @@ public class HSSFHyperlink implements Hy
      *
      * @return the type of this hyperlink
      */
+    @Override
     public int getType(){
         return link_type;
     }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java?rev=1717026&r1=1717025&r2=1717026&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java Sun Nov 29 02:43:17 2015
@@ -151,6 +151,7 @@ public class XSSFHyperlink implements Hy
      *
      * @return the type of this hyperlink
      */
+    @Override
     public int getType() {
         return _type;
     }
@@ -168,6 +169,7 @@ public class XSSFHyperlink implements Hy
      *
      * @return the address of this hyperlink
      */
+    @Override
     public String getAddress() {
         return _location;
     }
@@ -177,6 +179,7 @@ public class XSSFHyperlink implements Hy
      *
      * @return text to display
      */
+    @Override
     public String getLabel() {
         return _ctHyperlink.getDisplay();
     }
@@ -196,6 +199,7 @@ public class XSSFHyperlink implements Hy
      *
      * @param label text label for this hyperlink
      */
+    @Override
     public void setLabel(String label) {
         _ctHyperlink.setDisplay(label);
     }
@@ -215,6 +219,7 @@ public class XSSFHyperlink implements Hy
      *
      * @param address - the address of this hyperlink
      */
+    @Override
     public void setAddress(String address) {
         validate(address);
 
@@ -267,6 +272,7 @@ public class XSSFHyperlink implements Hy
      *
      * @return the 0-based column of the first cell that contains the hyperlink
      */
+    @Override
     public int getFirstColumn() {
         return buildCellReference().getCol();
     }
@@ -277,6 +283,7 @@ public class XSSFHyperlink implements Hy
      *
      * @return the 0-based column of the last cell that contains the hyperlink
      */
+    @Override
     public int getLastColumn() {
         return buildCellReference().getCol();
     }
@@ -286,6 +293,7 @@ public class XSSFHyperlink implements Hy
      *
      * @return the 0-based row of the cell that contains the hyperlink
      */
+    @Override
     public int getFirstRow() {
         return buildCellReference().getRow();
     }
@@ -296,6 +304,7 @@ public class XSSFHyperlink implements Hy
      *
      * @return the 0-based row of the last cell that contains the hyperlink
      */
+    @Override
     public int getLastRow() {
         return buildCellReference().getRow();
     }
@@ -305,6 +314,7 @@ public class XSSFHyperlink implements Hy
      *
      * @param col the 0-based column of the first cell that contains the hyperlink
      */
+    @Override
     public void setFirstColumn(int col) {
         setCellReference(new CellReference( getFirstRow(), col ));
     }
@@ -315,6 +325,7 @@ public class XSSFHyperlink implements Hy
      *
      * @param col the 0-based column of the last cell that contains the hyperlink
      */
+    @Override
     public void setLastColumn(int col) {
         setFirstColumn(col);
     }
@@ -324,6 +335,7 @@ public class XSSFHyperlink implements Hy
      *
      * @param row the 0-based row of the first cell that contains the hyperlink
      */
+    @Override
     public void setFirstRow(int row) {
         setCellReference(new CellReference( row, getFirstColumn() ));
     }
@@ -334,6 +346,7 @@ public class XSSFHyperlink implements Hy
      *
      * @param row the 0-based row of the last cell that contains the hyperlink
      */
+    @Override
     public void setLastRow(int row) {
         setFirstRow(row);
 	}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org