From 4f21f5280a8cefd0e04440498dc813a850f6669f Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sat, 11 Jan 2025 09:23:23 +0000 Subject: Bug 69265: Add test which verifies that Hyperlink Type "Email" is not supported for HSSF Also update JavaDoc slightly to describe the special handling of HyperlinkType.EMAIL git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923050 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/common/usermodel/HyperlinkType.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'poi/src/main/java/org') diff --git a/poi/src/main/java/org/apache/poi/common/usermodel/HyperlinkType.java b/poi/src/main/java/org/apache/poi/common/usermodel/HyperlinkType.java index 6152a85e45..d38fa16c88 100644 --- a/poi/src/main/java/org/apache/poi/common/usermodel/HyperlinkType.java +++ b/poi/src/main/java/org/apache/poi/common/usermodel/HyperlinkType.java @@ -25,7 +25,7 @@ public enum HyperlinkType { /** Not a hyperlink */ @Internal NONE(-1), - + /** * Link to an existing file or web page */ @@ -37,7 +37,10 @@ public enum HyperlinkType { DOCUMENT(2), /** - * Link to an E-mail address + * Link to an E-mail address. + * + * Please note that this currently only works if the address in the hyperlink + * uses the prefix "mailto:" as the binary formats do not persis this type. */ EMAIL(3), @@ -45,13 +48,13 @@ public enum HyperlinkType { * Link to a file */ FILE(4); - - + + /** @deprecated POI 3.15 beta 3 */ @Internal(since="3.15 beta 3") @Deprecated private final int code; - + /** * The codes don't have any real meaning. * They are bytes that are read in and written out from HSSF, HSLF, XSSF, and XSLF are different @@ -66,7 +69,7 @@ public enum HyperlinkType { HyperlinkType(int code) { this.code = code; } - + /** * @deprecated POI 3.15 beta 3 * -- cgit v1.2.3