bug 59873: add @Removal annotations for deprecated CreationHelper#createHyperlink(int) and Hyperlink static aliases to HyperlinkType enum values
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1760621 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b91b5c5715
commit
808996a683
@ -16,6 +16,8 @@
|
|||||||
==================================================================== */
|
==================================================================== */
|
||||||
package org.apache.poi.common.usermodel;
|
package org.apache.poi.common.usermodel;
|
||||||
|
|
||||||
|
import org.apache.poi.util.Removal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a hyperlink.
|
* Represents a hyperlink.
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,7 @@ public interface Hyperlink {
|
|||||||
*
|
*
|
||||||
* @deprecated POI 3.15 beta 3. Use {@link HyperlinkType#URL} instead.
|
* @deprecated POI 3.15 beta 3. Use {@link HyperlinkType#URL} instead.
|
||||||
*/
|
*/
|
||||||
|
@Removal(version="3.17")
|
||||||
public static final int LINK_URL = 1; // HyperlinkType.URL.getCode()
|
public static final int LINK_URL = 1; // HyperlinkType.URL.getCode()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,6 +35,7 @@ public interface Hyperlink {
|
|||||||
*
|
*
|
||||||
* @deprecated POI 3.15 beta 3. Use {@link HyperlinkType#DOCUMENT} instead.
|
* @deprecated POI 3.15 beta 3. Use {@link HyperlinkType#DOCUMENT} instead.
|
||||||
*/
|
*/
|
||||||
|
@Removal(version="3.17")
|
||||||
public static final int LINK_DOCUMENT = 2; // HyperlinkType.DOCUMENT.getCode()
|
public static final int LINK_DOCUMENT = 2; // HyperlinkType.DOCUMENT.getCode()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -39,6 +43,7 @@ public interface Hyperlink {
|
|||||||
*
|
*
|
||||||
* @deprecated POI 3.15 beta 3. Use {@link HyperlinkType#EMAIL} instead.
|
* @deprecated POI 3.15 beta 3. Use {@link HyperlinkType#EMAIL} instead.
|
||||||
*/
|
*/
|
||||||
|
@Removal(version="3.17")
|
||||||
public static final int LINK_EMAIL = 3; // HyperlinkType.EMAIL.getCode()
|
public static final int LINK_EMAIL = 3; // HyperlinkType.EMAIL.getCode()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,6 +51,7 @@ public interface Hyperlink {
|
|||||||
*
|
*
|
||||||
* @deprecated POI 3.15 beta 3. Use {@link HyperlinkType#FILE} instead.
|
* @deprecated POI 3.15 beta 3. Use {@link HyperlinkType#FILE} instead.
|
||||||
*/
|
*/
|
||||||
|
@Removal(version="3.17")
|
||||||
public static final int LINK_FILE = 4; // HyperlinkType.FILE.getCode()
|
public static final int LINK_FILE = 4; // HyperlinkType.FILE.getCode()
|
||||||
|
|
||||||
|
|
||||||
@ -83,6 +89,7 @@ public interface Hyperlink {
|
|||||||
* @return the type of this hyperlink
|
* @return the type of this hyperlink
|
||||||
* @see HyperlinkType#forInt(int)
|
* @see HyperlinkType#forInt(int)
|
||||||
* @deprecated POI 3.15 beta 3. Use {@link #getTypeEnum()}
|
* @deprecated POI 3.15 beta 3. Use {@link #getTypeEnum()}
|
||||||
|
* getType will return a HyperlinkType enum in the future.
|
||||||
*/
|
*/
|
||||||
public int getType();
|
public int getType();
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import org.apache.poi.common.usermodel.HyperlinkType;
|
|||||||
import org.apache.poi.hssf.record.common.ExtendedColor;
|
import org.apache.poi.hssf.record.common.ExtendedColor;
|
||||||
import org.apache.poi.ss.usermodel.CreationHelper;
|
import org.apache.poi.ss.usermodel.CreationHelper;
|
||||||
import org.apache.poi.util.Internal;
|
import org.apache.poi.util.Internal;
|
||||||
|
import org.apache.poi.util.Removal;
|
||||||
|
|
||||||
public class HSSFCreationHelper implements CreationHelper {
|
public class HSSFCreationHelper implements CreationHelper {
|
||||||
private final HSSFWorkbook workbook;
|
private final HSSFWorkbook workbook;
|
||||||
@ -50,6 +51,7 @@ public class HSSFCreationHelper implements CreationHelper {
|
|||||||
* @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
|
* @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@Removal(version="3.17")
|
||||||
@Override
|
@Override
|
||||||
public HSSFHyperlink createHyperlink(int type) {
|
public HSSFHyperlink createHyperlink(int type) {
|
||||||
return new HSSFHyperlink(type);
|
return new HSSFHyperlink(type);
|
||||||
|
@ -273,6 +273,8 @@ public class HSSFHyperlink implements Hyperlink {
|
|||||||
*
|
*
|
||||||
* @return the type of this hyperlink
|
* @return the type of this hyperlink
|
||||||
* @see HyperlinkType#forInt
|
* @see HyperlinkType#forInt
|
||||||
|
* @deprecated POI 3.15. Use {@link #getTypeEnum()} instead.
|
||||||
|
* getType will return a HyperlinkType enum in the future.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getType() {
|
public int getType() {
|
||||||
|
@ -69,6 +69,10 @@ public class XSLFHyperlink implements Hyperlink<XSLFShape,XSLFTextParagraph> {
|
|||||||
_link.setTooltip(label);
|
_link.setTooltip(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @deprecated POI 3.15. Use {@link #getTypeEnum()} instead.
|
||||||
|
* Will return a HyperlinkType enum in the future
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getType() {
|
public int getType() {
|
||||||
return getTypeEnum().getCode();
|
return getTypeEnum().getCode();
|
||||||
|
@ -26,6 +26,7 @@ import org.apache.poi.ss.usermodel.Hyperlink;
|
|||||||
import org.apache.poi.util.Internal;
|
import org.apache.poi.util.Internal;
|
||||||
import org.apache.poi.util.POILogFactory;
|
import org.apache.poi.util.POILogFactory;
|
||||||
import org.apache.poi.util.POILogger;
|
import org.apache.poi.util.POILogger;
|
||||||
|
import org.apache.poi.util.Removal;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFCreationHelper;
|
import org.apache.poi.xssf.usermodel.XSSFCreationHelper;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
||||||
|
|
||||||
@ -72,6 +73,7 @@ public class SXSSFCreationHelper implements CreationHelper {
|
|||||||
* @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
|
* @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@Removal(version="3.17")
|
||||||
@Override
|
@Override
|
||||||
public Hyperlink createHyperlink(int type) {
|
public Hyperlink createHyperlink(int type) {
|
||||||
return helper.createHyperlink(type);
|
return helper.createHyperlink(type);
|
||||||
|
@ -20,6 +20,7 @@ import org.apache.poi.common.usermodel.HyperlinkType;
|
|||||||
import org.apache.poi.ss.usermodel.CreationHelper;
|
import org.apache.poi.ss.usermodel.CreationHelper;
|
||||||
import org.apache.poi.ss.usermodel.Hyperlink;
|
import org.apache.poi.ss.usermodel.Hyperlink;
|
||||||
import org.apache.poi.util.Internal;
|
import org.apache.poi.util.Internal;
|
||||||
|
import org.apache.poi.util.Removal;
|
||||||
|
|
||||||
public class XSSFCreationHelper implements CreationHelper {
|
public class XSSFCreationHelper implements CreationHelper {
|
||||||
private final XSSFWorkbook workbook;
|
private final XSSFWorkbook workbook;
|
||||||
@ -61,6 +62,7 @@ public class XSSFCreationHelper implements CreationHelper {
|
|||||||
* @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
|
* @deprecated POI 3.15 beta 3. Use {@link #createHyperlink(HyperlinkType)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@Removal(version="3.17")
|
||||||
@Override
|
@Override
|
||||||
public XSSFHyperlink createHyperlink(int type) {
|
public XSSFHyperlink createHyperlink(int type) {
|
||||||
return new XSSFHyperlink(type);
|
return new XSSFHyperlink(type);
|
||||||
|
@ -168,6 +168,7 @@ public class XSSFHyperlink implements Hyperlink {
|
|||||||
* @return the type of this hyperlink
|
* @return the type of this hyperlink
|
||||||
* @see HyperlinkType#forInt
|
* @see HyperlinkType#forInt
|
||||||
* @deprecated POI 3.15 beta 3. Use {@link #getTypeEnum()} instead.
|
* @deprecated POI 3.15 beta 3. Use {@link #getTypeEnum()} instead.
|
||||||
|
* getType will return a HyperlinkType enum in the future.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getType() {
|
public int getType() {
|
||||||
|
Loading…
Reference in New Issue
Block a user